refs #5842 fix: recalcula invoiceDate cuando se cambia la company
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
32a0955c1d
commit
7fa4eabf86
|
@ -118,7 +118,8 @@
|
|||
label="Company"
|
||||
show-field="code"
|
||||
value-field="id"
|
||||
ng-model="$ctrl.companyFk">
|
||||
ng-model="$ctrl.companyFk"
|
||||
on-change="$ctrl.recalcInvoiceDate($ctrl.companyFk)">
|
||||
</vn-autocomplete>
|
||||
<vn-autocomplete
|
||||
url="Printers"
|
||||
|
|
|
@ -14,11 +14,17 @@ class Controller extends Section {
|
|||
this.$http.get('UserConfigs/getUserConfig')
|
||||
.then(res => {
|
||||
this.companyFk = res.data.companyFk;
|
||||
const params = {
|
||||
companyFk: this.companyFk
|
||||
};
|
||||
return this.$http.get('InvoiceOuts/getInvoiceDate', {params});
|
||||
})
|
||||
this.recalcInvoiceDate(this.companyFk);
|
||||
});
|
||||
}
|
||||
|
||||
recalcInvoiceDate(companyFk) {
|
||||
const params = { companyFk: companyFk };
|
||||
this.fetchInvoiceDate(params);
|
||||
}
|
||||
|
||||
fetchInvoiceDate(params) {
|
||||
this.$http.get('InvoiceOuts/getInvoiceDate', { params })
|
||||
.then(res => {
|
||||
this.minInvoicingDate = res.data.issued ? new Date(res.data.issued) : null;
|
||||
this.invoiceDate = this.minInvoicingDate;
|
||||
|
|
Loading…
Reference in New Issue