MASTER-fix(invoiceIn_descriptor): supplier.email #1307

Merged
joan merged 4 commits from hotFix_invoiceIn_supplier_email into master 2023-02-07 08:39:17 +00:00
3 changed files with 9 additions and 12 deletions

View File

@ -94,11 +94,6 @@
"model": "Supplier", "model": "Supplier",
"foreignKey": "supplierFk" "foreignKey": "supplierFk"
}, },
"supplierContact": {
"type": "hasMany",
"model": "SupplierContact",
"foreignKey": "supplierFk"
},
"currency": { "currency": {
"type": "belongsTo", "type": "belongsTo",
"model": "Currency", "model": "Currency",

View File

@ -6,13 +6,15 @@ class Controller extends ModuleCard {
const filter = { const filter = {
include: [ include: [
{ {
relation: 'supplier' relation: 'supplier',
}, scope: {
{ include: {
relation: 'supplierContact', relation: 'contacts',
scope: { scope: {
where: { where: {
email: {neq: null} email: {neq: null},
}
}
} }
} }
}, },

View File

@ -40,7 +40,7 @@
</vn-item> </vn-item>
<vn-item <vn-item
ng-if="$ctrl.isAgricultural()" ng-if="$ctrl.isAgricultural()"
ng-click="sendPdfConfirmation.show({email: $ctrl.entity.supplierContact[0].email})" ng-click="sendPdfConfirmation.show({email: $ctrl.entity.supplier.contacts[0].email})"
translate> translate>
Send agricultural receipt as PDF Send agricultural receipt as PDF
</vn-item> </vn-item>