post date has no space for collateral
This commit is contained in:
parent
02e6b761b4
commit
ee6746d830
@ -4,7 +4,7 @@ COPY
|
|||||||
(
|
(
|
||||||
SELECT
|
SELECT
|
||||||
r."Schedule#"
|
r."Schedule#"
|
||||||
,to_char(r."PostDate",'mm/dd/yyyy') "Post Date"
|
,to_char(r."PostDate",'mm/dd/yyyy') "PostDate"
|
||||||
,r."Assn#"
|
,r."Assn#"
|
||||||
,r."Coll#"
|
,r."Coll#"
|
||||||
,COALESCE(r."AdvanceRate",0) "AdvanceRate"
|
,COALESCE(r."AdvanceRate",0) "AdvanceRate"
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "date",
|
"type": "date",
|
||||||
"column_name": "Post Date",
|
"column_name": "PostDate",
|
||||||
"path": "{Post Date}"
|
"path": "{PostDate}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "text",
|
"type": "text",
|
||||||
|
@ -4,7 +4,7 @@ SELECT
|
|||||||
WHEN '02IN Raw Material' THEN 13097563.42
|
WHEN '02IN Raw Material' THEN 13097563.42
|
||||||
WHEN '03IN Finished Goods' THEN 35790696.52
|
WHEN '03IN Finished Goods' THEN 35790696.52
|
||||||
ELSE 0
|
ELSE 0
|
||||||
END + SUM("Sales"+"Credits & Adjustments"-"Gross Collections") OVER (PARTITION BY "Schedule#" ORDER BY "Schedule#" ASC, "Post Date" ASC) running_bal
|
END + SUM("Sales"+"Credits & Adjustments"-"Gross Collections") OVER (PARTITION BY "Schedule#" ORDER BY "Schedule#" ASC, "PostDate" ASC) running_bal
|
||||||
,(LEAST("CollateralBalance" - "Ineligible Amount","MaxEligible")*("AdvanceRate"/100))::NUMERIC(20,2) qualified_collateral
|
,(LEAST("CollateralBalance" - "Ineligible Amount","MaxEligible")*("AdvanceRate"/100))::NUMERIC(20,2) qualified_collateral
|
||||||
,(("CollateralBalance" - "Ineligible Amount")*("AdvanceRate"/100))::NUMERIC(20,2) qualified_collateral_nl
|
,(("CollateralBalance" - "Ineligible Amount")*("AdvanceRate"/100))::NUMERIC(20,2) qualified_collateral_nl
|
||||||
FROM
|
FROM
|
||||||
@ -16,4 +16,4 @@ WHERE
|
|||||||
|
|
||||||
ORDER BY
|
ORDER BY
|
||||||
"Schedule#" asc
|
"Schedule#" asc
|
||||||
,r."Post Date" asc
|
,r."PostDate" asc
|
Loading…
Reference in New Issue
Block a user