Merge pull request 'MASTER-fix(invoiceIn_descriptor): supplier.email' (!1307) from hotFix_invoiceIn_supplier_email into master
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #1307
This commit is contained in:
Joan Sanchez 2023-02-07 08:39:16 +00:00
commit 71c9ed3a4e
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: {
where: {
email: {neq: null}
include: {
relation: 'contacts',
scope: {
where: {
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>