| | |
| | | T1.payment_method, |
| | | DATEDIFF(T1.delivery_date, CURDATE()) AS delivery_days_diff, |
| | | T1.delivery_status AS deliveryStatus, |
| | | T1.order_status AS orderStatus, |
| | | T1.label_print_count AS labelPrintCount, |
| | | T1.document_print_count AS documentPrintCount |
| | | FROM |
| | |
| | | T1.counter_review_person_id AS counterReviewPersonId, |
| | | T1.counter_review_type AS counterReviewType, |
| | | T1.counter_review_desc AS counterReviewDesc, |
| | | T1.order_status AS orderStatus, |
| | | T1.label_print_count AS labelPrintCount, |
| | | T1.document_print_count AS documentPrintCount |
| | | FROM sales_ledger T1 |
| | |
| | | OR T1.review_status IS NULL |
| | | ) |
| | | </if> |
| | | <if test="salesLedgerDto.orderStatus != null"> |
| | | AND T1.order_status = #{salesLedgerDto.orderStatus} |
| | | </if> |
| | | |
| | | <if test="salesLedgerDto.width != null or salesLedgerDto.height != null"> |
| | | AND EXISTS ( |
| | | SELECT 1 |