| | |
| | | p.product_name, |
| | | pm.model as specification_model, |
| | | slp.tax_rate, |
| | | sor.stock_out_num * slp.tax_inclusive_unit_price as outboundAmount, |
| | | sor.stock_out_num * slp.tax_inclusive_unit_price / IFNULL(NULLIF(slp.single_quantity, 0), 1) as outboundAmount, |
| | | s.shipping_no, |
| | | sl.sales_contract_no |
| | | FROM stock_out_record sor |
| | |
| | | <select id="existsByStockOutRecordId" resultType="java.lang.Boolean"> |
| | | SELECT COUNT(*) > 0 |
| | | FROM account_invoice_application |
| | | WHERE status!=2 |
| | | <foreach collection="stockOutRecordIds" item="id" open="(" separator=" OR " close=")"> |
| | | FIND_IN_SET(#{id}, stock_out_record_ids) |
| | | WHERE status != 2 |
| | | AND ( |
| | | <foreach collection="stockOutRecordIds" item="id" separator=" OR "> |
| | | FIND_IN_SET(#{id}, stock_out_record_ids) > 0 |
| | | </foreach> |
| | | ) |
| | | </select> |
| | | |
| | | </mapper> |