feat(supplier.fiscal-data): add two fields

This commit is contained in:
Vicent Llopis 2022-04-25 11:51:34 +02:00
parent 89777646c2
commit 5211a0d9d7
5 changed files with 57 additions and 4 deletions

View File

@ -1332,11 +1332,11 @@ INSERT INTO `vn`.`supplierAddress`(`id`, `supplierFk`, `nickname`, `street`, `pr
(5, 442, 'GCR building', 'Bristol district', 1, '46000', 'Gotham', '111111111', '222222222'),
(6, 442, 'The Gotham Tonight building', 'Bristol district', 1, '46000', 'Gotham', '111111111', '222222222');
INSERT INTO `vn`.`supplier`(`id`, `name`, `nickname`,`account`,`countryFk`,`nif`, `commission`, `created`, `isActive`, `street`, `city`, `provinceFk`, `postCode`, `payMethodFk`, `payDemFk`, `payDay`, `taxTypeSageFk`, `withholdingSageFk`, `transactionTypeSageFk`, `workerFk`, `supplierActivityFk`, `isPayMethodChecked`)
INSERT INTO `vn`.`supplier`(`id`, `name`, `nickname`,`account`,`countryFk`,`nif`, `commission`, `created`, `isActive`, `street`, `city`, `provinceFk`, `postCode`, `payMethodFk`, `payDemFk`, `payDay`, `taxTypeSageFk`, `withholdingSageFk`, `transactionTypeSageFk`, `workerFk`, `supplierActivityFk`, `isPayMethodChecked`, `healthRegister`)
VALUES
(1, 'Plants SL', 'Plants nick', 4100000001, 1, '06089160W', 0, CURDATE(), 1, 'supplier address 1', 'PONTEVEDRA', 1, 15214, 1, 1, 15, 4, 1, 1, 18, 'flowerPlants', 1),
(2, 'Farmer King', 'The farmer', 4000020002, 1, '87945234L', 0, CURDATE(), 1, 'supplier address 2', 'SILLA', 2, 43022, 1, 2, 10, 93, 2, 8, 18, 'animals', 1),
(442, 'Verdnatura Levante SL', 'Verdnatura', 5115000442, 1, '06815934E', 0, CURDATE(), 1, 'supplier address 3', 'SILLA', 1, 43022, 1, 2, 15, 6, 9, 3, 18, 'flowerPlants', 1);
(1, 'Plants SL', 'Plants nick', 4100000001, 1, '06089160W', 0, CURDATE(), 1, 'supplier address 1', 'PONTEVEDRA', 1, 15214, 1, 1, 15, 4, 1, 1, 18, 'flowerPlants', 1, '400664487V'),
(2, 'Farmer King', 'The farmer', 4000020002, 1, '87945234L', 0, CURDATE(), 1, 'supplier address 2', 'SILLA', 2, 43022, 1, 2, 10, 93, 2, 8, 18, 'animals', 1, '400664487V'),
(442, 'Verdnatura Levante SL', 'Verdnatura', 5115000442, 1, '06815934E', 0, CURDATE(), 1, 'supplier address 3', 'SILLA', 1, 43022, 1, 2, 15, 6, 9, 3, 18, 'complements', 1, '400664487V');
INSERT INTO `vn`.`supplierContact`(`id`, `supplierFk`, `phone`, `mobile`, `email`, `observation`, `name`)
VALUES

View File

@ -11,6 +11,9 @@
"SupplierAccount": {
"dataSource": "vn"
},
"SupplierActivity": {
"dataSource": "vn"
},
"SupplierAgencyTerm": {
"dataSource": "vn"
},

View File

@ -0,0 +1,18 @@
{
"name": "SupplierActivity",
"base": "VnModel",
"options": {
"mysql": {
"table": "supplierActivity"
}
},
"properties": {
"code": {
"type": "string",
"id": true
},
"name": {
"type": "string"
}
}
}

View File

@ -101,6 +101,12 @@
},
"isPayMethodChecked": {
"type": "boolean"
},
"supplierActivityFk": {
"type": "string"
},
"healthRegister": {
"type": "string"
}
},
"relations": {
@ -159,6 +165,11 @@
"type": "hasMany",
"model": "SupplierAddress",
"foreignKey": "supplierFk"
},
"supplierActivity": {
"type": "belongsTo",
"model": "SupplierActivity",
"foreignKey": "supplierActivityFk"
}
}
}

View File

@ -30,6 +30,11 @@
data="sageWithholdings"
order="withholding">
</vn-crud-model>
<vn-crud-model
auto-load="true"
url="SupplierActivity"
data="supplierActivity">
</vn-crud-model>
<form name="form" vn-http-submit="watcher.submit()" class="vn-w-md">
<vn-card class="vn-pa-lg">
<vn-horizontal>
@ -87,6 +92,22 @@
<tpl-item>{{id}}: {{transaction}}</tpl-item>
</vn-autocomplete>
</vn-horizontal>
<vn-horizontal>
<vn-autocomplete vn-one
ng-model="$ctrl.supplier.supplierActivityFk"
data="supplierActivity"
show-field="code"
value-field="code"
label="Supplier activity"
rule>
</vn-autocomplete>
<vn-textfield
vn-one
label="Healt register"
ng-model="$ctrl.supplier.healthRegister"
rule>
</vn-textfield>
</vn-horizontal>
<vn-horizontal>
<vn-textfield
vn-one