bug: ship to group join was predicated on bill_to customer
This commit is contained in:
parent
ec89d14c91
commit
62473aee92
@ -1,6 +1,6 @@
|
||||
SELECT
|
||||
iterdef->>'user' "user",
|
||||
iterdef->>'stamp' "stamp",
|
||||
(iterdef->>'stamp')::timestamptz "stamp",
|
||||
iterdef->>'mesasage' "comment",
|
||||
round(SUM(fb_val_loc * r_rate)::numeric,2) sales,
|
||||
jsonb_pretty(iterdef) def
|
||||
@ -13,3 +13,5 @@ GROUP BY
|
||||
iterdef->>'stamp',
|
||||
iterdef->>'message',
|
||||
iterdef
|
||||
ORDER BY
|
||||
"stamp" DESC
|
||||
|
@ -581,7 +581,7 @@ FROM
|
||||
LEFT OUTER JOIN LGDAT.CUST BC ON
|
||||
BC.BVCUST = b.BILL_CUST
|
||||
LEFT OUTER JOIN LGDAT.CUST SC ON
|
||||
SC.BVCUST = b.BILL_CUST
|
||||
SC.BVCUST = b.SHIP_CUST
|
||||
LEFT OUTER JOIN RLARP.FFCHNL c ON
|
||||
c.BILL = bc.bvclas
|
||||
AND c.SHIP = sc.bvclas
|
||||
|
Loading…
Reference in New Issue
Block a user