|
|
|
@ -51,9 +51,23 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="searchBoxData" resultType="SoReceiveBoxesData"> |
|
|
|
select a.id,a.site,a.bu_no,a.box_no,a.order_no,[status],rolls_qty,box_type,c_in_stock_flag,created_date,created_by, |
|
|
|
version,WareHouseID |
|
|
|
select |
|
|
|
a.id, |
|
|
|
a.site, |
|
|
|
a.bu_no, |
|
|
|
a.box_no, |
|
|
|
a.order_no, |
|
|
|
a.status, |
|
|
|
a.rolls_qty, |
|
|
|
a.box_type, |
|
|
|
a.c_in_stock_flag, |
|
|
|
a.created_date, |
|
|
|
a.created_by, |
|
|
|
a.version, |
|
|
|
a.WareHouseID, |
|
|
|
b.std_packing_qty as stdPackingQty |
|
|
|
from so_receive_boxes a |
|
|
|
left join outbound_notification_detail b on a.site = b.site and a.bu_no = b.bu_no and a.order_no = b.order_no |
|
|
|
where a.site= #{site} and a.box_no= #{boxNo} and a.bu_no= #{buNo} |
|
|
|
</select> |
|
|
|
<delete id="deleteSoReceiveBoxesData"> |
|
|
|
@ -332,7 +346,8 @@ |
|
|
|
THEN ROUND(b.required_qty - ISNULL(SUM(e.roll_qty), 0), 3) |
|
|
|
ELSE 0 |
|
|
|
END as unScanQty , |
|
|
|
ISNULL(SUM(i.qty_on_hand), 0) as availableStock |
|
|
|
ISNULL(SUM(i.qty_on_hand), 0) as availableStock, |
|
|
|
b.std_packing_qty |
|
|
|
FROM outbound_notification_head a |
|
|
|
LEFT JOIN Customer c ON a.site = c.site AND a.customer_id = c.CustomerID |
|
|
|
LEFT JOIN outbound_notification_detail b ON a.site = b.site AND a.bu_no = b.bu_no AND a.order_no = b.order_no |
|
|
|
@ -379,7 +394,7 @@ |
|
|
|
a.archived_by, a.archived_date, a.orderref1, a.orderref2, a.orderref3, a.orderref4, a.orderref5, |
|
|
|
a.order_date, a.close_flag, a.out_warehouse, a.customer_order_no, a.show_in_query_flag, |
|
|
|
b.part_no, b.part_desc, b.unit, b.required_qty, b.out_warehouse, b.out_batch_no, b.order_qty, |
|
|
|
b.related_order_no, b.related_order_line_no |
|
|
|
b.related_order_no, b.related_order_line_no, b.std_packing_qty |
|
|
|
ORDER BY a.created_date DESC, b.part_no |
|
|
|
</select> |
|
|
|
|
|
|
|
|