Merge branch 'dev' into 2567-calendar_rework
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Jimenez Ruiz 2021-06-14 09:59:13 +00:00
commit c09d25ba48
10 changed files with 80 additions and 32 deletions

View File

@ -10,7 +10,7 @@ Commission: Comisión
Landed: F. entrega
Reference: Referencia
Created: Creado
Booked: Facturado
Booked: Contabilizada
Is inventory: Inventario
Notes: Notas
Status: Estado

View File

@ -139,6 +139,7 @@ module.exports = Self => {
ii.supplierRef,
ii.docFk AS dmsFk,
ii.supplierFk,
ii.expenceFkDeductible deductibleExpenseFk,
s.name AS supplierName,
s.account,
SUM(iid.amount) AS amount,

View File

@ -39,6 +39,18 @@ module.exports = Self => {
scope: {
fields: ['withholding']
}
},
{
relation: 'expenseDeductible',
scope: {
fields: ['id', 'name', 'taxTypeFk']
}
},
{
relation: 'currency',
scope: {
fields: ['id', 'name']
}
}
]
};

View File

@ -33,9 +33,6 @@
"isBooked": {
"type": "boolean"
},
"isVatDeductible": {
"type": "boolean"
},
"booked": {
"type": "date"
},
@ -50,6 +47,12 @@
"mysql": {
"columnName": "docFk"
}
},
"deductibleExpenseFk": {
"type": "number",
"mysql": {
"columnName": "expenceFkDeductible"
}
}
},
"relations": {
@ -63,6 +66,11 @@
"model": "SageWithholding",
"foreignKey": "withholdingSageFk"
},
"expenseDeductible": {
"type": "belongsTo",
"model": "Expense",
"foreignKey": "deductibleExpenseFk"
},
"company": {
"type": "belongsTo",
"model": "Company",

View File

@ -7,21 +7,6 @@
</vn-watcher>
<form name="form" ng-submit="watcher.submit()" class="vn-w-md">
<vn-card class="vn-pa-lg">
<vn-horizontal>
<vn-date-picker
vn-one
label="Expedition date"
ng-model="$ctrl.invoiceIn.issued"
vn-focus
rule>
</vn-date-picker>
<vn-date-picker
vn-one
label="Operation date"
ng-model="$ctrl.invoiceIn.operated"
rule>
</vn-date-picker>
</vn-horizontal>
<vn-horizontal>
<vn-autocomplete
vn-one
@ -44,6 +29,35 @@
rule>
</vn-textfield>
</vn-horizontal>
<vn-horizontal>
<vn-date-picker
vn-one
label="Expedition date"
ng-model="$ctrl.invoiceIn.issued"
vn-focus
rule>
</vn-date-picker>
<vn-date-picker
vn-one
label="Operation date"
ng-model="$ctrl.invoiceIn.operated"
rule>
</vn-date-picker>
</vn-horizontal>
<vn-horizontal>
<vn-datalist vn-one
label="Undeductible VAT"
ng-model="$ctrl.invoiceIn.deductibleExpenseFk"
value-field="id"
order="name"
url="Expenses"
fields="['id','name']"
rule>
<tpl-item>
{{id}} - {{name}}
</tpl-item>
</vn-datalist>
</vn-horizontal>
<vn-horizontal>
<vn-date-picker
vn-one

View File

@ -18,6 +18,8 @@
</vn-label-value>
<vn-label-value label="Supplier ref" value="{{$ctrl.summary.supplierRef}}">
</vn-label-value>
<vn-label-value label="Currency" value="{{$ctrl.summary.currency.name}}">
</vn-label-value>
<vn-label-value label="Doc number" value="{{$ctrl.summary.serial}}/{{$ctrl.summary.serialNumber}}">
</vn-label-value>
</vn-one>
@ -34,11 +36,11 @@
<vn-one>
<vn-label-value label="Sage withholding" value="{{$ctrl.summary.sageWithholding.withholding}}">
</vn-label-value>
<vn-label-value label="Undeductible VAT" value="{{$ctrl.summary.expenseDeductible.name}}">
</vn-label-value>
<vn-label-value label="Company" value="{{$ctrl.summary.company.code}}">
</vn-label-value>
<vn-vertical>
<vn-check label="Deductible" ng-model="$ctrl.summary.isVatDeductible" disabled="true">
</vn-check>
<vn-check label="Booked" ng-model="$ctrl.summary.isBooked" disabled="true">
</vn-check>
</vn-vertical>

View File

@ -7,4 +7,4 @@ Booked date: Fecha contable
Accounted date: Fecha contable
Doc number: Numero documento
Sage withholding: Retención sage
Deductible: Deducible
Undeductible VAT: Iva no deducible

View File

@ -9,14 +9,17 @@
"properties": {
"id": {
"id": true,
"type": "Number",
"type": "number",
"description": "Identifier"
},
"name": {
"type": "String"
},
"isWithheld": {
"type": "Number"
"type": "number"
},
"taxTypeFk": {
"type": "number"
}
},
"relations": {

View File

@ -149,11 +149,13 @@
ng-model="ticket.checked">
</vn-check>
</vn-td>
<vn-td number>{{::ticket.id}}</vn-td>
<vn-td number>
<span
ng-click="::$ctrl.showClientDescriptor($event, ticket.clientFk)"
class="link">
<span class="link" ng-click="ticketDescriptor.show($event, ticket.id)">
{{::ticket.id}}
</span>
</vn-td>
<vn-td number>
<span class="link" ng-click="clientDescriptor.show($event, ticket.clientFk)">
{{::ticket.nickname}}
</span>
</vn-td>
@ -180,3 +182,9 @@
vn-bind="+"
fixed-bottom-right>
</vn-float-button>
<vn-ticket-descriptor-popover
vn-id="ticket-descriptor">
</vn-ticket-descriptor-popover>
<vn-client-descriptor-popover
vn-id="client-descriptor">
</vn-client-descriptor-popover>

View File

@ -8,18 +8,18 @@
},
"properties": {
"id": {
"type": "Number",
"type": "number",
"id": true,
"description": "Identifier"
},
"code": {
"type": "String"
"type": "string"
},
"name": {
"type": "String"
"type": "string"
},
"ratio": {
"type": "Number"
"type": "number"
}
},
"acls": [