MASTER-fix(invoiceIn_descriptor): supplier.email #1307
|
@ -94,11 +94,6 @@
|
|||
"model": "Supplier",
|
||||
"foreignKey": "supplierFk"
|
||||
},
|
||||
"supplierContact": {
|
||||
"type": "hasMany",
|
||||
"model": "SupplierContact",
|
||||
"foreignKey": "supplierFk"
|
||||
},
|
||||
"currency": {
|
||||
"type": "belongsTo",
|
||||
"model": "Currency",
|
||||
|
|
|
@ -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},
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue