diff --git a/app/Classes/Modules/Transactions/Processors/ApproveShippingInvoiceTransactionProcessor.php b/app/Classes/Modules/Transactions/Processors/ApproveShippingInvoiceTransactionProcessor.php index ca636f7d..894f26fb 100644 --- a/app/Classes/Modules/Transactions/Processors/ApproveShippingInvoiceTransactionProcessor.php +++ b/app/Classes/Modules/Transactions/Processors/ApproveShippingInvoiceTransactionProcessor.php @@ -75,12 +75,11 @@ class ApproveShippingInvoiceTransactionProcessor $this->createSalesOrderDocProcessor->execute($invoice_transaction); $this->updatesTransactionStatus->execute($invoice_transaction, ApprovalStatus::APPROVED); - //cief todo: 90 - to determine if sending email is necessary - // if(app()->environment(['production'])) { - // $companyModule = $packingList->owner->companyModule; - // $user = $companyModule->employees()->first(); - // $user->notify(new InvoiceIssuedEmail($user, $packingList)); - // } + if(app()->environment(['production']) && $companyModule->company->e_invoice === 0) { //invoice issued email is only send to customer who has not opted in E-Invoice + $companyModule = $packingList->owner->companyModule; + $user = $companyModule->employees()->first(); + $user->notify(new InvoiceIssuedEmail($user, $packingList)); + } $order = $packingList->owner()->first(); if($order instanceof Order){ diff --git a/resources/assets/vue/components/paymentsBilling/elements/SingleAdminPaymentsBillingWithStorageComponent.vue b/resources/assets/vue/components/paymentsBilling/elements/SingleAdminPaymentsBillingWithStorageComponent.vue index 28e5730a..9106853f 100644 --- a/resources/assets/vue/components/paymentsBilling/elements/SingleAdminPaymentsBillingWithStorageComponent.vue +++ b/resources/assets/vue/components/paymentsBilling/elements/SingleAdminPaymentsBillingWithStorageComponent.vue @@ -75,6 +75,9 @@