Expression to pull alternate Supplier Part nos
Posted: 12 Feb 2018, 08:17
<r>Hi Bruce, <br/>
<br/>
I've just been reading this post from a while back<br/>
<URL url="viewtopic.php?f=14&t=3073&hilit=ALTERNA ... <LINK_TEXT text="viewtopic.php?f=14&t=3073&hilit=ALTERNATE+SUPPLIER">viewtopic.php?f=14&t=3073&hilit=ALTERNA ... </URL><br/>
<br/>
and thought some of this could be what i need but would just like to check to see if my thinking is right.<br/>
<br/>
I've been wrangling with how to get around the fact that we can use alternate suppliers for the same product. <br/>
Sage 50 v24 windows platform.<br/>
<br/>
So, my setup is briefly, In the product record we use the PRODUCT CODE field for our own generated "Part number of material number if you will", the supplier account is our primary supplier, and the part no field is the suppliers part no.<br/>
In the web tab i have used webcat2 and 3, to list Alt Supp and Alt Part (if we have one)<br/>
I've managed to work the Purchase order we send out to show the suppliers part number and remove our product code. <br/>
<br/>
So if the following is true<br/>
PURCHASE_ORDER.ACCOUNT_REF = STOCK.WEB_CATEGORY_2 ? STOCK.WEB_CATEGORY_3 : STOCK.SUPPLIER_PART_NUMBER<br/>
<br/>
If the account we place the purchase order on is the same as the Alternate account then show the alternate part number, if not show the primary part number from the product record.<br/>
<br/>
I've used the "=" check, because their could be two states of the alternate STOCK.WEB_CATEGORY_2 field, as in, it's either filled in or it's blank.<br/>
If i'd have started with "<>" not equals, i would just switch the last two conditions around.<br/>
<br/>
So, like this it appears to work , however, there are cases where we can use upto 4 or 5 suppliers for the same part. Soooo, I thought i could utilise the Comment 1 field from the purchase order.<br/>
<br/>
So, we can order a Stock Item that's attached to a primary supplier and then resource that to say a 3rd alternate by putting their part number into the comment 1 line. the account used will be where we want to purchase from, we can pull "our product code" into the purchase order. We don't want to use the "WEB_CATEGORY" alternates, because say they have no stock. So, then i hit the expression issue.<br/>
<br/>
How do i construct the expression to go - Does your supplier purchase order match a known alternate in the product record ? - No - Then don't print the Primary stock code, ignore the alternate field and print the value in comment 1.<br/>
Also, bearing in mind that if the order has selected it's primary part no, ignore all the above and just print that.</r>
So my working expression looks like this so far
PURCHASE_ORDER.ACCOUNT_REF = STOCK.WEB_CATEGORY_2 ? STOCK.WEB_CATEGORY_3 : STOCK.WEB_CATEGORY_3 = "" ? POP_ITEM.COMMENT_1 : STOCK.SUPPLIER_PART_NUMBER
Now i know it's not quite right as i cannot pull through the primary part numbers when the first condition is False.
I'm looking into "or" as part of the solution but this would be my first time using something like this.
Any tips would be as always greatly appreciated.
Thanks
Paul
<br/>
I've just been reading this post from a while back<br/>
<URL url="viewtopic.php?f=14&t=3073&hilit=ALTERNA ... <LINK_TEXT text="viewtopic.php?f=14&t=3073&hilit=ALTERNATE+SUPPLIER">viewtopic.php?f=14&t=3073&hilit=ALTERNA ... </URL><br/>
<br/>
and thought some of this could be what i need but would just like to check to see if my thinking is right.<br/>
<br/>
I've been wrangling with how to get around the fact that we can use alternate suppliers for the same product. <br/>
Sage 50 v24 windows platform.<br/>
<br/>
So, my setup is briefly, In the product record we use the PRODUCT CODE field for our own generated "Part number of material number if you will", the supplier account is our primary supplier, and the part no field is the suppliers part no.<br/>
In the web tab i have used webcat2 and 3, to list Alt Supp and Alt Part (if we have one)<br/>
I've managed to work the Purchase order we send out to show the suppliers part number and remove our product code. <br/>
<br/>
So if the following is true<br/>
PURCHASE_ORDER.ACCOUNT_REF = STOCK.WEB_CATEGORY_2 ? STOCK.WEB_CATEGORY_3 : STOCK.SUPPLIER_PART_NUMBER<br/>
<br/>
If the account we place the purchase order on is the same as the Alternate account then show the alternate part number, if not show the primary part number from the product record.<br/>
<br/>
I've used the "=" check, because their could be two states of the alternate STOCK.WEB_CATEGORY_2 field, as in, it's either filled in or it's blank.<br/>
If i'd have started with "<>" not equals, i would just switch the last two conditions around.<br/>
<br/>
So, like this it appears to work , however, there are cases where we can use upto 4 or 5 suppliers for the same part. Soooo, I thought i could utilise the Comment 1 field from the purchase order.<br/>
<br/>
So, we can order a Stock Item that's attached to a primary supplier and then resource that to say a 3rd alternate by putting their part number into the comment 1 line. the account used will be where we want to purchase from, we can pull "our product code" into the purchase order. We don't want to use the "WEB_CATEGORY" alternates, because say they have no stock. So, then i hit the expression issue.<br/>
<br/>
How do i construct the expression to go - Does your supplier purchase order match a known alternate in the product record ? - No - Then don't print the Primary stock code, ignore the alternate field and print the value in comment 1.<br/>
Also, bearing in mind that if the order has selected it's primary part no, ignore all the above and just print that.</r>
So my working expression looks like this so far
PURCHASE_ORDER.ACCOUNT_REF = STOCK.WEB_CATEGORY_2 ? STOCK.WEB_CATEGORY_3 : STOCK.WEB_CATEGORY_3 = "" ? POP_ITEM.COMMENT_1 : STOCK.SUPPLIER_PART_NUMBER
Now i know it's not quite right as i cannot pull through the primary part numbers when the first condition is False.
I'm looking into "or" as part of the solution but this would be my first time using something like this.
Any tips would be as always greatly appreciated.
Thanks
Paul