Fix for emailing POs

This commit is contained in:
Hillel Coren 2024-01-12 10:07:49 +02:00
parent 129828cc5d
commit e7273ab725
4 changed files with 20 additions and 20 deletions

View File

@ -122,7 +122,7 @@ class CreditRepository {
String ccEmail, String ccEmail,
) async { ) async {
final data = { final data = {
'entity': '${credit.entityType}', 'entity': '${EntityType.credit.apiValue}',
'entity_id': credit.id, 'entity_id': credit.id,
'template': 'email_template_$template', 'template': 'email_template_$template',
'body': body, 'body': body,

View File

@ -134,7 +134,7 @@ class InvoiceRepository {
String ccEmail, String ccEmail,
) async { ) async {
final data = { final data = {
'entity': '${invoice.entityType}', 'entity': '${EntityType.invoice.apiValue}',
'entity_id': invoice.id, 'entity_id': invoice.id,
'template': 'email_template_$template', 'template': 'email_template_$template',
'body': body, 'body': body,

View File

@ -129,7 +129,7 @@ class PurchaseOrderRepository {
String ccEmail, String ccEmail,
) async { ) async {
final data = { final data = {
'entity': '${purchaseOrder.entityType}', 'entity': '${EntityType.purchaseOrder.apiValue}',
'entity_id': purchaseOrder.id, 'entity_id': purchaseOrder.id,
'template': 'email_template_$template', 'template': 'email_template_$template',
'body': body, 'body': body,

View File

@ -131,7 +131,7 @@ class QuoteRepository {
String ccEmail, String ccEmail,
) async { ) async {
final data = { final data = {
'entity': '${quote.entityType}', 'entity': '${EntityType.quote.apiValue}',
'entity_id': quote.id, 'entity_id': quote.id,
'template': 'email_template_$template', 'template': 'email_template_$template',
'body': body, 'body': body,