Skip transactions with automatic department ID during invoicing processing.
This commit is contained in:
@@ -509,10 +509,14 @@ class InvoicingPeriodRoute
|
||||
if (!$transaction_obj->isIncludedInInvoicing()) {
|
||||
continue; // Skip transactions not included in invoicing
|
||||
}
|
||||
// Get the transaction department id
|
||||
$department_id = (int)$transaction_obj->department_id->value();
|
||||
// If the department id is 10 (automatic), skip it
|
||||
if ($department_id === 10) {
|
||||
continue;
|
||||
}
|
||||
$transaction['original_price'] = $transaction_obj->getNetAmountForOrderItemsOriginal();
|
||||
$original_price += $transaction['original_price'];
|
||||
// Add the transaction department id to the transaction
|
||||
$department_id = (int)$transaction_obj->department_id->value();
|
||||
// Initialize the department total if it doesn't exist
|
||||
if (!isset($department_totals[$department_id])) {
|
||||
$department_totals[$department_id] = 0;
|
||||
|
||||
Reference in New Issue
Block a user