Clear Sales But Not Inventory

I am trying to clear the sales but not inventory from a clients request. For some reason removing all the delete functions for inventory is not working. Is there any way to accomplish this

Script Im Running:

DELETE FROM [TicketEntities]
GO
DELETE FROM [Tickets]
GO
DELETE FROM [AccountTransactionDocuments]
GO
DELETE FROM [AccountTransactions]
GO
DELETE FROM [AccountTransactionValues]
GO
DELETE FROM [Calculations]
GO
DELETE FROM [CostItems]
GO
DELETE FROM [Orders]
GO
DELETE FROM [PaidItems]
GO
DELETE FROM [PeriodicConsumptionItems]
GO
DELETE FROM [PeriodicConsumptions]
GO
DELETE FROM [ProductTimerValues]
GO
DELETE FROM [Payments]
GO
DELETE FROM [WorkPeriods]
GO
UPDATE [Numerators] SET Number = 0
GO
UPDATE [EntityStateValues] SET EntityStates = ‘[{“S”:“Available”,“SN”:“Status”}]’ Where EntityStates like ‘%Status%’
GO

Content Removed From Original Script:

DELETE FROM [InventoryTransactionDocuments]
GO
DELETE FROM [InventoryTransactions]
GO
DELETE FROM [WarehouseConsumptions]
GO

Remove these as well:

DELETE FROM [CostItems]
GO
DELETE FROM [PeriodicConsumptionItems]
GO
DELETE FROM [PeriodicConsumptions]
GO

… and please don’t expect SambaPOS to work without issues. lol.

1 Like

Lol oh really? I thought it was as simple as not clearing inventory to keep that data. This is a basic setup but what kind of issues do you think we might have if you don’t mind me asking? I won’t do it if you think it’s going to cause issues with core functionalities in samba like work period and item reports or Pos transactions or freezing.

It might affect accuracy of Cost Calculations, probably because it uses Account Transactions to determine that, and you are clearing that data.

1 Like

Clearing transactions implemented to clear test data that probably created before going production. By assuming database state stays as generated by SambaPOS we don’t handle cases that relates with partly cleared data. That may or may not cause an issue but having no issue does not mean a future update won’t break this.

2 Likes

Okay I’ll explain that to them. They just wanna know basic inventory quantity for bottled drinks. They’re not using cost features or anything like that.

Also I’m going to leave them at .62 release. I don’t plan on updating them unless I have to for bug fixes. They’re very happy with our current setup. Order grouping/combo is working great for them by the way. They use it A lot!