Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F727149
D59.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Jan 6, 7:51 AM
Size
892 B
Mime Type
text/x-diff
Expires
Tue, Jan 7, 7:51 AM (3 d, 2 h ago)
Engine
blob
Format
Raw Data
Handle
537203
Attached To
D59: MINC-122 - Set sub-order original fields during split
D59.diff
View Options
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
Log In to Comment