Sales Report days-monthly for v4

hello sir
i want sale report monthly like below

Day Ticket Sales Discount Round Tax Total Cash Credit
27/09/2015 353,000.00 (12,700.00) 670.00 34,040.00 375,000.00 269,000.00 105,000.00
28/09/2015 253,000.00 (52,700.00) 770.00 24,040.00 575,000.00 569,000.00 205,000.00

your version 5 is elagble but i want in v4 like https://forum.sambapos.com/uploads/default/optimized/2X/0/0ce75976885835c8f4a94847e7b545f67ed8ae0e_1_690x448.png

so how i can create this in custom report ???

I think you mean that report.

Unfortunately that example uses some expression features that implemented for V5.

If you know how to write SQL scripts you can create any report you want by using SQL and V4 custom reports. As an example I wrote this SQL script for you. You can customize it for your setup.

SELECT 
  T.TicketNumber,
  min(convert(nvarchar,T.Date,105)) as Date,    
  min(convert(nvarchar,T.Date,108)) as Time,
  sum(case when Cal.Name = 'Discount' then Cal.CalculationAmount else 0 end) as Discount,  
  sum(case when Cal.Name = 'Round' then Cal.CalculationAmount else 0 end) as Round, 
  min(T.TotalAmount)-sum(Cal.CalculationAmount) as NetTicket,
  min(T.TotalAmount) as TotalTicket,
  sum(case when Pay.Name = 'Cash' then Pay.Amount else 0 end) as Cash,
  sum(case when Pay.Name = 'Credit Card' then Pay.Amount else 0 end) as CreditCard

FROM Tickets AS T
LEFT OUTER JOIN Calculations as Cal on Cal.TicketId = T.Id
LEFT OUTER JOIN Payments as Pay on Pay.TicketId = T.Id

WHERE Date > '{Start}' and Date < '{End}'
GROUP BY T.TicketNumber
ORDER BY Date,Time

However if you don’t know SQL and want to create additional reports that uses V5 custom report syntax you can consider upgrading to V5. Besides custom reporting features it have lots of great features.

1 Like