How to build a department report using Custom Report?

Please help me, this is so critical to my business, I have 18 departments and It’s important to view item sales report per department. How can it done using Custom Report module?

There is a sample here for preparing a payments report for departments .

I thought preparing an additional section for each department will be handy as you’ll be able to order, format them as you want however as you have 18 departments (wow) it might be a little hard to prepare. I’ll think about a better syntax for that.

If you give some more details about what you need to see in department report I can prepare one for you.

I have many stores around the city, they are chains, selling specialty local goods. All stores connect to a server running mssql 2012 at main office. I think the default Work Period Report and Item Sale Report are perfect but lacking of department filter. Because we’re selling same products in all stores, it’s impossible to know how the item sale going on for each department. Also, it should be nice if it’s possible to let the viewers only view departments they are allowed to view.

You can map specific entity screens to Users and put specific custom reports on those screens. You do this through Departments and User Roles So you map a user role that can only view one specific department. You make an entity screen mapped to that department only and you put a custom report widget on that screen that only pulls that departments sales.

I built seperate accout types, payment types, ticket types almost everything for each departments except customer list is the same for all. It seems like this Sale Report grouped by Department is the very last issue that need to pass.

Sorry if this is off topic:

If you could share more of your setup others may be interested. You are using it as a multi site central office type system which is not really what it was designed for. But if you got it working others may be interested and learn from it. I would love to see how you got this working.

Yeah, sure, let’s me try to give a brief about what I did with the setup and the idea around.

As I said, I have 18 stores selling same products. On the other hand, I’m also running 5 different restaurants with different cuisines. And I’m building the system for my restaurants first. These were what I want to accomplish:

  1. Same server and database
  2. Same customer data, loyalty points to spend anywhere my customers want to.
  3. Seperate everything else include product, menu, accounts, tables… everything.

I started using a default sambapos setting and twisting it. I categorized everything with prefix-code. For example:

Account Types (act): (Sorry if this is not exactly the same, I transaled account type name into my language)

  • actReceivable
    – acONDL10Receivable
    – acORDL10Receivable
  • actSales
    – acONDL10Sale
    – acORDL10Sale
  • actPayments
    – acONDL10Cash
    – acONDL10Card
    – acONDL10Voucher
    – acONDL10Point
    – acORDL10Cash
    – acORDL10Card
    – acORDL10Voucher
    – acORDL10Point

ac prefix stands for Account, act stand for Account Type, I need to put prefix everywhere so that when I’m getting deeper into transactions types and stuff I always know the origin of what I’m choosing. 2 first letters is restaurant ID, next 2 letters is location ID, next 2 numbers is count of the restaurant in the location (I may have ONDL10, ONDL11, ONDL12…).

Like above example, I start to setup everything else like printers, printers template, warehouse, ticket types, payment types, finally I have my very seperate department in a same sambapos.

Aftter that, I have my server on with the database, then, I let sambapos clients connect directly to the server through internet.

Possible issue can happen when connection unstable, I’m also hoping for a batch processing work-flow, rather than real-time processing, maybe later. I’m sorry if it’s not clear enough, middle here for me, and to make it short, I was like make another sambapos default setting in a same sambapos with clearer and structural naming.

interesting work flow. I think the Batch process might be coming in future updates. I think they are planning to include multi site setups probably as a module. So it would probably not work with your current setup. But that is very cool how you are doing this setup.

Yeah I hope you have a very reliable internet connection. That could drop your entire system for EVERY store.

A possible work around could be installing some local databases on the POS themselves at each site. These would be for offline use only incase you lose connection to your main DB. You can make rules and actions that switch it to this database automatically.

This would of course cause some issues with your accounting and reporting because it would separate it. So you would have to figure out a way to merge it.

When there’re many stores, it’s urgent to have a good report system or it’ll be a huge job for accountants to do.

I also install local database on each POS as you said in case of urgent, but so far so good, I also have UPS, power generator and stuff ready all of the time.

The idea if switching between database offline and online sounds so cool.

I think if each transactions generate a random ID, but somehow still be able to sort (not that important because we have date data). And a way to merge transactions data, that’ll be a very very best case.

Each transaction does generate a unique ID I am currently using that ID for a refund system. it is {TICKET ID}

{TICKET ID} is not generated until ticket is closed.

It generates it in succession 1,2,3 etc. You can tie {TICKET ID} to Departments But to use it how you are thinking would not be possible… because it would still be possible for SAME {TICKET ID} to generate on 2 separate systems.

When {TICKET ID} goes up by order 1, 2 ,3 ,4… it’ll be hard to create batch processing system, 'cause when we merge data, we’ll got duplicate {TICKET ID} error. People might have 2 or more sambapos clients in 1 location. (No no, I’m a bit wrong here… I think, my head is dark like ink now, I mean there’s a possibility of duplicate ID if ID goes 1, 2 ,3 ,4 rather than random)

Right now it would be impossible to truly merge data… the system I mentioned them developing will probably run completely different than it does now.

Basically what you are attempting to do is not possible with Samba right now. It was not built to support this. You have developed a Sort of Work around but it will never truely work with Batch processing.

You’re right kendash, I have to put my trust into my network connection. It’s lucky for me, there’s still a way around for my system. All I need now is a report for each department. :smile: Good night, good night, 2 AM for me now.

Good night. It is pretty cool to see someone doing this. If you have a strong internet connection like a T1 line or something dedicated it wouldn’t be so bad.