Skip to content

Commit

Permalink
fix: Paid invoice changes status to Paid (#399)
Browse files Browse the repository at this point in the history
  • Loading branch information
MyvTsv authored Feb 14, 2025
1 parent 23109d0 commit 08655d6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions inc/order.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -2146,14 +2146,18 @@ public static function updateBillState($ID)

$order = new self();
$order->getFromDB($ID);
$conf = PluginOrderConfig::getConfig();
if ($all_paid) {
$state = PluginOrderBillState::PAID;
$bill_state = PluginOrderBillState::PAID;
$order_status = $conf->fields['order_status_paid'];
} else {
$state = PluginOrderBillState::NOTPAID;
$bill_state = PluginOrderBillState::NOTPAID;
$order_status = $order->fields['plugin_order_orderstates_id'];
}
$order->update([
'id' => $ID,
'plugin_order_billstates_id' => $state
'plugin_order_billstates_id' => $bill_state,
'plugin_order_orderstates_id' => $order_status
]);
}

Expand Down

0 comments on commit 08655d6

Please sign in to comment.