fixes #6169 invoiceIn con valores predeterminados
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
351096bd11
commit
fea0db14e2
|
@ -67,17 +67,22 @@ class Controller extends Section {
|
||||||
}
|
}
|
||||||
|
|
||||||
openCreateDialog() {
|
openCreateDialog() {
|
||||||
|
const params = {filter: {
|
||||||
|
where: {code: 'invoiceIn'}
|
||||||
|
}};
|
||||||
|
this.$http.get('DmsTypes/findOne', {params}).then(res => {
|
||||||
this.dms = {
|
this.dms = {
|
||||||
reference: null,
|
reference: this.invoiceIn.supplierRef,
|
||||||
warehouseId: null,
|
warehouseId: this.vnConfig.warehouseFk,
|
||||||
companyId: null,
|
companyId: this.vnConfig.companyFk,
|
||||||
dmsTypeId: null,
|
dmsTypeId: res.data.id,
|
||||||
description: null,
|
description: this.invoiceIn.supplier.name,
|
||||||
hasFile: true,
|
hasFile: true,
|
||||||
hasFileAttached: true,
|
hasFileAttached: true,
|
||||||
files: null
|
files: null
|
||||||
};
|
};
|
||||||
this.$.dmsCreateDialog.show();
|
this.$.dmsCreateDialog.show();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
downloadFile(dmsId) {
|
downloadFile(dmsId) {
|
||||||
|
|
|
@ -6,6 +6,7 @@ class Controller extends Section {
|
||||||
this.invoiceIn = {};
|
this.invoiceIn = {};
|
||||||
if (this.$params && this.$params.supplierFk)
|
if (this.$params && this.$params.supplierFk)
|
||||||
this.invoiceIn.supplierFk = this.$params.supplierFk;
|
this.invoiceIn.supplierFk = this.$params.supplierFk;
|
||||||
|
this.invoiceIn.issued = Date.vnNew();
|
||||||
}
|
}
|
||||||
|
|
||||||
get companyFk() {
|
get companyFk() {
|
||||||
|
|
|
@ -26,7 +26,7 @@ describe('InvoiceIn', () => {
|
||||||
|
|
||||||
controller.$onInit();
|
controller.$onInit();
|
||||||
|
|
||||||
expect(controller.invoiceIn).toEqual({});
|
expect(controller.invoiceIn).toBeDefined();
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should define invoiceIn and it's supplierFk when received via params`, () => {
|
it(`should define invoiceIn and it's supplierFk when received via params`, () => {
|
||||||
|
|
Loading…
Reference in New Issue