webERP Forum
PO Creation - Varying Results - SOLVED - Printable Version

+- webERP Forum (http://www.weberp.org/forum)
+-- Forum: webERP Discussion (http://www.weberp.org/forum/forumdisplay.php?fid=1)
+--- Forum: Problems / Bugs? (http://www.weberp.org/forum/forumdisplay.php?fid=8)
+--- Thread: PO Creation - Varying Results - SOLVED (/showthread.php?tid=7967)



PO Creation - Varying Results - SOLVED - VortecCPI - 12-09-2017

When making a PO from a Sales Order the address information is written differently to the database as opposed to making a PO from scratch manually.

Specifically, deladd5 is concatenated with deladd6 when creating a PO from a Sales Order and all other deladd fields are shifted to the right one field if looking at the record. If making a PO from scratch manually all deladd fields come in matching the Location deladdr fields.

If you open a PO created from a Sales Order for edit and refresh the location the address fields will update to match a PO made from scratch manually.

Looking into this now...
So I see we are concatenating deladd5 and deladd6 during the insert perhaps to put the Location name in deladd1. While I understand why that is being done to facilitate the PO PDF we should NOT have an inconsistency between the way it is done when making a PO from a Sales Order versus making a PO from scratch manually.

[attachment=602]

[attachment=603]

Does anybody know the genesis of how we got here and what we should do to make it consistent? I don't care for the mismatch on deladd field data so I would prefer it matches but then we have an issue with no Location Name being printed on the invoice PDF if this is fixed.


RE: PO Creation - Varying Results - SOLVED - TimSchofield - 12-10-2017

I am pretty sure Phil wrote the code convert a sales order to a purchase order, so he would be the best person to explain the motives.

Tim


RE: PO Creation - Varying Results - SOLVED - VortecCPI - 12-11-2017

I will share changes in just a bit...


RE: PO Creation - Varying Results - SOLVED - VortecCPI - 12-12-2017

Below are the changes I made to SelectSalesOrder.php:

[attachment=605]

Note I also added Delivery Contact data.


RE: PO Creation - Varying Results - SOLVED - TurboPT - 12-12-2017

Paul,

Can you attach a copy of that script here so that I can diff and commit?
Also, were there any modification(s) applied other scripts to support the change shown?

Thanks,
-PaulT


RE: PO Creation - Varying Results - SOLVED - VortecCPI - 12-12-2017

(12-12-2017, 03:58 AM)TurboPT Wrote: Paul,

Can you attach a copy of that script here so that I can diff and commit?
Also, were there any modification(s) applied other scripts to support the change shown?

Thanks,
-PaulT

I have done a lot of customization to webERP for our needs so I will have to check that for you in just a bit...
(12-12-2017, 04:27 AM)VortecCPI Wrote:
(12-12-2017, 03:58 AM)TurboPT Wrote: Paul,

Can you attach a copy of that script here so that I can diff and commit?
Also, were there any modification(s) applied other scripts to support the change shown?

Thanks,
-PaulT

I have done a lot of customization to webERP for our needs so I will have to check that for you in just a bit...

Only changes are what is addressed above AND Units Conversion issue.

Please see attached file...


RE: PO Creation - Varying Results - SOLVED - TurboPT - 12-12-2017

Oh, ok on the "other customization's", I don't want to commit the SelectSalesOrder.php change if it might impact other areas, that's all.


RE: PO Creation - Varying Results - SOLVED - VortecCPI - 12-12-2017

(12-12-2017, 04:45 AM)TurboPT Wrote: Oh, ok on the "other customization's", I don't want to commit the SelectSalesOrder.php change if it might impact other areas, that's all.

If you have a look at the attached file you can see what I have done and why the Units Conversion was working for POs from Items but not POs from SOs.

The fix also addresses authorization issues (i.e., value too high) due to improper handling of units conversion.
(12-12-2017, 04:45 AM)TurboPT Wrote: Oh, ok on the "other customization's", I don't want to commit the SelectSalesOrder.php change if it might impact other areas, that's all.

If you want to contact me directly you can use

vorteccpi

at

carolina
.rr
.com


RE: PO Creation - Varying Results - SOLVED - TurboPT - 12-12-2017

File committed to SVN.