You are not logged in.
Recent posts |
|||
Current Status |
Amazon token issues |
Registering a user account |
Latest update for all users:
|
Recent History |
PayPal Checkout Cookies |
Amazon Shipping VTR |
Pages: 1
I use Package to determine if I need to send an item as Large Letter or Parcel
Can I access Package in Script? If so, where is it held? I cannot find the appropriate field in the structure
Offline
It's in Record.Invoice.Items(n).Package
Offline
Thanks - but I'm after the overall Package Total of the order not the individual Package Value of a particular item.
Basically, I set Package to a value less than 1 if the item is Large Letter. If I can get 2 items in before the package goes from a Large Letter to a Parcel I use a value of 0.49. If I can get 4 items in I set Package to a value of 0.24, etc.
So I am trying to figure out the overall Package total of the order to determine if the parcel size is Large Letter or Parcel (i.e. the Package value as it appears on the main screen for the order)
Offline
In script you'd have to get that total yourself, for example like this:
'Pass items array into function to get total package back
Dim Package As Decimal = GetTotalPackage(Record.Invoice.Items)
Function GetTotalPackage(Items() As ItemStruct)
Dim Package As Decimal
For Each Item As ItemStruct In Items
Package += (Item.Package * Item.Quantity)
Next
Return Package
End Function
Offline
Pages: 1