|  | @@ -19,7 +19,7 @@
 | 
											
												
													
														|  |          on a.id = b.sy_order_data_id
 |  |          on a.id = b.sy_order_data_id
 | 
											
												
													
														|  |          ${ew.customSqlSegment}
 |  |          ${ew.customSqlSegment}
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -            AND (b.inventory_ccode like '19%' or b.inventory_code like 'N19%')
 |  | 
 | 
											
												
													
														|  | 
 |  | +            AND b.inventory_ccode like '19%'
 | 
											
												
													
														|  |          group by concat(a.order_number,a.customer_abbreviation,a.sales_department,a.salesman,a.account,b.pre_delivery_date,a.order_remarks,
 |  |          group by concat(a.order_number,a.customer_abbreviation,a.sales_department,a.salesman,a.account,b.pre_delivery_date,a.order_remarks,
 | 
											
												
													
														|  |          b.item_number,b.small_po,b.inventory_name,b.colour,b.distribution_point,b.pack_id,b.coding_rules)
 |  |          b.item_number,b.small_po,b.inventory_name,b.colour,b.distribution_point,b.pack_id,b.coding_rules)
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -43,7 +43,7 @@
 | 
											
												
													
														|  |          left join sy_order_data a
 |  |          left join sy_order_data a
 | 
											
												
													
														|  |          on a.id = b.sy_order_data_id
 |  |          on a.id = b.sy_order_data_id
 | 
											
												
													
														|  |          ${ew.customSqlSegment}
 |  |          ${ew.customSqlSegment}
 | 
											
												
													
														|  | -            AND (b.inventory_ccode not like '19%' and b.inventory_code not like 'N19%')
 |  | 
 | 
											
												
													
														|  | 
 |  | +            AND b.inventory_ccode not like '19%'
 | 
											
												
													
														|  |           group by concat(a.order_number,a.customer_abbreviation,a.sales_department,a.salesman,a.account,b.pre_delivery_date,a.order_remarks,
 |  |           group by concat(a.order_number,a.customer_abbreviation,a.sales_department,a.salesman,a.account,b.pre_delivery_date,a.order_remarks,
 | 
											
												
													
														|  |          b.item_number,b.small_po,b.inventory_name,b.colour,b.distribution_point,b.pack_id,b.coding_rules)
 |  |          b.item_number,b.small_po,b.inventory_name,b.colour,b.distribution_point,b.pack_id,b.coding_rules)
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -67,7 +67,7 @@
 | 
											
												
													
														|  |  left join sy_shipping_details_item b
 |  |  left join sy_shipping_details_item b
 | 
											
												
													
														|  |  on a.id = b.shipping_details_id and b.del_flag = 0
 |  |  on a.id = b.shipping_details_id and b.del_flag = 0
 | 
											
												
													
														|  |  where a.del_flag = 0
 |  |  where a.del_flag = 0
 | 
											
												
													
														|  | -  AND (b.inventory_ccode like '19%' or b.inventory_ccode like 'N19%')
 |  | 
 | 
											
												
													
														|  | 
 |  | +  AND b.inventory_ccode like '19%'
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  GROUP BY a.document_no,
 |  |  GROUP BY a.document_no,
 | 
											
												
													
														|  |  b.order_number,b.customer_abbreviation,b.sales_department,b.salesman,a.account,b.pre_delivery_date,b.order_remarks,
 |  |  b.order_number,b.customer_abbreviation,b.sales_department,b.salesman,a.account,b.pre_delivery_date,b.order_remarks,
 | 
											
										
											
												
													
														|  | @@ -95,7 +95,7 @@ ${ew.customSqlSegment}
 | 
											
												
													
														|  |  left join sy_shipping_details_item b
 |  |  left join sy_shipping_details_item b
 | 
											
												
													
														|  |  on a.id = b.shipping_details_id and b.del_flag = 0
 |  |  on a.id = b.shipping_details_id and b.del_flag = 0
 | 
											
												
													
														|  |  where a.del_flag = 0
 |  |  where a.del_flag = 0
 | 
											
												
													
														|  | -  AND (b.inventory_ccode not like '19%' and b.inventory_ccode not like 'N19%')
 |  | 
 | 
											
												
													
														|  | 
 |  | +  AND b.inventory_ccode not like '19%'
 | 
											
												
													
														|  |   order by a.document_no desc) as t
 |  |   order by a.document_no desc) as t
 | 
											
												
													
														|  |  ${ew.customSqlSegment}
 |  |  ${ew.customSqlSegment}
 | 
											
												
													
														|  |  
 |  |  
 |