webERP Forum
Sales Order Item Import - Printable Version

+- webERP Forum (http://www.weberp.org/forum)
+-- Forum: webERP Discussion (http://www.weberp.org/forum/forumdisplay.php?fid=1)
+--- Forum: How To ? (http://www.weberp.org/forum/forumdisplay.php?fid=6)
+--- Thread: Sales Order Item Import (/showthread.php?tid=3303)



Sales Order Item Import - miguelitrojop - 03-09-2017

Hi is there anyway to import the items for a sales order from a .csv We have up to 100 items per sales order and what to speed up the process. We use the quick entry but its still takes to much time. Thank you in advance.


RE: Sales Order Item Import - dalescott - 03-09-2017

The solution might depend on whether the import is one-time, or if you will do it often. Do you expect, for example, 10 orders per day with 100 different items and quantities in each order?

Also, where does the CSV file come from? If this type of sales is something that will be done often, and the order already exists as data (the CSV file), then using the API programmatically might be the ideal solution.


RE: Sales Order Item Import - phil - 03-09-2017

There is no way currently ... would need additional code - would be a nice addition :-)


There are API methods to import orders ... and process into invoices too.
InsertSalesOrderHeader the repeated calls to InsertSalesOrderLine
Then InvoiceSalesOrder



RE: Sales Order Item Import - falkoner - 03-09-2017

(03-09-2017, 02:40 AM)miguelitrojop Wrote: Hi is there anyway to import the items for a sales order from a .csv We have up to 100 items per sales order and what to speed up the process. We use the quick entry but its still takes to much time. Thank you in advance.

Hi Miguel,
It's actually quite easy. Attached is a new version of SelectOrderItems.php which offers you an option to upload a csv file for the order lines. the csv file should just contain 2 columns:

partcode,quantity

It needs some error checking adding in which I can do if this meets your needs. Please test it first

Tim
.


RE: Sales Order Item Import - falkoner - 03-10-2017

For those interested I attach the completed script

thanks
Tim


RE: Sales Order Item Import - phil - 03-11-2017

I've committed it for you
Thanks



RE: Sales Order Item Import - falkoner - 03-11-2017

Thanks Phil, shame about the stupid commit message though. The history of the project will now forever show you using the subversion commit messaging to pursue your personal vendettas. Childish Sad


RE: Sales Order Item Import - phil - 03-12-2017

>committed for Tim - not sure why he didnt commit it himself - improvment to selectorderitems.php to allow import of order line items from a CSV


RE: Sales Order Item Import - falkoner - 03-12-2017

As I said, a childish commit message, as I'm sure everyone agrees.

https://github.com/erlang/otp/wiki/Writing-good-commit-messages

Says nothing about using a commit message to further a personal vendetta. As I have said to you many times Phil, if you want me to commit to your project you need to start by making a proper public apology for the campaign of lies you have waged against me.


RE: Sales Order Item Import - miguelitrojop - 03-14-2017

(03-10-2017, 09:41 PM)falkoner Wrote: For those interested I attach the completed script

thanks
Tim

Thank you for your answer that really helps me