Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F2111852
D187.id454.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
Wed, Nov 18, 12:38 PM
Size
3 KB
Mime Type
text/x-diff
Expires
Thu, Nov 19, 12:38 PM (12 h, 26 m)
Engine
blob
Format
Raw Data
Handle
993385
Attached To
D187: MINC-143 - Use table aliases in "ord" unit calculated fields
D187.id454.diff
View Options
Index: modules/in-commerce/units/orders/orders_config.php
===================================================================
--- modules/in-commerce/units/orders/orders_config.php
+++ modules/in-commerce/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