From e4ca88fd668d1fbeec7d835e6dc19d3591455061 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Sun, 17 Jul 2022 14:23:33 +0800 Subject: [PATCH] fix upload payment proof document --- .../CreatePaymentProofDocumentLogic.php | 3 +- .../CreateInvoiceDocumentProcessor.php | 5 ++++ .../CreateInvoiceTransactionProcessor.php | 4 ++- .../SupplierPendingOrdersSectionComponent.vue | 9 ------ .../pdfs/supplier_deliver_order.blade.php | 28 +++++++++---------- 5 files changed, 24 insertions(+), 25 deletions(-) diff --git a/app/Classes/Modules/Transactions/ControllersLogic/CreatePaymentProofDocumentLogic.php b/app/Classes/Modules/Transactions/ControllersLogic/CreatePaymentProofDocumentLogic.php index 460f5181..fdda9019 100644 --- a/app/Classes/Modules/Transactions/ControllersLogic/CreatePaymentProofDocumentLogic.php +++ b/app/Classes/Modules/Transactions/ControllersLogic/CreatePaymentProofDocumentLogic.php @@ -51,11 +51,12 @@ class CreatePaymentProofDocumentLogic extends AbstractControllerLogic private $createInvoiceTransactionProcessor; /** - * CreatePaymentVerificationDocumentLogic constructor. + * CreatePaymentProofDocumentLogic constructor. * @param FetchesTransaction $fetchesTransaction * @param CreatesDocument $createsDocument * @param CreatesFiles $createsFile * @param UpdatesTransactionStatus $updatesTransactionStatus + * @param CreateInvoiceTransactionProcessor $createInvoiceTransactionProcessor */ public function __construct(FetchesTransaction $fetchesTransaction, CreatesDocument $createsDocument, CreatesFiles $createsFile, UpdatesTransactionStatus $updatesTransactionStatus, CreateInvoiceTransactionProcessor $createInvoiceTransactionProcessor) { diff --git a/app/Classes/Modules/Transactions/Processors/CreateInvoiceDocumentProcessor.php b/app/Classes/Modules/Transactions/Processors/CreateInvoiceDocumentProcessor.php index 39b42576..d6231e0c 100644 --- a/app/Classes/Modules/Transactions/Processors/CreateInvoiceDocumentProcessor.php +++ b/app/Classes/Modules/Transactions/Processors/CreateInvoiceDocumentProcessor.php @@ -28,7 +28,12 @@ class CreateInvoiceDocumentProcessor } /** + * @param $transaction + * @param $purchaseOrder + * @param $supplier + * @param $document_type * @return void + * @throws \App\Classes\Exceptions\MalformedRequestException */ public function execute($transaction, $purchaseOrder, $supplier, $document_type) { diff --git a/app/Classes/Modules/Transactions/Processors/CreateInvoiceTransactionProcessor.php b/app/Classes/Modules/Transactions/Processors/CreateInvoiceTransactionProcessor.php index 5b7987b4..6da2f352 100644 --- a/app/Classes/Modules/Transactions/Processors/CreateInvoiceTransactionProcessor.php +++ b/app/Classes/Modules/Transactions/Processors/CreateInvoiceTransactionProcessor.php @@ -69,7 +69,7 @@ class CreateInvoiceTransactionProcessor * @param UpdatesBookingStatus $updatesBookingStatus * @param CreateInvoiceDocumentProcessor $invoiceDocumentProcessor */ - public function __construct(ListsTransactions $listsTransactions, CreatesTransaction $createsTransaction, GeneratesTransactionBillNumber $generatesTransactionBillNumber, CalculatesBookingPaidAmount $calculatesBookingPaidAmount, CalculatesBookingPayableAmount $calculatesBookingPayableAmount, CalculatesBookingTransferredAmount $calculatesBookingTransferredAmount, FetchesServiceConfigurations $fetchesServiceConfigurations, CalculatesBookingCurrencyAverageRate $calculatesBookingCurrencyAverageRate, FetchesCompany $fetchesCompany, UpdatesBookingStatus $updatesBookingStatus, CreateInvoiceTransactionProcessor $invoiceDocumentProcessor) + public function __construct(ListsTransactions $listsTransactions, CreatesTransaction $createsTransaction, GeneratesTransactionBillNumber $generatesTransactionBillNumber, CalculatesBookingPaidAmount $calculatesBookingPaidAmount, CalculatesBookingPayableAmount $calculatesBookingPayableAmount, CalculatesBookingTransferredAmount $calculatesBookingTransferredAmount, FetchesServiceConfigurations $fetchesServiceConfigurations, CalculatesBookingCurrencyAverageRate $calculatesBookingCurrencyAverageRate, FetchesCompany $fetchesCompany, UpdatesBookingStatus $updatesBookingStatus, CreateInvoiceDocumentProcessor $invoiceDocumentProcessor) { $this->listsTransactions = $listsTransactions; $this->createsTransaction = $createsTransaction; @@ -84,6 +84,8 @@ class CreateInvoiceTransactionProcessor $this->invoiceDocumentProcessor = $invoiceDocumentProcessor; } + + /** * @param Booking $booking * @return void diff --git a/resources/assets/vue/components/bookings/sections/SupplierPendingOrdersSectionComponent.vue b/resources/assets/vue/components/bookings/sections/SupplierPendingOrdersSectionComponent.vue index a08a16c9..44a314fe 100644 --- a/resources/assets/vue/components/bookings/sections/SupplierPendingOrdersSectionComponent.vue +++ b/resources/assets/vue/components/bookings/sections/SupplierPendingOrdersSectionComponent.vue @@ -124,15 +124,6 @@
-
-
- - - -
-
diff --git a/resources/views/pages/pdfs/supplier_deliver_order.blade.php b/resources/views/pages/pdfs/supplier_deliver_order.blade.php index 6b667219..89d25cc4 100644 --- a/resources/views/pages/pdfs/supplier_deliver_order.blade.php +++ b/resources/views/pages/pdfs/supplier_deliver_order.blade.php @@ -6,7 +6,7 @@
- {{ $transactions->issuerCompany->reference }} + {{ $transaction->issuerCompany->reference }}
@@ -18,8 +18,8 @@ Delivery Order - PO#: {{ $transactions->bill_no }}
- Ref#: {{ $transactions->booking->marking }}
+ PO#: {{ $transaction->bill_no }}
+ Ref#: {{ $transaction->booking->marking }}
Date: {{ $po_order_transaction->created_at }} @@ -82,19 +82,19 @@ {{ $transaction_detail->product_name }} {{ $transaction_detail->quantity }} - @if($transactions->booking()->first()->fix_currency_id !== 1) - {{ number_format( (1/$transactions->currency_rate) * $transaction_detail->price, 2) }} + @if($transaction->booking()->first()->fix_currency_id !== 1) + {{ number_format( (1/$transaction->currency_rate) * $transaction_detail->price, 2) }} @else {{ number_format($transaction_detail->price, 2) }} @endif - @if($transactions->booking()->first()->fix_currency_id !== 1) + @if($transaction->booking()->first()->fix_currency_id !== 1) - {{ number_format((float)number_format( (1/$transactions->currency_rate) * $transaction_detail->price, 2,'.','')*$transaction_detail->quantity,2) }} + {{ number_format((float)number_format( (1/$transaction->currency_rate) * $transaction_detail->price, 2,'.','')*$transaction_detail->quantity,2) }} @php - $subtotal += number_format((float)number_format( (1/$transactions->currency_rate) * $transaction_detail->price, 2,'.','')*$transaction_detail->quantity,2,'.',''); + $subtotal += number_format((float)number_format( (1/$transaction->currency_rate) * $transaction_detail->price, 2,'.','')*$transaction_detail->quantity,2,'.',''); @endphp @else {{ number_format((float)number_format($transaction_detail->price, 2,'.','')*$transaction_detail->quantity,2) }} @@ -119,10 +119,10 @@ Adjustment - @if($transactions->booking()->first()->fix_currency_id !== 1) - {{ number_format((float)number_format( (1/$transactions->currency_rate) * $transactions->amount, 2,'.','') - (float)number_format($subtotal, 2,'.',''),2) }} + @if($transaction->booking()->first()->fix_currency_id !== 1) + {{ number_format((float)number_format( (1/$transaction->currency_rate) * $transaction->amount, 2,'.','') - (float)number_format($subtotal, 2,'.',''),2) }} @else - {{ number_format((float)number_format($transactions->amount, 2,'.','') - (float)number_format($subtotal, 2,'.',''),2) }} + {{ number_format((float)number_format($transaction->amount, 2,'.','') - (float)number_format($subtotal, 2,'.',''),2) }} @endif @@ -130,10 +130,10 @@ Total - @if($transactions->booking()->first()->fix_currency_id !== 1) - {{ number_format( ((1/$transactions->currency_rate) * $transactions->amount), 2) }} + @if($transaction->booking()->first()->fix_currency_id !== 1) + {{ number_format( ((1/$transaction->currency_rate) * $transaction->amount), 2) }} @else - {{ number_format($transactions->amount, 2) }} + {{ number_format($transaction->amount, 2) }} @endif