diff --git a/print/templates/reports/claim-pickup-order/claim-pickup-order.html b/print/templates/reports/claim-pickup-order/claim-pickup-order.html index 20c29f0ee..7a843c830 100644 --- a/print/templates/reports/claim-pickup-order/claim-pickup-order.html +++ b/print/templates/reports/claim-pickup-order/claim-pickup-order.html @@ -23,6 +23,10 @@ {{$t('clientId')}} {{client.id}} + + {{$t('phone')}} + {{client.phone}} + {{$t('date')}} {{dated}} diff --git a/print/templates/reports/claim-pickup-order/locale/es.yml b/print/templates/reports/claim-pickup-order/locale/es.yml index 385a54917..9faf9ac06 100644 --- a/print/templates/reports/claim-pickup-order/locale/es.yml +++ b/print/templates/reports/claim-pickup-order/locale/es.yml @@ -9,6 +9,7 @@ reference: Referencia concept: Concepto clientSignature: Firma del cliente claim: Reclamación {0} +phone: Teléfono sections: agency: description: 'Para agilizar su recogida, por favor, póngase en contacto con la oficina diff --git a/print/templates/reports/claim-pickup-order/sql/client.sql b/print/templates/reports/claim-pickup-order/sql/client.sql index 30a42d5c8..640b0c8a7 100644 --- a/print/templates/reports/claim-pickup-order/sql/client.sql +++ b/print/templates/reports/claim-pickup-order/sql/client.sql @@ -8,7 +8,8 @@ SELECT a.street, a.nickname, p.name AS province, - ct.country + ct.country, + IFNULL(c.phone, cc.phone) AS phone FROM claim cl JOIN client c ON c.id = cl.clientFk JOIN account.user u ON u.id = c.id @@ -17,4 +18,6 @@ FROM claim cl LEFT JOIN province p ON p.id = a.provinceFk LEFT JOIN autonomy amy ON amy.id = p.autonomyFk LEFT JOIN country ct ON ct.id = amy.countryFk -WHERE cl.id = ? \ No newline at end of file + LEFT JOIN clientContact cc ON cc.clientFk = c.id +WHERE cl.id = ? +LIMIT 1; \ No newline at end of file