feature: payment instruction & cashier case cicilan dan downpayment

This commit is contained in:
2026-07-21 15:22:18 +07:00
parent d92fb57751
commit a12a34f073
7 changed files with 128 additions and 19 deletions

View File

@@ -5,14 +5,14 @@
<v-menu class="xs3 pr-2" v-model="menustartdate" :close-on-content-click="false" :nudge-right="40" lazy transition="scale-transition"
offset-y full-width max-width="290px" min-width="290px">
<template v-slot:activator="{ on }">
<v-text-field class="mt-1" v-model="startDateFormatted" label="Tgl. Awal" outline readonly v-on="on" @blur="date = deFormatedDate(startDateFormatted)"></v-text-field>
<v-text-field class="mt-1" v-model="startDateFormatted" label="Tgl. Awal" outline readonly v-on="on"></v-text-field>
</template>
<v-date-picker v-model="init_sdate" no-title @input="menustartdate = false"></v-date-picker>
</v-menu>
<v-menu class="xs3 pl-2" v-model="menuenddate" :close-on-content-click="false" :nudge-right="40" lazy transition="scale-transition"
offset-y full-width max-width="290px" min-width="290px">
<template v-slot:activator="{ on }">
<v-text-field class="mt-1" v-model="endDateFormatted" label="Tgl. Akhir" outline readonly v-on="on" @blur="date = deFormatedDate(endDateFormatted)"></v-text-field>
<v-text-field class="mt-1" v-model="endDateFormatted" label="Tgl. Akhir" outline readonly v-on="on"></v-text-field>
</template>
<v-date-picker v-model="init_edate" no-title @input="menuenddate = false"></v-date-picker>
</v-menu>
@@ -110,7 +110,13 @@
return `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`
},
isSelected(p) {
return p.SupplierInvoiceID == this.$store.state.bill.selected_bill.SupplierInvoiceID
const sel = this.$store.state.bill.selected_bill;
if (!sel || !sel.type) return false;
return p.type === sel.type && (
(sel.type === 'INVOICE' && p.SupplierInvoiceID == sel.SupplierInvoiceID) ||
(sel.type === 'DP' && p.DownpaymentID == sel.DownpaymentID) ||
(sel.type === 'INSTALLMENT' && p.InstallmentID == sel.InstallmentID)
);
},
convertMoney(money) {
return one_money(money)

View File

@@ -1167,11 +1167,15 @@
tanggalbayar: this.xtanggalbayar,
type: this.$store.state.bill.selected_bill.type
}
// console.log(prm)
if (this.$store.state.bill.selected_bill.type == 'DP') {
prm.orderid = this.$store.state.bill.selected_bill.DownpaymentID
this.$store.dispatch("paymentmanual/payDownpayment", prm)
} else if (this.$store.state.bill.selected_bill.type == 'INSTALLMENT') {
prm.orderid = this.$store.state.bill.selected_bill.InstallmentID
this.$store.dispatch("paymentmanual/payInstallment", prm)
} else {
prm.orderid = this.$store.state.bill.selected_bill.SupplierInvoiceID
this.$store.dispatch("paymentmanual/pay", prm)
}
},
@@ -1185,10 +1189,21 @@
orderid: this.$store.state.bill.selected_bill.SupplierInvoiceID,
headerid: this.$store.state.bill.selected_bill.SupplierPaymentID,
xnumber: this.$store.state.bill.selected_bill.SupplierPaymentNumber,
tanggalbayar : this.xtanggalbayar
tanggalbayar : this.xtanggalbayar,
type: this.$store.state.bill.selected_bill.type
}
//console.log(prm.amount)
this.$store.dispatch("paymentmanual/editpay", prm)
if (this.$store.state.bill.selected_bill.type == 'DP') {
prm.orderid = this.$store.state.bill.selected_bill.DownpaymentID
this.$store.dispatch("paymentmanual/editpay", prm)
} else if (this.$store.state.bill.selected_bill.type == 'INSTALLMENT') {
prm.orderid = this.$store.state.bill.selected_bill.InstallmentID
this.$store.dispatch("paymentmanual/editpay", prm)
} else {
prm.orderid = this.$store.state.bill.selected_bill.SupplierInvoiceID
this.$store.dispatch("paymentmanual/editpay", prm)
}
},
deleteNote(note, idx) {
this.$store.commit("paymentmanual/update_note_delete", "")