Fix to SQL mapping on S lines of receipts.
parent
30e028609c
commit
4e55415475
|
@ -85,15 +85,20 @@ DETAIL_STATEMENT = """
|
||||||
"""
|
"""
|
||||||
|
|
||||||
SUBDETAIL_STATEMENT = """
|
SUBDETAIL_STATEMENT = """
|
||||||
select distinct
|
select
|
||||||
[S]
|
'S' [S],
|
||||||
,[sta]
|
'A' [sta],
|
||||||
,[pcu]
|
[STJ].[PCU_0] [pcu],
|
||||||
,[qtypcu]
|
cast(cast(-1*[STJ].[QTYSTU_0] as int) as nvarchar) [qtypcu],
|
||||||
,[lot]
|
[STJ].[LOT_0] [lot],
|
||||||
,[bpslot]
|
'' [bpslot],
|
||||||
,[sernum]
|
'' [sernum]
|
||||||
from [staging].[dbo].[shandex_receipt_details]
|
from [staging].[dbo].[shandex_receipt_details]
|
||||||
|
left join x3.PROD.STOJOU STJ
|
||||||
|
on STJ.VCRNUM_0 = [shandex_receipt_details].sdhnum
|
||||||
|
and STJ.ITMREF_0 = [shandex_receipt_details].itmref
|
||||||
|
and STJ.LOT_0 = [shandex_receipt_details].lot
|
||||||
|
and STJ.VCRLIN_0 = [shandex_receipt_details].sddlin
|
||||||
where sdhnum = :sdhnum
|
where sdhnum = :sdhnum
|
||||||
and itmref = :itmref
|
and itmref = :itmref
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue