New item from menu

Layout: All

Card window: Menu

When adding a new item record, the process did not automatically create the necessary Quantity record for the total of all warehouses for that item.

On Order Quantity for new PO from Item

Layout: Item | Purchase Order

The On Order quantity was not updating when:

  1. a new item was created
  2.  a PO was created from the Item layout

(This is using the Create PO button on the bottom right of the Item layout.)

Two scripts were altered: 

  1.     select warehouse ID based on warehouse name
  2.     set the balance quantity fields (parameters)

Modifications to select warehouse ID… was necessary to fix the bug.  Modifications to set the balance… is precautionary.

See log at bottom of those scripts for details.

Pick History Button

Layout: Sales Order | Button: More.../Pick History

Button pointed to “display receipt history for order” instead of “display pick history for order”. 

Script: “display pick history for order” pointed to the Receipt History layout instead of the Pick History layout.  Likewise, the single search criteria was

Set Field [ RECEIPT::orderID ; $orderID ]

Instead of 

Set Field [ PICK::orderID ; $orderID ]

Custom dialog at the end of the script was also updated.

JSON Trigger

Layout: Purchase Order | Field: Vendor

Script trigger passes a JSON object with a misspelled key (“Compnay Type” should be “Company Type”).

JSONSetElement ( 
  "" ; 
  ["Compnay Type" ; "Vendor" ; JSONString] ;
  ["Window Top" ; 160 ; JSONNumber]
)

Should be

JSONSetElement ( 
  "" ; 
  ["Company Type" ; "Vendor" ; JSONString] ;
  ["Window Top" ; 160 ; JSONNumber]
)

Note: Thanks to Humberto Becerra for finding this.

Primary Vendor

Layout: Item, Item Vendor Card Window

Adding a single vendor did not mark that vendor as the primary vendor.

Modified script so that the first vendor added is marked as the primary vendor.  Otherwise, an item with a single vendor will not have a primary vendor.

$$itemID for ITEMVENDOR table

Layout: Item, Item Vendor Card Window

When deleting a vendor in the Item Vendor card window, the global variable $$itemID was cleared. This prevented the item ID from setting in the ITEMVENDOR table if the user added a new vendor while the card window was still open.  (Closing and reopening the card window re-set the $$itemID.)  $$itemID now persists while the card window is open, even when a vendor is deleted for a particular item.