"INSERT INTO inv_transaction_cost(id,create_by,create_time,update_by,update_time,attribute_category,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,attribute9,attribute10,tx_type_id,tx_source_type_id,tx_action_id,tx_date,tx_unit,source_header_id,source_line_id,inv_id,subinv_id,locator_id,item_id,first_cost,first_quantity,first_amount,tx_quantity,tx_amount,last_quantity,last_amount,last_cost,status,remark) VALUES"+
"INSERT INTO inv_transaction_cost(id,create_by,create_time,update_by,update_time,attribute_category,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,attribute9,attribute10,tx_type_id,tx_source_type_id,tx_action_id,tx_date,tx_unit,source_header_id,source_line_id,inv_id,subinv_id,locator_id,item_id,first_cost,first_quantity,first_amount,tx_quantity,tx_amount,last_quantity,last_amount,last_cost,status,remark) VALUES"+
@Update("UPDATE inv_transaction_cost set tx_quantity=#{tx_quantity},tx_amount=#{tx_amount},last_amount=#{last_amount},last_quantity=#{last_quantity},last_cost=#{last_cost} where id=#{id}")
@Update("UPDATE inv_transaction_cost SET tx_action_id = '2c9f8d286bf8b3de016bfa1012a7008t' WHERE source_header_id = #{headerId} AND source_line_id = #{lineId}")
@Update("UPDATE inv_transaction_cost SET subinv_id=#{subinvId},locator_id=#{locatorId} WHERE source_header_id = #{headerId} AND source_line_id = #{lineId} and inv_id=#{invId} and tx_quantity > 0")
// "update inv_transaction SET tx_quantity = #{quantity} where source_header_id = #{headerId} AND source_line_id = #{lineId} and inv_id=#{invId} and subinv_id= #{subinvId} and source_code ='INVENTORY'" +
@Update("update inv_transaction SET tx_quantity = #{quantity},tx_price = #{price} where id = #{id} and source_code ='INVENTORY'")
"update inv_transaction SET tx_quantity = #{quantity} where source_header_id = #{headerId} AND source_line_id = #{lineId} and inv_id=#{invId} and subinv_id= #{subinvId} and source_code ='INVENTORY'"+
@Select("select * from inv_transaction where source_header_id = #{headerId} AND source_line_id = #{lineId} and tx_quantity < 0 and source_code ='INVENTORY'")
@Select("select * from inv_transaction where source_header_id = #{headerId} AND source_line_id = #{lineId} and tx_quantity < 0 and source_code ='INVENTORY'")