need to spread shipping costs on PO across unit costs

say i am ordering (2) $50.00 items and (2) $100.00 items on a purchase order.

2 x 50.00 = 100.00 2 x 100.00 = 200.00 total = 300.00

The shipping charge for the order is $15.00. I want to take that shipping charge and add it to the cost of the items by dividing it between them as follows:

the two $50.00 items account for 1/3 of the total cost before shipping, so $5.00 of the shipping will get allocated wo the 50.00 items.

100.00 + 5.00 = 105.00 divided by 2 = 52.50. so the new unit cost is $52.50 apply the remaining $10.00 shipping charges to the other item the same way.

is there any way i can automate this using the savepurchaseorder hook? Is there a session class that will allow me to read/write any of this information on the header tab and the contents tab of the purchase order, and if so what is the class name?

I looked in the CG and couldn't find anything there

Thank you, Kevin

Reply to
kskinne
Loading thread data ...

Thanks Antonio, I think Gateway is probably the way I will need to go with this. Only problem with that is there is very little documentation on the Gateway object in the CG. My other option would be a trigger perhaps. What tables in the SQL database get inserted into when a PO is saved?

Thanks, Kevin

"Ant>

Reply to
kskinne

"kskinne" ha scritto nel messaggio news: snipped-for-privacy@microsoft.com...

No, we have only a Gateway class that allow to get/post data into db. Gateway class have a method to get/set Purchase Order Header and entry.. but I haven't a COM explorer program to look into QSRules. Find PO_ methods

antonio

Reply to
Antonio Mazzeo

I think that trigger isn't a good solution.. because trigger must be modified for new release of RMS. Today RMS use @@IDENTITY variable to get the primary key of tables.. and @@IDENTITY is a global variable modified from trigger,stored,query... and with a trigger you must consider also these problems.. or RMS crash :) while with hook rms run software on specified event.. without problems.

The tables of PO, Inventory Transfer IN/OUT are PurchaseOrder for header/footer PurchaseOrderEntry details (items) PurchaseOrderEntryDetail details of rows ..

bye antonio

Reply to
Antonio Mazzeo

BeanSmart website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.