update POOrderEntry set fentryselfp0263 =(case when fentryselfp0263 is null then 0 else fentryselfp0263 end )+ #{fentryselfp0263, jdbcType=DECIMAL}
where FItemID= #{fitemid,jdbcType=INTEGER} and fentryselfp0262=#{fentryselfp0262,jdbcType=VARCHAR}
update ICSubContractEntry set fdecimal =(case when fdecimal is null then 0 else fdecimal end )+ #{fdecimal, jdbcType=DECIMAL}
where FItemID= #{fitemid,jdbcType=INTEGER} and FOrderNo=#{forderno,jdbcType=VARCHAR}
delete from POInStock
where same_id =#{sameId,jdbcType=VARCHAR}
delete from POInStockEntry
where FInterID in (select FInterID from POInStock where same_id =#{sameId,jdbcType=VARCHAR})
delete from xtyasrs_dual.dbo.InStockbill where FBillNo IN (
select FBillNo from POInStock
where same_id =#{sameId,jdbcType=VARCHAR}
)
delete from xtyasrs_dual.dbo.InStockbillEntry where finterid in (
select finterid from xtyasrs_dual.dbo.InStockbill where FBillNo in(
select FBillNo from POInStockEntry
where FInterID in (select FInterID from POInStock where same_id =#{sameId,jdbcType=VARCHAR})
)
)
update xtyasrs_dual.dbo.InStockbill set fsupplyid =#{fsupplyid, jdbcType=INTEGER}
where finterid= #{FInterID,jdbcType=INTEGER}
update xtyasrs_dual.dbo.InStockbillEntry set fqtypass =#{fqty, jdbcType=DECIMAL}, fqty =#{fqty, jdbcType=DECIMAL}, fauxqty =#{fqty, jdbcType=DECIMAL}, fauxqtypass =#{fqty, jdbcType=DECIMAL}
where FItemID= #{fitemid,jdbcType=INTEGER} and finterid in (
select finterid from xtyasrs_dual.dbo.InStockbill where FBillNo =#{fbillno,jdbcType=VARCHAR}
)
delete from xtyasrs_dual.dbo.InStockbillEntry where finterid in (
select finterid from xtyasrs_dual.dbo.InStockbill where FBillNo =#{fbillno,jdbcType=VARCHAR}
)
and FItemID= #{fitemid,jdbcType=INTEGER}
delete from xtyasrs_dual.dbo.InStockbill where finterid in (
select finterid from xtyasrs_dual.dbo.InStockbill where FBillNo =#{fbillno,jdbcType=VARCHAR}
)