Prevent environmental and oil fees for customer 999 with onlyTankCleaning attribute
This commit is contained in:
@@ -654,7 +654,7 @@ class collected_order_invoices_o extends db
|
||||
// Get the user object
|
||||
$user = (new users_o())->getUserByCustomerNumber($this->customer_number->value());
|
||||
// Check if the user has the onlyTankCleaning attribute
|
||||
if ($user->doesUserHaveAttribute('onlyTankCleaning')) {
|
||||
if ($user->doesUserHaveAttribute('onlyTankCleaning') && (int)$user->customer_number->value() !== 999) {
|
||||
// Add the environmental fee & oil fees to the invoice draft
|
||||
$economic = new economic();
|
||||
$economic->invoices->draft->add_environmental_and_oil_fees(
|
||||
|
||||
Reference in New Issue
Block a user