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',
|
||||
description: 'The minium shupped date',
|
||||
required: true
|
||||
},
|
||||
{
|
||||
arg: 'printerFk',
|
||||
type: 'number',
|
||||
description: 'The printer to print',
|
||||
required: true
|
||||
}],
|
||||
returns: {
|
||||
type: 'object',
|
||||
|
@ -129,7 +135,7 @@ module.exports = Self => {
|
|||
JSON_OBJECT('refFk', ?),
|
||||
'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();
|
||||
|
@ -138,7 +144,7 @@ module.exports = Self => {
|
|||
throw e;
|
||||
}
|
||||
|
||||
if (invoiceId) {
|
||||
if (invoiceId && invoiceOut.client().isToBeMailed) {
|
||||
ctx.args = {
|
||||
reference: invoiceOut.ref,
|
||||
recipientId: invoiceOut.clientFk,
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
"InvoiceContainer": {
|
||||
"dataSource": "invoiceStorage"
|
||||
},
|
||||
"Printer": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"TaxArea": {
|
||||
"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>
|
||||
</vn-autocomplete>
|
||||
</vn-vertical>
|
||||
<vn-horizontal>
|
||||
<vn-vertical>
|
||||
<vn-autocomplete
|
||||
url="Companies"
|
||||
label="Company"
|
||||
|
@ -117,7 +117,15 @@
|
|||
value-field="id"
|
||||
ng-model="$ctrl.invoice.companyFk">
|
||||
</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-button ng-click="$ctrl.clean()" label="Clean" class="vn-mt-sm" disabled="!data.length"></vn-button>
|
||||
</form>
|
||||
|
|
|
@ -59,6 +59,7 @@ class Controller extends Section {
|
|||
maxShipped: invoice.maxShipped,
|
||||
companyFk: invoice.companyFk,
|
||||
minShipped: invoice.minShipped,
|
||||
printerFk: this.invoice.printerFk,
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -11,3 +11,4 @@ Clean: Limpiar
|
|||
From client: Desde cliente
|
||||
To client: Hasta cliente
|
||||
Address id: Id dirección
|
||||
Printer: Impresora
|
||||
|
|
Loading…
Reference in New Issue