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",
"foreignKey": "supplierFk"
},
"supplierContact": {
"type": "hasMany",
"model": "SupplierContact",
"foreignKey": "supplierFk"
},
"currency": {
"type": "belongsTo",
"model": "Currency",

View File

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

View File

@ -40,7 +40,7 @@
</vn-item>
<vn-item
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>
Send agricultural receipt as PDF
</vn-item>