I am getting on very well with my EPoS application but I am not sure how to do the following thing....
at the moment I am saving every item individually to a temp file so the file would look like this
Code: Select all
1,I,50201600,2,0.35,0.70
Code: Select all
1,IV,50201600,1,0.35,0.35
CREAME EGG
2 @ £0.35 £0.70
**Item Voided **
CREAM EGG -£0.35
Ideally I would like it just to show
CREAME EGG £0.35
In the Windows Version I am using a listarray and below is the code I am using (.net)
Code: Select all
Imports algPoSMultisavers (this is my custom write mutlisaver module that I need to some how convert to Gambas)
Public Class ReceiptData
Inherits List(Of LineItem)
Private _transactionId As Integer = 0
Public Sub New()
End Sub
Public Shadows ReadOnly Property Count() As Integer
Get
Return (MyBase.Count)
End Get
End Property
Default Public Shadows Property Item(ByVal anIndex As Integer) As LineItem
Get
Return (MyBase.Item(anIndex))
End Get
Set(ByVal value As LineItem)
MyBase.Item(anIndex) = value
End Set
End Property
Public Shadows Function Add(ByVal anItem As LineItem) As Integer
_transactionId += 1
anItem.TransactionIDNumber = _transactionId
MyBase.Add(anItem)
MultisaversComponent.OnProductAdded(anItem.TransactionIDNumber, New MultisaverProduct(anItem.ItemBarcodeNumber, anItem.Line1, SaleLocation_Main, anItem.LinePrice), anItem.QtySold, Now(), CBool(PriceOverrideValue > 0))
Return (_transactionId)
End Function
Public Shadows Sub Remove(ByVal anItem As LineItem)
Debug.Print("Item removed from receipt by reference.")
MyBase.Remove(anItem)
End Sub
Public Shadows Sub RemoveAt(ByVal anIndex As Integer)
Debug.Print("Item removed from receipt by index.")
MyBase.RemoveAt(anIndex)
End Sub
Public Shadows Sub Clear()
MyBase.Clear()
MultisaversComponent.Reset()
UpdateMSData()
_transactionId = 0
End Sub
End Class
and when I sell a item I add it like this
Code: Select all
RecData.Add(New LineItem(ItemType, RecData.Count, ItembarcodeNumber, Line1, Line2, Line3, Line4, LineTotal, LinePrice, VATCode, LocalLineNumber, LocalQtySold, "", 0, "", 0, 0, SaleLocationNumber))
I also use this to create the recipit that the system prints.
any advise is most welcome as I am not sure what aproach to take with this.