Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1102410
D187.id565.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
Tue, Aug 19, 12:18 AM
Size
2 KB
Mime Type
text/x-diff
Expires
Wed, Aug 20, 12:18 AM (12 h, 14 m)
Engine
blob
Format
Raw Data
Handle
714165
Attached To
D187: MINC-143 - Use table aliases in "ord" unit calculated fields
D187.id565.diff
View Options
Index: branches/5.2.x/units/orders/orders_config.php
===================================================================
--- branches/5.2.x/units/orders/orders_config.php
+++ branches/5.2.x/units/orders/orders_config.php
@@ -262,11 +262,11 @@
'' => Array (
'CustomerName' => 'IF( ISNULL(u.Username), IF (%1$s.PortalUserId = ' . USER_ROOT . ', "root", IF (%1$s.PortalUserId = ' . USER_GUEST . ', "Guest", "n/a")), CONCAT(u.FirstName," ",u.LastName) )',
'Username' => 'IF( ISNULL(u.Username),"root",IF(u.Username = "", u.Email, u.Username))',
- 'OrderNumber' => 'CONCAT(LPAD(Number,6,"0"),\'-\',LPAD(SubNumber,3,"0") )',
- 'SubtotalWithoutDiscount' => '(SubTotal + DiscountTotal)',
- 'SubtotalWithDiscount' => '(SubTotal)',
- 'AmountWithoutVAT' => '(SubTotal+IF(ShippingTaxable=1, ShippingCost, 0)+IF(ProcessingTaxable=1, ProcessingFee, 0)-IF(VATIncluded=1,VAT,0))',
- 'TotalAmount' => 'SubTotal+ShippingCost+IF(VATIncluded=1,0,VAT)+ProcessingFee+InsuranceFee-GiftCertificateDiscount',
+ 'OrderNumber' => 'CONCAT(LPAD(%1$s.Number,6,"0"),\'-\',LPAD(%1$s.SubNumber,3,"0") )',
+ 'SubtotalWithoutDiscount' => '(%1$s.SubTotal + %1$s.DiscountTotal)',
+ 'SubtotalWithDiscount' => '(%1$s.SubTotal)',
+ 'AmountWithoutVAT' => '(%1$s.SubTotal+IF(%1$s.ShippingTaxable=1, %1$s.ShippingCost, 0)+IF(%1$s.ProcessingTaxable=1, %1$s.ProcessingFee, 0)-IF(%1$s.VATIncluded=1,%1$s.VAT,0))',
+ 'TotalAmount' => '%1$s.SubTotal+%1$s.ShippingCost+IF(%1$s.VATIncluded=1,0,%1$s.VAT)+%1$s.ProcessingFee+%1$s.InsuranceFee-%1$s.GiftCertificateDiscount',
'CouponCode' => 'pc.Code',
'CouponName' => 'pc.Name',
'AffiliateUser' => 'IF(au.PortalUserId IS NULL, "!la_None!", IF(au.Username = "", au.Email, au.Username))',
@@ -277,11 +277,11 @@
),
'myorders' => Array (
- 'OrderNumber' => 'CONCAT(LPAD(Number,6,"0"),\'-\',LPAD(SubNumber,3,"0") )',
- 'SubtotalWithoutDiscount' => '(SubTotal + DiscountTotal)',
- 'SubtotalWithDiscount' => '(SubTotal)',
- 'AmountWithoutVAT' => '(SubTotal+IF(ShippingTaxable=1, ShippingCost, 0)+IF(ProcessingTaxable=1, ProcessingFee, 0)-IF(VATIncluded=1,VAT,0))',
- 'TotalAmount' => 'SubTotal+ShippingCost+IF(VATIncluded=1,0,VAT)+ProcessingFee+InsuranceFee-GiftCertificateDiscount',
+ 'OrderNumber' => 'CONCAT(LPAD(%1$s.Number,6,"0"),\'-\',LPAD(%1$s.SubNumber,3,"0") )',
+ 'SubtotalWithoutDiscount' => '(%1$s.SubTotal + %1$s.DiscountTotal)',
+ 'SubtotalWithDiscount' => '(%1$s.SubTotal)',
+ 'AmountWithoutVAT' => '(%1$s.SubTotal+IF(%1$s.ShippingTaxable=1, %1$s.ShippingCost, 0)+IF(%1$s.ProcessingTaxable=1, %1$s.ProcessingFee, 0)-IF(%1$s.VATIncluded=1,%1$s.VAT,0))',
+ 'TotalAmount' => '%1$s.SubTotal+%1$s.ShippingCost+IF(%1$s.VATIncluded=1,0,%1$s.VAT)+%1$s.ProcessingFee+%1$s.InsuranceFee-%1$s.GiftCertificateDiscount',
/*'ItemsCount' => 'COUNT(%1$s.OrderId)',*/
'ShippingSubTotal' => '%1$s.ShippingCost + %1$s.InsuranceFee',
),
Event Timeline
Log In to Comment