Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PO Creation - Varying Results - SOLVED
12-09-2017, 02:53 AM (This post was last modified: 12-09-2017 04:34 AM by VortecCPI.)
Post: #1
PO Creation - Varying Results - SOLVED
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.

   

   

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.

https://www.linkedin.com/in/eclipsepaulbecker
Visit this user's website Find all posts by this user
Quote this message in a reply
12-10-2017, 08:34 AM
Post: #2
RE: PO Creation - Varying Results - SOLVED
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
Visit this user's website Find all posts by this user
Quote this message in a reply
12-11-2017, 10:42 PM
Post: #3
RE: PO Creation - Varying Results - SOLVED
I will share changes in just a bit...

https://www.linkedin.com/in/eclipsepaulbecker
Visit this user's website Find all posts by this user
Quote this message in a reply
12-12-2017, 12:36 AM (This post was last modified: 12-12-2017 12:36 AM by VortecCPI.)
Post: #4
RE: PO Creation - Varying Results - SOLVED
Below are the changes I made to SelectSalesOrder.php:

   

Note I also added Delivery Contact data.

https://www.linkedin.com/in/eclipsepaulbecker
Visit this user's website Find all posts by this user
Quote this message in a reply
12-12-2017, 03:58 AM (This post was last modified: 12-12-2017 04:00 AM by TurboPT.)
Post: #5
RE: PO Creation - Varying Results - SOLVED
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
Find all posts by this user
Quote this message in a reply
12-12-2017, 04:27 AM (This post was last modified: 12-12-2017 04:45 AM by VortecCPI.)
Post: #6
RE: PO Creation - Varying Results - SOLVED
(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...


Attached File(s)
.php  SelectSalesOrder.php (Size: 42.23 KB / Downloads: 3)

https://www.linkedin.com/in/eclipsepaulbecker
Visit this user's website Find all posts by this user
Quote this message in a reply
12-12-2017, 04:45 AM
Post: #7
RE: PO Creation - Varying Results - SOLVED
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.
Find all posts by this user
Quote this message in a reply
12-12-2017, 04:51 AM (This post was last modified: 12-12-2017 04:56 AM by VortecCPI.)
Post: #8
RE: PO Creation - Varying Results - SOLVED
(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

https://www.linkedin.com/in/eclipsepaulbecker
Visit this user's website Find all posts by this user
Quote this message in a reply
12-12-2017, 07:03 AM
Post: #9
RE: PO Creation - Varying Results - SOLVED
File committed to SVN.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)