2026-05-13 10:39:43 +03:30
|
|
|
<div class="form-group">
|
|
|
|
|
<form [formGroup]="form">
|
2026-06-02 12:22:32 +03:30
|
|
|
<app-price-input [control]="form.controls.unit_price" name="unit_price" label="مبلغ واحد" />
|
2026-05-13 10:39:43 +03:30
|
|
|
<app-input [control]="form.controls.quantity" name="quantity" label="مقدار" type="number" suffix="گرم" />
|
|
|
|
|
<app-enum-select [control]="form.controls.payload.controls.karat" type="goldKarat" name="karat" />
|
2026-04-09 15:01:45 +03:30
|
|
|
|
2026-04-30 16:27:42 +03:30
|
|
|
<app-amount-percentage-input
|
2026-05-13 10:39:43 +03:30
|
|
|
[percentageControl]="form.controls.payload.controls.wages_percentage"
|
2026-05-13 13:44:33 +03:30
|
|
|
[amountControl]="form.controls.payload.controls.wages"
|
2026-05-13 10:39:43 +03:30
|
|
|
[baseAmount]="unitWithQuantity()"
|
2026-04-30 16:27:42 +03:30
|
|
|
[minAmount]="0"
|
2026-05-13 10:39:43 +03:30
|
|
|
[maxAmount]="unitWithQuantity()"
|
|
|
|
|
name="wages"
|
2026-05-24 19:40:02 +03:30
|
|
|
label="اجرت" />
|
2026-05-17 00:27:45 +03:30
|
|
|
|
2026-05-13 10:39:43 +03:30
|
|
|
<app-amount-percentage-input
|
|
|
|
|
[percentageControl]="form.controls.payload.controls.commission_percentage"
|
2026-05-13 13:44:33 +03:30
|
|
|
[amountControl]="form.controls.payload.controls.commission"
|
2026-05-13 10:39:43 +03:30
|
|
|
[baseAmount]="unitWithQuantity()"
|
|
|
|
|
[minAmount]="0"
|
|
|
|
|
[maxAmount]="unitWithQuantity()"
|
|
|
|
|
name="commission"
|
2026-05-24 19:40:02 +03:30
|
|
|
label="حقالعمل" />
|
2026-05-13 10:39:43 +03:30
|
|
|
<app-amount-percentage-input
|
|
|
|
|
[percentageControl]="form.controls.payload.controls.profit_percentage"
|
2026-05-13 13:44:33 +03:30
|
|
|
[amountControl]="form.controls.payload.controls.profit"
|
2026-05-13 10:39:43 +03:30
|
|
|
[baseAmount]="totalAmountBeforeProfit()"
|
|
|
|
|
[minAmount]="0"
|
|
|
|
|
[maxAmount]="totalAmountBeforeProfit()"
|
|
|
|
|
name="profit"
|
2026-05-24 19:40:02 +03:30
|
|
|
label="سود" />
|
2026-05-13 10:39:43 +03:30
|
|
|
</form>
|
2026-03-29 18:07:10 +03:30
|
|
|
|
2026-05-13 10:39:43 +03:30
|
|
|
<app-amount-percentage-input
|
|
|
|
|
[percentageControl]="form.controls.discount_percentage"
|
2026-05-28 18:27:38 +03:30
|
|
|
[amountControl]="form.controls.discount_amount"
|
2026-05-13 10:39:43 +03:30
|
|
|
[baseAmount]="baseAmountForDiscountCalculation()"
|
|
|
|
|
[minAmount]="0"
|
|
|
|
|
[maxAmount]="baseAmountForDiscountCalculation()"
|
2026-05-28 18:27:38 +03:30
|
|
|
name="discount_amount"
|
2026-05-24 19:40:02 +03:30
|
|
|
label="تخفیف">
|
2026-05-13 10:39:43 +03:30
|
|
|
<ng-template #labelSuffix>
|
|
|
|
|
<p-selectButton
|
|
|
|
|
[options]="discountTypeItems"
|
2026-06-01 13:53:42 +03:30
|
|
|
[(ngModel)]="form.controls.payload.controls.discount_type.value"
|
2026-05-13 10:39:43 +03:30
|
|
|
[allowEmpty]="false"
|
2026-06-01 13:53:42 +03:30
|
|
|
optionLabel="name"
|
|
|
|
|
optionValue="id"
|
2026-05-24 19:40:02 +03:30
|
|
|
(onChange)="changeDiscountCalculation($event)" />
|
2026-05-13 10:39:43 +03:30
|
|
|
</ng-template>
|
|
|
|
|
</app-amount-percentage-input>
|
|
|
|
|
|
|
|
|
|
<hr />
|
2026-05-24 19:40:02 +03:30
|
|
|
<div class="flex w-full flex-col justify-center gap-4">
|
2026-05-31 10:34:43 +03:30
|
|
|
<shared-calculated-amount-card
|
2026-05-13 10:39:43 +03:30
|
|
|
[totalAmount]="totalAmount()"
|
|
|
|
|
[baseTotalAmount]="baseTotalAmount()"
|
2026-05-28 18:27:38 +03:30
|
|
|
[discountAmount]="form.controls.discount_amount.value || 0"
|
2026-05-24 19:40:02 +03:30
|
|
|
[taxAmount]="taxAmount()" />
|
|
|
|
|
<button pButton class="w-full sm:w-auto" (click)="submit()">{{ preparedCTAText() }}</button>
|
2026-03-29 18:07:10 +03:30
|
|
|
</div>
|
2026-05-13 10:39:43 +03:30
|
|
|
</div>
|