| | |
| | | tr.iss_uer, |
| | | tr.id as ticketRegistrationId, |
| | | ROUND(pr.tickets_amount/(1+pr.tax_rate/100),2 ) as un_tickets_price, |
| | | ROUND(pr.tickets_amount-pr.tickets_amount/(1+pr.tax_rate/100),2 )as invoice_amount |
| | | ROUND(pr.tickets_amount-pr.tickets_amount/(1+pr.tax_rate/100),2 ) as invoice_amount |
| | | FROM product_record pr |
| | | left join purchase_ledger pl on pl.id = pr.purchase_ledger_id |
| | | left join sales_ledger sl on sl.id = pl.sales_ledger_id |
| | |
| | | <if test="c.createdAtStart != null and c.createdAtStart != ''"> |
| | | and pr.created_at >= str_to_date(#{c.createdAtStart}, '%Y-%m-%d') |
| | | </if> |
| | | <if test="c.invoiceAmount != null"> |
| | | and pr.tickets_amount like concat('%',#{c.invoiceAmount},'%') |
| | | </if> |
| | | <if test="c.createdAtEnd != null and c.createdAtEnd != ''"> |
| | | and pr.created_at < date_add(str_to_date(#{c.createdAtEnd}, '%Y-%m-%d'), interval 1 day) |
| | | </if> |