Page MenuHomeIn-Portal Phabricator

D59.diff
No OneTemporary

File Metadata

Created
Mon, Jan 6, 7:51 AM

D59.diff

Index: branches/5.2.x/units/orders/orders_event_handler.php
===================================================================
--- branches/5.2.x/units/orders/orders_event_handler.php
+++ branches/5.2.x/units/orders/orders_event_handler.php
@@ -2847,9 +2847,15 @@
$sub_order = $this->Application->recallObject('ord.-sub'.$next_sub_number, 'ord');
/* @var $sub_order OrdersItem */
- if ($this->UseTempTables($event) && $next_sub_number == 0) {
+ if ( $this->UseTempTables($event) && $next_sub_number == 0 ) {
$sub_order =& $order;
}
+ else {
+ foreach ( $order->GetFieldValues() as $field => $value ) {
+ $sub_order->SetOriginalField($field, $value);
+ }
+ }
+
$sub_order->SetDBFieldsFromHash($order->GetFieldValues());
$sub_order->SetDBField('SubNumber', $next_sub_number);
$sub_order->SetDBField('SubTotal', $sub_order_data['TotalAmount']);

Event Timeline