feat: añadido desplegable impresora
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
eef926d09d
commit
41914f9e4f
|
@ -39,6 +39,12 @@ module.exports = Self => {
|
||||||
type: 'date',
|
type: 'date',
|
||||||
description: 'The minium shupped date',
|
description: 'The minium shupped date',
|
||||||
required: true
|
required: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
arg: 'printerFk',
|
||||||
|
type: 'number',
|
||||||
|
description: 'The printer to print',
|
||||||
|
required: true
|
||||||
}],
|
}],
|
||||||
returns: {
|
returns: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
|
@ -129,7 +135,7 @@ module.exports = Self => {
|
||||||
JSON_OBJECT('refFk', ?),
|
JSON_OBJECT('refFk', ?),
|
||||||
'normal'
|
'normal'
|
||||||
);`;
|
);`;
|
||||||
await models.InvoiceOut.rawSql(query, [4 /* vPrinterFk */, invoiceOut.ref], myOptions);
|
await models.InvoiceOut.rawSql(query, [args.printerFk, invoiceOut.ref], myOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tx) await tx.commit();
|
if (tx) await tx.commit();
|
||||||
|
@ -138,7 +144,7 @@ module.exports = Self => {
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (invoiceId) {
|
if (invoiceId && invoiceOut.client().isToBeMailed) {
|
||||||
ctx.args = {
|
ctx.args = {
|
||||||
reference: invoiceOut.ref,
|
reference: invoiceOut.ref,
|
||||||
recipientId: invoiceOut.clientFk,
|
recipientId: invoiceOut.clientFk,
|
||||||
|
|
|
@ -8,6 +8,9 @@
|
||||||
"InvoiceContainer": {
|
"InvoiceContainer": {
|
||||||
"dataSource": "invoiceStorage"
|
"dataSource": "invoiceStorage"
|
||||||
},
|
},
|
||||||
|
"Printer": {
|
||||||
|
"dataSource": "vn"
|
||||||
|
},
|
||||||
"TaxArea": {
|
"TaxArea": {
|
||||||
"dataSource": "vn"
|
"dataSource": "vn"
|
||||||
},
|
},
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
{
|
||||||
|
"name": "Printer",
|
||||||
|
"base": "VnModel",
|
||||||
|
"options": {
|
||||||
|
"mysql": {
|
||||||
|
"table": "printer"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "number",
|
||||||
|
"id": true,
|
||||||
|
"description": "Identifier"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"isLabeler": {
|
||||||
|
"type": "boolean"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"acls": [{
|
||||||
|
"accessType": "READ",
|
||||||
|
"principalType": "ROLE",
|
||||||
|
"principalId": "$everyone",
|
||||||
|
"permission": "ALLOW"
|
||||||
|
}]
|
||||||
|
}
|
|
@ -109,7 +109,7 @@
|
||||||
<tpl-item>{{::id}} - {{::name}}</tpl-item>
|
<tpl-item>{{::id}} - {{::name}}</tpl-item>
|
||||||
</vn-autocomplete>
|
</vn-autocomplete>
|
||||||
</vn-vertical>
|
</vn-vertical>
|
||||||
<vn-horizontal>
|
<vn-vertical>
|
||||||
<vn-autocomplete
|
<vn-autocomplete
|
||||||
url="Companies"
|
url="Companies"
|
||||||
label="Company"
|
label="Company"
|
||||||
|
@ -117,7 +117,15 @@
|
||||||
value-field="id"
|
value-field="id"
|
||||||
ng-model="$ctrl.invoice.companyFk">
|
ng-model="$ctrl.invoice.companyFk">
|
||||||
</vn-autocomplete>
|
</vn-autocomplete>
|
||||||
</vn-horizontal>
|
<vn-autocomplete
|
||||||
|
url="Printers"
|
||||||
|
label="Printer"
|
||||||
|
show-field="name"
|
||||||
|
value-field="id"
|
||||||
|
where="{isLabeler: false}"
|
||||||
|
ng-model="$ctrl.invoice.printerFk">
|
||||||
|
</vn-autocomplete>
|
||||||
|
</vn-vertical>
|
||||||
<vn-submit vn-id="invoiceButton" ng-click="$ctrl.makeInvoice()" label="Invoice" class="vn-mt-sm" ></vn-submit>
|
<vn-submit vn-id="invoiceButton" ng-click="$ctrl.makeInvoice()" label="Invoice" class="vn-mt-sm" ></vn-submit>
|
||||||
<vn-button ng-click="$ctrl.clean()" label="Clean" class="vn-mt-sm" disabled="!data.length"></vn-button>
|
<vn-button ng-click="$ctrl.clean()" label="Clean" class="vn-mt-sm" disabled="!data.length"></vn-button>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -59,6 +59,7 @@ class Controller extends Section {
|
||||||
maxShipped: invoice.maxShipped,
|
maxShipped: invoice.maxShipped,
|
||||||
companyFk: invoice.companyFk,
|
companyFk: invoice.companyFk,
|
||||||
minShipped: invoice.minShipped,
|
minShipped: invoice.minShipped,
|
||||||
|
printerFk: this.invoice.printerFk,
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -11,3 +11,4 @@ Clean: Limpiar
|
||||||
From client: Desde cliente
|
From client: Desde cliente
|
||||||
To client: Hasta cliente
|
To client: Hasta cliente
|
||||||
Address id: Id dirección
|
Address id: Id dirección
|
||||||
|
Printer: Impresora
|
||||||
|
|
Loading…
Reference in New Issue