Purchasing Order Software

Reviews
Shared by: Heroes On Parade
Stats
views:
0
rating:
not rated
reviews:
0
posted:
11/2/2009
language:
English
pages:
0
Purchase Order Returns Software Interface These topics apply to both Microsoft Dynamics GP and Small Business Financials (SBF). Table of Contents Overview................................................................................................................. 5 Introduction ......................................................................................................................5 Background .....................................................................................................................5 Using a Dynamics Object ................................................................................................6 Implementation in Dexterity .............................................................................................11 Objects ...............................................................................................................11 Methods ..............................................................................................................11 Sample Script .....................................................................................................12 Object State Transitions...................................................................................................13 Object State Data ...............................................................................................13 Variables ...............................................................................................13 Methods.................................................................................................13 Diagrams ............................................................................................................14 Create/Get/Change/AddNew/GetField/SetField/Commit/Delete/Release/Destroy SetIndex ................................................................................................16 SetField .................................................................................................16 SetRange/ClearRange ..........................................................................16 Method Pre and Post Conditions ........................................................................17 Pre/Post Condition Table .......................................................................17 Pre/Post Condition Trees.......................................................................17 Precondition Tree ..................................................................................18 Postcondition Tree.................................................................................18 POR_Distribution .................................................................................................... 19 Class Methods .................................................................................................................19 AdjustAmt ...........................................................................................................19 AdjustPayAmt .....................................................................................................19 Public Methods ................................................................................................................19 SetDistType ........................................................................................................19 Restricted ........................................................................................................................20 Post ....................................................................................................................20 POR_Inquiry ........................................................................................................... 20 Public Methods ................................................................................................................20 GetDocumentType .............................................................................................20 OpenWindow ......................................................................................................21 POR_Intrastat ......................................................................................................... 21 Public Methods ................................................................................................................21 GetDeclarantID ...................................................................................................21 GetDefaultTrnNature ..........................................................................................21 GetPostingDate ..................................................................................................22 IsSupplementaryUnitsReqd ................................................................................22 OpenReturnsInquiry ...........................................................................................22 SetDefaultsFromLastLine ...................................................................................23 SetDefaultsFromSetup .......................................................................................23 UpdateIntrastatSummary ....................................................................................23 14 GetSiteCountryCode ..........................................................................................24 GetTaxCommodityCode .....................................................................................24 GetTransactionNature ........................................................................................24 GetVendorCountryCode .....................................................................................24 GetVendorRemitToCountryCode ........................................................................24 IsCountryValidated .............................................................................................25 IsEUMember.......................................................................................................25 IsItemTrackable ..................................................................................................25 IsLocationMapped ..............................................................................................26 IsReturnsEUTrx ..................................................................................................26 IsSupplementaryUnitsReqd ................................................................................26 PassCountryCodeValidation ...............................................................................26 UpdateIntrastatSummary ....................................................................................27 VAT_ExistForAnyLine.........................................................................................27 VAT_ExistForLine ...............................................................................................27 POR_PORcptApply .................................................................................................. 28 Class................................................................................................................................28 Post ....................................................................................................................28 Public ...............................................................................................................................28 GetApplyReceiptData .........................................................................................28 GetDocTypeForReceipt ......................................................................................29 SetPurchaseReceiptCost....................................................................................29 POR_Receipt .......................................................................................................... 29 Public Methods ................................................................................................................29 AdjustSubtotalRet ...............................................................................................29 BackOutReceiptDistribution ................................................................................30 CreateDefaultPPSDocDists ................................................................................30 CreatePPSVendorDocument ..............................................................................30 CreatePPSWorkRecord ......................................................................................31 DeleteTax ...........................................................................................................31 GetDistributionBackoutPPVAmount ...................................................................31 GetTotalRet ........................................................................................................31 GetTotalsWithLineRet.........................................................................................32 SetBatchID .........................................................................................................32 SetDocumentType ..............................................................................................33 TRX_PM_Create_Distributions_EX ....................................................................33 Update_Vendor_MSTR_SUM ............................................................................33 Update_Vendor_Period_Summary .....................................................................34 Restricted Methods ..........................................................................................................34 PostDistributions.................................................................................................34 PostHeader.........................................................................................................34 PostPPS .............................................................................................................35 PostPPSVendorDocument .................................................................................35 PostTaxes...........................................................................................................35 POR_ReceiptLine .................................................................................................... 36 Public Methods ................................................................................................................36 AdjustMFGAmt ...................................................................................................36 CheckForMultiplePOLines ..................................................................................36 GetAccruedBackoutAmount ...............................................................................36 GetExtCost .........................................................................................................37 GetIVBackoutAmount .........................................................................................37 GetIVBackoutAmount_Functional .......................................................................37 GetMFGDetails ...................................................................................................37 GetOrigExtCost ..................................................................................................38 GetOrigUnitCost .................................................................................................38 GetPORItemPurchaseTaxID ..............................................................................38 GetPORSitePurchaseTaxID ...............................................................................38 GetQtyReserved .................................................................................................39 GetUnitCost ........................................................................................................39 POR_ReturnLine ..................................................................................................... 39 Public ...............................................................................................................................39 ClearReturnLineData ..........................................................................................39 DeleteRange.......................................................................................................39 DeleteReturnLine................................................................................................40 GetReturnLine ....................................................................................................40 GetTotalAmounts................................................................................................40 RecalcFunctional ................................................................................................41 SaveReturnLine ..................................................................................................41 SetAccountIndex ................................................................................................41 SetFunctionalAmounts........................................................................................41 SetOriginatingAmounts .......................................................................................42 SetReceiptID ......................................................................................................42 POR_ShipIvcApply .................................................................................................. 42 Class Methods .................................................................................................................42 ExistPostedForShipment ....................................................................................42 Public Methods ................................................................................................................42 Get......................................................................................................................42 GetMaxInvoiceReserve ......................................................................................43 GetTotalInvoiceReserve .....................................................................................43 POR_Tax ................................................................................................................ 44 Class Methods ................................................................................................................44 ClearTaxAmts .....................................................................................................44 RecalcDistributions .............................................................................................44 Public Methods ...............................................................................................................44 Post ....................................................................................................................44 RecalcLineDistributions ......................................................................................45 Glossary ................................................................................................................. 45 Assertion..........................................................................................................................45 Attribute ...........................................................................................................................46 Class................................................................................................................................46 Collection .........................................................................................................................46 Commit ............................................................................................................................46 Composite .......................................................................................................................46 Create ..............................................................................................................................46 Current Object .................................................................................................................47 Destroy ............................................................................................................................47 Instance ...........................................................................................................................47 Methods ...........................................................................................................................47 Object ..............................................................................................................................48 Postconditions .................................................................................................................48 Preconditions ...................................................................................................................48 Property ...........................................................................................................................49 Routine ............................................................................................................................49 Service.............................................................................................................................49 State ................................................................................................................................49 State Transition Diagram .................................................................................................49 Overview This section provides the framework for understanding how object designs are implemented in Dexterity. It also explains the use of design solutions. Introduction The Purchase Order Processing (POP) was designed and coded using object-oriented techniques. While such techniques produced results that look different than modules not using the techniques, using the scripts for POP is actually not much different than using scripts in non-object oriented modules. This introduction assumes a basic understanding of objects. Consult the glossary for the definitions of terms and to gain a basic understanding of objects and the terminology used here. The following sections briefly describe how to use the POP Dynamics objects to integrate with the module. Background While this section may be helpful in understanding Dynamics objects, it isn’t required to integrate with Purchase Order Processing. A New Architecture POP code is layered into two tiers, the Human Interface (HI) and the Problem Domain (PD). The user interacts with the product through windows and reports (the HI tier), while the actual business processing for POP occurs in a second tier dedicated to it (the PD tier). This is a rule: code on windows does not perform business processing and code in the problem domain tier does not display any windows. This architecture provides a complete separation of concerns. The details of this separation will be made more clear later, but first it is helpful to understand why such a separation is useful. Previously, Dynamics windows read directly from and wrote directly to the database. However, it is important to remember that any place in the product that reads or writes a particular field needs to ensure that the business rules for processing that field (or fields related to it) aren’t violated. (For example, if you set the vendor on a purchase order, that vendor must exist and all other vendor related fields must be updated to reflect the new vendor.) Thus each window that read from or wrote to a field had code to handle the business rules for that field. This creates two problems:   Code for handling business rules is on windows where third parties or other Dynamics code can’t utilize it Duplicate code can create maintenance problems By adding a business processing (PD) tier to the architecture, all code for processing the business rules for a particular field can be consolidated into one script and then all windows can call upon that single script to deal with that field. The result is that a third-party can call such routines and there is much less duplication of code. Finally, for the most part (but not always), each table in POP has an associated PD object which handles the business rules for using that table (which is why they are sometimes called an object “wrapper” for a table since it wraps up the details of working with a table). Object Implementation In Dexterity This section briefly discusses how problem domain (PD) objects are implemented in Dexterity. While Dexterity has many object-based characteristics, sanScript is not an object-oriented programming language so Dynamics objects are simulated objects. The two key parts of an object are its internal data (also known as its state) and the scripts (methods) that operate on it. Each copy or instance of an object has its own internal data, or instance data. The methods of the object manipulate the internal data for programmers using the object and hide the implementation of business rules. To implement these features, most objects added during POP development are composed of the following three items:  A form whose global functions and procedures are the methods for an object. This groups all methods for an object in one place so they’re easy to find. Such forms have no windows (other than internal windows used for testing and debugging) and are never opened (since you don’t need to open a form to call scripts on that form.) A table buffer that holds data for the object. The buffer is also used within object methods to read and write information to and from the disk. A composite to hold other important data during the life of the object. Such composites are used more like the structures of other programming languages and are never displayed on a window. (For example, the methods of an object may store information in the composite for later use, such as to cache values for performance reasons.) Using a composite hides implementation details from the programmer using the object.   Using a Dynamics Object This section shows how to integrate with Purchase Order Processing through some code samples. Creating a Purchase Order The following example creates a purchase order with a single line item. A Dynamics object is a grouping of form global procedures and functions that implement and enforce the business rules for dealing with some object in the system, such as a purchase order, vendor or purchase receipt. As a result, there is usually (but not always) one object per database table in the system. All scripts for integrating with POP are form global procedures or functions (also known as methods) and their names are highlighted in bold in the example. All methods for dealing with an object are grouped together on the same form. Documentation for each method is in the DSDK documents on a per-object basis (and thus on a per-form basis since each object groups its methods together on one form). Composites are declared and passed to each of the methods along with a table buffer. Before calling any other method the Create method must be called to prepare the composite and table buffer for use; afterwards the Destroy method must be called to conclude the use of the object. { The declaration of two objects: a PO and a PO line item } local POP_POState POP_POState; { PO object‘s state composite } local POP_POLineState POP_POLineState; { PO Line object‘s state composite } local local local local local local integer Status; boolean fVendOnHold; currency cyVendNoteID; currency cySiteNoteID; currency cyItemNoteID; 'Price Schedule' sPriceSchdID; { Error status value from object methods } { Is vendor on hold? returned from SetVendID} { Vendor‘s Note ID returned from SetVendID } { Site‘s Note ID returned from SetSiteID } { Item‘s Note ID returned from SetItemID } { Price Schedule returned from SetItemID } local 'PO Number' sDefPOID; local 'Location Code' sSiteID; local 'Vendor ID' sVendID; local 'Item Number' sItemID; local currency cyQtyOrdered; local 'Currency ID' local 'Rate Type ID' sDefPOID = ""; sSiteID = "MINOT"; sVendID = "1021"; sItemID = "GE REFRIGERATOR"; cyQtyOrdered = 2; { Set this to override the default PO # } { Set this to the Site ID (location code) } { Set this to the Vendor ID } { Set this to the Item Number } { Set this to the Quantity to Order } sCurrencyID; { Vendor's Currency ID } sRateTypeID; { Vendor's Rate Type ID } { Default the next document number from setup } { Order to the MINOT warehouse } { Order from 1021 } { Order GE REFRIGERATOR } { Order 2 items } { Create an instance of the PO object } Status = Create(POP_POState, table POP_PO, "", false) of form POP_PO; { Reserve a blank PO ready for data–defaults today‘s date, returns PO # assigned } Status = AddNew(table POP_PO_TEMP, POP_POState, table POP_PO, sDefPOID, POP_DOCTYPE_PO) of form POP_PO; { Instantiate a PO Line object, restrict the collection to lines for this PO } Status = Create(POP_POLineState, table POP_POLine, sDefPOID, 0) of form POP_POLine; { Assign a default site ID for the line items } Status = SetSiteID(POP_POState, table POP_PO, sSiteID, cySiteNoteID) of form POP_PO; { Assign a vendor to the PO—Retrieves its name, shipping, payment & address info } Status = SetVendID(POP_POState, table POP_PO, sVendID, fVendOnHold, cyVendNoteID) of form POP_PO; { Reserve a new empty PO Line ready for data } Status = AddLine(POP_POState, table POP_PO, POP_POLineState, table POP_POLine) of form POP_PO; { Set the item number } Status = SetItemID(POP_POLineState, table POP_POLine, sItemID, sPriceSchdID, cyItemNoteID) of form POP_POLine; { Set the quantity to order } Status = SetQtyOrdered(POP_POLineState, table POP_POLine, cyQtyOrdered, sPriceSchdID) of form POP_POLine; { Save the PO line } Status = SaveLine(POP_POState, table POP_PO, POP_POLineState, table POP_POLine) of form POP_PO; { Save the PO header } Status = Commit(POP_POState, table POP_PO) of form POP_PO; { Destroy both the line and header objects as we are done using them } call Destroy of form POP_POLine, POP_POLineState, table POP_POLine; call Destroy of form POP_PO, POP_POState, table POP_PO; Notes:  The business rules are handled for you. Using the methods is a lot like typing information into a data entry window: the code behind the window knows how to do the right thing. In the case of POP, the code behind the window is the same code as you see above.  The table buffer and composite are declared and passed, but never directly accessed. Your code never needs to know what is in the composite or the table buffer.  While this code doesn’t do so, processing error codes is critical. Return values are documented with each method in the DSDK.  AddLine and SaveLine are methods on the PO, not the PO Line. Guidelines:   Create the object before starting, Destroy it when you’re done. Do not read or write to the composite or the table buffer—let the object methods do it. Using Method Documentation Using objects is as simple as above. Documentation for each method is as follows: (A) Signature - The name and type of each argument to the method.  Procedures: call MethodName of form ObjectName, [argument list].  Functions: set ReturnValue to MethodName([argument list]) of form ObjectName.  [argument list]: almost always starts with ObjectComposite, ObjectTableBuffer  Scope: Only Public and Restricted methods are documented in the DSDK. Special care should be taken before using Restricted methods. Private (internal, helper) methods are not documented in the DSDK since they should never be called from outside the object, but can be viewed with access to source code. Arguments - Each parameter that needs to be supplied to or is returned by the method. Return values - A special type of parameter, received as the value of a function. Preconditions - Statements of what the method expects to be true before it is called. Postconditions - Statements of what is expected to be true after the method succeeds. (B) (C) (D) (E) DSDK example: GetID function returns 'PO Number' sPOID. {-----------------------------------------------------------------------------(---- A ---)(----------- B -----------) (---------- C ----------) Public GetID(POP_POState, table POP_PO) returns 'PO Number' sPOID. Returns the assigned (PO) Document ID. Usage: Returns the data from the object to the caller. Returns:'PO Number' Preconditions: Me. Me. Me. Me. IsCreated = True IsIndexSet = True Index <> 0 RowState <> RS_NONE (D) (A) (C) Postconditions: None ------------------------------------------------------------------------------} in POP_POState Me. { State Data Composite } inout table POP_PO. { table buffer } { Preconditions } ... { Postconditions } (E) (B) (D) (E)... Calling a Lookup This example shows how to open the Purchasing Document Lookup window. It assumes that a POP_POState composite exists on the window and that the PO object has already been created. To keep the flow of logic clear, error handling isn’t included. Your code should check all errors. In the PO Number Lookup_CHG field script: local POP_POLookup POLU; clear POLU; POLU:'Sort By' = POP_POIDX_ID; POLU:Include = 0; POLU:'Lock Include' = true; POLU:'PO Number' = ―PO0001‖; POLU:'Restrict Type' = POP_ACTIVE; { Holds defaults for PO lookup } { Sort the list by PO # } { Only OPEN (New, Open, Modified) PO‘s } { Disable the Include radio buttons } { Default PO # to default selection to } { (Leave Vendor ID and Date empty) } { Only show PO‘s for active vendors } { Open the lookup window using defaults as above, return selected value to a field } call OpenWindowRet of form POP_Document_Lookup, POLU, '(L) ReturnToPOID'; In the (L) ReturnToPOID_CHG field script: local POP_POIdxID POP_POIdxID; local integer Status; { PO Index (By PO #) } { Error code return from object methods } { Perform any processing as needed by the window (e.g. saving PO already displayed) } { Attempt to retrieve the specified PO } POP_POIdxID:'PO Number' = '(L) ReturnToPOID'; call SetIndexID of form POP_PO, POP_POState, table POP_PO, POP_POIdxID; { Retrieve the PO } Status = Get(POP_POState, table POP_PO, CHG + EQUAL) of form POP_PO; { Perform additional processing as needed by the window (e.g. setting note icons) } Opening a Secondary Window This example shows how to open the Purchase Order Entry Date Entry window. It assumes that a POP_POState composite exists on the window and that the PO object has already been created and that either a blank object has been added (using AddNew()) or an existing object has been retrieved and is ready to be changed (by using the Get() method). To keep the flow of logic clear, error handling isn’t included. Your code should check all errors. Diagram 1 illustrates the role of each window as it is carried out in the following code. Diagram 1: The sequence of events when opening and then closing a child window. Parent Child (Btn_CHG) Open Window Return (Btn_CHG) Child.OpenWindow(Data, ReturnToField, WINID_PARENT) [Parent.]ReturnToField.Return(WINID_CHILD, ChildWindowStatus) Child.GetReturnValues(Data) (ReturnTo_CHG) GetReturnValues In the parent’s expansion (e.g. Date Expansion) button_CHG field script: local POP_PODates PODates; { Holds all PO dates the user is allowed to set } { Get current dates from the PO object } PODates = GetDates(POP_POState, table POP_PO) of form POP_PO; { Open the PO Date Entry window, passing the dates to be displayed on the window } call OpenWindow of form POP_PO_Date_Entry, PODates, '(L) ReturnToExpansion', WINID_POP_POENTRY; In the child’s accept (e.g. OKAY, CLOSE) button_CHG field script: { Notify the parent that the window was accepted } return WINID_POP_DATEENTRY + (ACCEPT * MAXFORM_ID); In the parent’s (L) ReturnToExpansion_CHG field script: local local local local local POP_PODates PODates; integer nWindow; integer nState; integer Status; boolean fRollDown; { Holds all the user settable PO dates } { ID of the window that is setting the return to field } { State of the window that is closing: ACCEPT/DISCARD } { Error code return value from object methods } { Roll-down date changes to all line items? } { Do not roll-down date changes to the line items. } set fRollDown to false; { Lower portion is the Window ID (WINID_POP_*), Upper portion is the sate of window closing (ACCEPT/DISCARD) } nWindow = '(L) ReturnToExpansion' % MAX_FORMID; nState = '(L) ReturnToExpansion' / MAX_FORMID; case nWindow { ** PO Date Entry ** } in [WINID_POP_PODATEENTRY] { Perform any processing as needed (e.g. re-enable fields, buttons) } if (nState = ACCEPT) then { Get the new dates back from the child window } call GetReturnValues of form POP_PO_Date_Entry, 'POP_PODates'; { Perform additional processing as needed (e.g. querying user to roll-down date changes to the lines } { Update the PO object with the new dates } Status = SetDates(POP_POState, table POP_PO, POP_PODates, fRollDown) of form POP_PO; { Perform additional processing as needed (e.g. notifying other open child windows (such as Payment Terms) to refresh due to date change } end if; { Additional cases for other child windows that can return to this window field } end case; There are two strong reasons for using this calling convention between parent and child windows. First, a single child window may need to be used by two calling windows today, and potentially more windows in the future. (See diagram 2.) In the past, child windows may have read directly from or to their parent windows to pass values; that means the child window has knowledge of that parent window and thus a new window couldn’t use that child window without modifications being made to it. The technique used in the code above doesn’t have that problem because the child window doesn’t know anything about its caller. Secondly, child windows often need to return multiple return values, but the field specified in the Dexterity return statement can only accept one value. By having the parent window ask the child window for the return values, as much information as is needed may be returned in the arguments to the child window’s GetReturnValues method. Diagram 2: A child window being used from multiple parent windows. Parent 1 Parent 2 Child 1 Child 2 Child 3 Implementation in Dexterity This section was in the original POP DSDK and, while it is covered in better detail in the previous sections, may prove useful to the developer as they integrate with POP. Each object is represented by a form that is named after the object. An object‟s methods are from global procedures and functions on the form. For example, all methods for the Batch object exist on the form called Batch. Objects Each index on an object is represented by an index composite. For example, the Batch object has an index by BatchSource and BatchNumber. The composite for that index contains components for BatchSource and BatchNumber. The attributes of an object are represented by a data composite. The data composite has a component for each attribute in the object. For example, some of the Batch object‟s attributes are Comment, Frequency and PostingDate. The composite for that data contains components for Comment, Frequency, and PostingDate, as well as for the Batch‟s other attributes. The state of an object is represented by a state composite. The state composite is used internally by the object‟s methods to track the state of the object. Additional information on state composites can be found in the Object State Transition section. Methods A method is a routine or service for an object. There are three types of methods: 1. Class methods operate on an entire collection as opposed to one instance of the object. They are considered helper routines for an object. They do not require an instance of the object to exist and do not require the object to be passed as a parameter. Class methods are available to all users of an object. 2. Public methods operate on a specific instance of an object. They are available to all users of the object. 3. Restricted methods should not be used by users of an object except in certain rare circumstances. For example, these methods may directly get and set the internal state of the object, exposing implementation details that may change (such as the Next Document Number); they may be methods on a child object that are used by its parent and should only be accessed through the parent so that the parent works correctly; they may bypass error checking for performance reasons in cases where the data is known to be valid (to copy an object, for example). Use restricted methods with caution. The following is a summary of some basic methods: Create and Destroy The object connection must be created before public and restricted methods can be called. In addition, the object connection must be destroyed when you are finished with it. Note that class methods can be called without an object connection. Example:Create() and Destroy() SetIndex and Get The index must be set prior to retrieving an instance of the object. Example:call SetIndex[ID]() before Get() Commit and Delete The instance of an object must be read with a passive or active lock before it can be committed or deleted. In Dexterity, a „change‟ operation reads and locks a row while a „get‟ operation only reads it. Example:call Get(CHG+EQUAL) before Commit() or Delete() SetField and GetField Fields in the instance of the object can be changed or retrieved. Example:Set[Field]() and Get[Field]() Each method has assertions that are used to verify that the object is in a valid state. If an assertion fails, a debug message is given and the method is aborted. Assertions are not available in the dictionary for the released product, but are available with source code. There are two types of assertions: 1. Preconditions are assertions that are made prior to executing the logic in a method. For example, they may assert that the object has been created and that the input parameters contain valid values. 2. Postconditions are assertions that are made after executing the logic in a method. They assert that the method did what it was suppose to do. For example, a method that sets a value in the object may assert that the object has been flagged as changed. Sample Script The following script gets the number of transactions for the specified batch and resets the value to zero if it is invalid. It illustrates the use of object implementation in Dexterity. in 'Batch Source' sBatchSource. In 'Batch Number' sBatchNumber. local BatchState Me. { state composite } local BatchIdxSrcByNum BatchIdxSrcByNum. { index composite } local integer nStatus. { Create the object connection } nStatus = Create( Me, table Batch_Headers, PURCHASING, "", "") of form Batch. { Set the index } BatchIdxSrcByNum:'Batch Source' = sBatchSource. BatchIdxSrcByNum:'Batch Number' = sBatchNumber. call SetIndexSrcByNum of form Batch, Me, table Batch_Headers, BatchIdxSrcByNum. { Read the row with a passive lock } nStatus = Get( Me, table Batch_Headers, CHG + EQUAL) of form Batch. { Get the number of transactions } if GetNumOfTrx( Me, table Batch_Headers) of form Batch < 0 then { Number of transactions is invalid so reset to zero } call SetNumOfTrx of form Batch, Me, table Batch_Headers, 0. { Save the change } nStatus = Commit( Me, table Batch_Headers) of form Batch. end if. { Destroy the object connection } call Destroy of form Batch, Me, table Batch_Headers. Object State Transitions The advanced material in this section describes additional details about how the objects which may or may not prove useful to a developer creating an integration. Object State Data Variables These variables will exist in every object created (in order to allow for generic global scripts to work with object states anonymously) and indicate the current state of the object. All methods should check these variables when entering (i.e. Preconditions), change them appropriately in the code, and verify them when exiting (i.e. Postconditions). Name Index IsAddingNew IsChanged IsCreated IsIndexSet IsRangeSet RowState Values n TRUE FALSE TRUE FALSE TRUE FALSE TRUE FALSE TRUE FALSE NONE GET CHANGE Description What Index NUMBER is set. Are we adding a new object to a collection of objects, with that object in a half created state? Has the object been changed since it was read from the table? Has the object been created yet? Are the index FIELDS (in the table buffer) for the current index number set? Is a range set? Does not affect other states, as a range can be set anytime the object is created? What is the state of the object with regards to the table row? RS_NONE - No valid object exists RS_GET - Object read from table w/o any lock RS_CHANGE - Object read from table with change or edit. Methods The only method that solely checks the state of the object is “IsRequired”. It is only needed prior to a Commit, and therefore we have chosen not to represent this state by a variable and have to check for required fields during every method that sets a field in the table. Name IsRequired Return Values TRUE FALSE Description Have all required fields been filled with valid-required-field user data (and all other fields have valid (i.e. at least blank) data.) Diagrams The following diagrams illustrate object state transitions between methods. Note that in these diagrams, Get() and Change() both refer to the Get() method. They are used to differentiate between a Get(GET + FIRST|PREV|NEXT|LAST|EQUAL) and a Get(CHG + FIRST|PREV|NEXT|LAST|EQUAL). Create/Get/Change/AddNew/GetField/SetField/Commit/Delete/Release/Destroy This diagram shows object state transitions in picture format. For a given object state, it shows what methods can be performed at that state and what methods could have brought the object to that state. For example, when IsIndexSet is FALSE the following methods can be performed: SetIndex, Get(FIRST, LAST), AddNew, and Change(FIRST, LAST). The SetIndex method changes IsIndexSet to TRUE and RowState to NONE. IsCreated = FALSE Implies: Index = 0, IsIndexSet = FALSE, RowState = NONE, IsAddingNew = FALSE, IsRequired = FALSE, IsChanged = FALSE Create Destroy IsCreated = TRUE IsIndexSet = FALSE Implies: Index <> 0 Implies: RowState = NONE, IsAddingNew = FALSE, IsRequired = FALSE, IsChanged = FALSE SetIndex Get(FIRST, LAST) AddNew Change(FIRST, LAST) IsIndexSet = TRUE SetIndex RowState = NONE Implies: IsAddingNew = FALSE, IsRequired = FALSE, IsChanged = FALSE Get(Any) Get Field AddNew Change(Any) RowState <> NONE SetIndex Implies: IsAddingNew = FALSE, IsRequired = TRUE, IsChanged = FALSE Get(Any) RowState = GET AddNew Set Field Sets IsChanged = TRUE Change(Any) Delete Release Commit RowState = CHANGE IsAddNew = FALSE IsRequired = TRUE Commit (Line) Release Commit (Hdr) IsAddNew = TRUE Implies: IsChanged = TRUE IsRequired = TRUE SetIndex This method will directly set the index fields in the table so the Get method does not require knowledge of the indexes, thus allowing a generic system-wide get. Refer to the previous large diagram for more details. SetField The IsChanged flag can only be set via any method that performs a SetField action. The SetIndex method will not set the IsChanged flag TRUE, rather it sets the RowState to NONE. IsCreated = TRUE, RowState <> NONE IsChanged=FALSE SetField IsChanged=TRUE SetField IsRequired()=FALSE SetField IsRequired()=TRUE SetField SetRange/ClearRange For objects that allow ranges to be set (e.g. a Setup object does not), a SetRange/ClearRange method should exist, along with a IsRangeSet flag. IsCreated = TRUE IsRangeSet=FALSE ClearRange SetRange IsRangeSet=TRUE Method Pre and Post Conditions What follows are two different views of the data described by the previous diagrams in a textual-only form. The data is the same, only the way it‟s presented has been changed which may assist in understanding the different object states. Pre/Post Condition Table This table lists the various methods PRE and POST conditions, which represent the expected state of the object prior to executing the method and after executing the method. N/A indicates that the condition is not applicable (may be in one of many states) and therefore is not checked or changed within the method. This table is best used to understand for a particular method, what the object state needs to be at in order to call the method, and what it will be after the method has been called. Create - PRE Create - POST IsCreated FALSE TRUE IsIndexSet (FALSE) FALSE Index (0) NOT 0 [DEFAULT] NOT 0 NOT 0 NOT 0 NOT 0 NOT 0 NOT 0 NOT 0 NOT 0 NOT 0 NOT 0 NOT 0 NOT 0 NOT 0 NOT 0 NOT 0 NOT 0 NOT 0 NOT 0 NOT 0 NOT 0 NOT 0 NOT 0 NOT 0 RowState (NONE) NONE IsAddingNew (FALSE) FALSE IsRequired (FALSE) FALSE IsChanged N/A FALSE SetIndex - Pre SetIndex - Post Get(FIRST/LAST) - Pre Get(FIRST/LAST) - Post Get(PREV/EQUAL/NEXT) - Pre Get(PREV/EQUAL/NEXT) - Post Change(FIRST/LAST) - Pre Change(FIRST/LAST) - Post Change(PREV/EQUAL/NEXT) - Pre Change(PREV/EQUAL/NEXT) Post AddNew - Pre AddNew - Post Get Field - Pre Get Field - Post Set Field - Pre Set Field - Post Delete - Pre Delete - Post Commit - Pre Commit - Post Commit (Line Items) - Pre Commit (Line Items) - Post Release Pre (IsAddingNew = FALSE) Release Post(IsAddingNew = FALSE) Release Pre(IsAddingNew = TRUE) Release Post(IsAddingNew = TRUE) Destroy - Pre Destroy - Post TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE N/A TRUE N/A TRUE TRUE TRUE N/A TRUE TRUE TRUE N/A TRUE TRUE TRUE TRUE TRUE TRUE N/A TRUE TRUE N/A TRUE TRUE <> CHANGE NONE <> CHANGE GET <> CHANGE GET <> CHANGE CHANGE <> CHANGE CHANGE <> CHANGE CHANGE GET, CHANGE GET, CHANGE CHANGE CHANGE CHANGE NONE CHANGE GET CHANGE GET CHANGE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE N/A N/A N/A N/A N/A FALSE N/A FALSE N/A FALSE FALSE N/A N/A N/A TRUE N/A TRUE N/A TRUE N/A TRUE N/A FALSE N/A N/A N/A N/A N/A N/A TRUE TRUE N/A TRUE N/A N/A N/A N/A FALSE N/A FALSE N/A FALSE N/A FALSE N/A TRUE N/A N/A N/A N/A N/A FALSE N/A N/A N/A N/A N/A TRUE TRUE NOT 0 GET FALSE N/A N/A TRUE TRUE NOT 0 CHANGE TRUE N/A N/A TRUE TRUE NOT 0 NONE FALSE N/A N/A TRUE FALSE N/A (FALSE) NOT 0 (0) N/A (NONE) N/A (FALSE) N/A (FALSE) N/A (N/A) Pre/Post Condition Trees The following trees are best used to understand that given a particular object state, what methods can be performed at that state, and conversely, what methods could have brought the object to that state. Precondition Tree   IsCreated = FALSE  Create IsCreated = TRUE  Destroy  IsIndexSet = FALSE  SetIndex  Get(FIRST, LAST)  Change(FIRST, LAST)  AddNew  IsIndexSet = TRUE  RowState = NONE  SetIndex  Get(Any)  Change(Any)  AddNew  RowState <> NONE  Get Field  RowState = GET  SetIndex  Get(Any)  Change(Any)  AddNew  RowState = CHANGE  Set Field  Delete  IsAddingNew = FALSE  Release  IsRequired = TRUE  Commit  IsAddingNew = TRUE  Release  Commit (Line Item)  IsRequired = TRUE  Commit Postcondition Tree   IsCreated = FALSE  Destroy IsCreated = TRUE  IsIndexSet = FALSE  Create  IsIndexSet = TRUE  RowState = NONE  SetIndex  Release (IsAddingNew = TRUE)  Delete  RowState <> NONE  Get Field  RowState = GET  Get (Any)  Release (IsAddingNew = FALSE)  Commit  RowState = CHANGE  Set Field  IsAddingNew = FALSE  IsRequired = TRUE  Change (Any)  IsAddingNew = TRUE  AddNew (IsChanged = FALSE) POR_Distribution Class Methods AdjustAmt {-----------------------------------------------------------------------------Class AdjustAmt(‗POP Receipt Number‘, ‗Distribution Type‘, ‗Account Index‘, ‗Vendor ID‘, boolean, currency, currency, MC_Def_Structure, optional boolean) Adjust the distribution amount for Debit or Credit passed in the fDebit flag. ------------------------------------------------------------------------------} in 'POP Receipt Number' sRcptID; { Receipt Number } in 'Distribution Type' nDistType; { Distribution Type } in 'Account Index' nAcctIdx; { Account Index } in 'Vendor ID' sVendorID; { Vendor ID } in boolean fDebit; { True - Debit Account Type } { False - Credit Account Type } in currency cyAmount; { Originating Adjustment Amount } inout currency cyFncAmount; { Returned Functional Amount} in MC_Def_Structure MCDefStructure; { MC Currency Information } optional in boolean BackoutDist=false; { Preconditions } assert ( not empty( sRcptID ) ), "ERROR: POP_Dist.AdjustAmt: Invalid Receipt Number."; { Postconditions } { None } AdjustPayAmt {-----------------------------------------------------------------------------Class AdjustPayAmt(‗POP Receipt Number‘, ‗Distribution Type‘, ‗Account Index‘, ‗Vendor ID‘, boolean, currency, currency, MC_Def_Structure) Adjust the distribution amount for Debit or Credit passed in the fDebit flag. ------------------------------------------------------------------------------} in 'POP Receipt Number' sRcptID; { Receipt Number } in 'Distribution Type' nDistType; { Distribution Type } in 'Account Index' nAcctIdx; { Account Index } in 'Vendor ID' sVendorID; { Vendor ID } in boolean fDebit; { True - Debit Account Type } { False - Credit Account Type } in currency cyAmount; { Originating Adjustment Amount } inout currency cyFncAmount; { Returned Functional Amount} in MC_Def_Structure MCDefStructure; { MC Currency Information } { Preconditions } assert ( not empty( sRcptID ) ), "ERROR: POP_Dist.AdjustAmt: Invalid Receipt Number."; { Postconditions } { None } Public Methods SetDistType {-----------------------------------------------------------------------------Public SetDistType( POP_DistState, table POP_Distribution, 'Distribution Type' ) RETURN VALUES(S): No errors Accrued type not allowed for credit returns Pay type not allowed for non-credit returns POP_DIST_ROUND User can not change to/from Round type POP_DIST_OVERHEAD User can not change to/from Overhead type POP_DIST_APPLIEDOVERHEAD User can not change to/from Applied Overhead type ZERO User can not change type on dists with zero exchange rate ------------------------------------------------------------------------------} OKAY INVALIDTYPE function inout inout in in returns integer nStatus; Me; POP_Distribution; nPOPType; nDistType; { { { { Distribution State Data } Table Buffer } Document Type } Distribution Type } POP_DistState table integer integer { Preconditions } assert ( TestRowState( Me, RS_CHANGE ) of form TableObj ), "ERROR: POR_Distribution.SetDistType: Invalid Row State."; assert ( nDistType >= POP_DIST_PURCH ) and ( nDistType <= POP_DIST_MAX ), "ERROR: POR_Distribution.SetDistType: Invalid Distribution Type."; { Postconditions } { None } Restricted Post {-----------------------------------------------------------------------------Restricted Post(POP_DistState, table POP_Distribution, boolean, Boolean, boolean, integer, ‗Voucher Number‘, ‗Vendor ID‘, date, ‗TRX Source‘, integer, MC_Def_Structure) Posts a POP_Dist row for a receipt to all appropriate tables. Usage: Posting of single POP_Distribution row to POP and PM. RETURN VALUES(S): OKAY POP_POST_ERROR_POPDIST POP_POST_ERROR_POPDISTHIST POP_POST_ERORR_PMDISTWORKOPEN POP_POST_ERORR_PMDISTHIST ------------------------------------------------------------------------------} inout POP_DistState Me; { Tax State Data } inout table POP_Distribution; { Table Buffer } in boolean fPOPKeepDistHist; { true - Keep Distribution history in POP (Setup) } in boolean fPMKeepDistHist; { true - Keep Distribution history in PM (Vendor) } in boolean fFullyPaid; { true - document is fully paid off } inout integer nPMDistOrd; { holds Distribution Sequence Number for PM } in 'Voucher Number' sVchrNum; { PM Voucher Number to use } in 'Vendor ID' sVendID; { Vendor ID of receipt } in date dtGLPostDate; { GL Posting Date for receipt } in 'TRX Source' sTrxSource; { audit trail code } in integer nPOPType; { Document Type } in MC_Def_Structure MCDefStructure; { multicurrency info for this distribution's document } { Preconditions } assert TestRowState (Me, RS_CHANGE) of form TableObj; { Postconditions } { None } POR_Inquiry Public Methods GetDocumentType {-----------------------------------------------------------------------------Public GetDocumentType( ‗POP Receipt Number‘ ):‘POP Type‘; Returns the Document Type. ------------------------------------------------------------------------------} function returns 'POP Type' rReturn; in 'POP Receipt Number' iRcpt; { Preconditions } { None } { Postconditions } { None } OpenWindow {-----------------------------------------------------------------------------Public OpenWindow( asUserDefListPrompts[5] ) Open the Returns Inquiry window. This script will be called from any 3rd Party application that needs to open our window. A non-Returns window will be redirected to POP's version of the window. ------------------------------------------------------------------------------} in 'POP Receipt Number' iRcpt; in integer iItemType; POP_BYITEM, POP_BYVENDORITEM, POP_BYNOTSET in out 'Currency View' boolean iCyView; oReturn; CURRENCYVIEW_FUNCTIONAL CURRENCYVIEW_ORIGINATING CURRENCYVIEW_REPORTING { Preconditions } { None } { Postconditions } { None } POR_Intrastat Public Methods GetDeclarantID {-----------------------------------------------------------------------------Public GetDeclarantID( ‗Location Code‘, ‗Address Code‘, boolean ) Wrapper for PRODID_2788.GetDeclarantID() function Returns: Call Intrastat dictionary to retrieve 'Declarant ID' for the specified Location Code. ------------------------------------------------------------------------------} in 'Location Code' iLocationCode; out 'Address Code' oDeclarantID; out boolean oReturn; { Preconditions } if not(POR_EI_Loaded of globals) then abort script; end if; { Postconditions } { None } GetDefaultTrnNature {-----------------------------------------------------------------------------Public GetDefaultTrnNature( ‗Location Code‘, ‗Transaction Nature‘, boolean ) Wrapper for PRODID_2788.GetDefaultTrnNature() function Call Intrastat dictionary to retrieve 'Transaction Nature' for the specified Location Code. ------------------------------------------------------------------------------} Returns: in out out 'Location Code' 'Transaction Nature' boolean iLocationCode; oTrnCode; oReturn; { Preconditions } if not(POR_EI_Loaded of globals) then abort script; end if; { Postconditions } { None } GetPostingDate {-----------------------------------------------------------------------------Public GetPostingDate( ‗Address Code‘, date, date, boolean ) Wrapper for PRODID_2788.GetPostingDate() function Returns: Call Intrastat dictionary to retrieve 'Posting Date' for the specified Address Code and Return Posting Date ------------------------------------------------------------------------------} in 'Address Code' iAddressCode; in date iPostingDate; out date oDate; out boolean oReturn; { Preconditions } if not(POR_EI_Loaded of globals) then abort script; end if; { Postconditions } { None } IsSupplementaryUnitsReqd {-----------------------------------------------------------------------------Public IsSupplementaryUnitsReqd( ‗Tax Commodity Code‘, boolean, boolean ) Wrapper for PRODID_2788.IsSupplementaryUnitsReqd() function Returns: TRUE - if Supplementary Unit Required FALSE - if Supplementary Unit not Required ------------------------------------------------------------------------------} in 'Tax Commodity Code' iTaxComCode; out boolean oRequired; out boolean oReturn; { Preconditions } if not(POR_EI_Loaded of globals) then abort script; end if; { Postconditions } { None } OpenReturnsInquiry {-----------------------------------------------------------------------------Public OpenReturnsInquiry( ‗POP Receipt Number‘, boolean, integer ) Cross product call for EI – opens the Returns Inquiry window ------------------------------------------------------------------------------} in 'POP Receipt Number' iRcpt; out boolean oReturn; optional in integer iItemType = POP_BYITEM; {POP_BYITEM, POP_BYVENDORITEM, POP_BYNOTSET} optional in 'Currency View' iCyView= CURRENCYVIEW_FUNCTIONAL; {CURRENCYVIEW_FUNCTIONAL CURRENCYVIEW_ORIGINATING CURRENCYVIEW_REPORTING} { Preconditions } { None } { Postconditions } { None } SetDefaultsFromLastLine {-----------------------------------------------------------------------------Public SetDefaultsFromLastLine( vatIntrastatState, ‗Customer Number‘, ‗Address Code‘, ‗Location Code‘ ) ------------------------------------------------------------------------------} inout vatIntrastatState Me; in 'Customer Number' iVendorID; in 'Address Code' iAddressCode; in 'Location Code' iSiteID; { Preconditions } assert TestRowState(Me, RS_CHANGE) of form TableObj; { Postconditions } assert TestIsChanged(Me, true) of form TableObj; SetDefaultsFromSetup {-----------------------------------------------------------------------------Public SetDefaultsFromSetup( vatIntrastatState, ‗Customer Number‘, ‗Address Code‘, ‗Location Code‘ ) Sets the default values from the Customer/Vendor Intrastat Setup. Due to the fact that the Country of Origin field is defaulted a little differently, some extra detail has been added to explain how it defaults: In PM/POP: (1) Attempt to pull it from the previous line entered (2) If not there, attempt to pull it from the vendor setup info (3) If not there, default blank ------------------------------------------------------------------------------} inout vatIntrastatState Me; in 'Customer Number' iVendorID; in 'Address Code' iAddressCode; in 'Location Code' iLocationCode; { Preconditions } { None } { Postconditions } assert TestIsChanged(Me, true) of form TableObj; UpdateIntrastatSummary {-----------------------------------------------------------------------------Public UpdateIntrastatSummary(‗Location Code‘, ‗Tax Date‘, integer, ‗Document Amount‘) Wrapper for PRODID_2788.UpdateIntrastatSummary() function ------------------------------------------------------------------------------} in 'Location Code' iLocationCode; in 'Tax Date' iTaxDate; in integer iArrivalOrDispatch; { 0 Arrival 1 Dispatch } in 'Document Amount' iDocAmt; { Preconditions } if not(POR_EI_Loaded of globals) then abort script; end if; { Postconditions } { None } GetSiteCountryCode {-----------------------------------------------------------------------------Public GetSiteCountryCode(‗Location Code‘):‘Country Code‘; ------------------------------------------------------------------------------} function returns 'Country Code' rReturn; in 'Location Code' iLocationCode; { Preconditions } { None } { Postconditions } { None } GetTaxCommodityCode {-----------------------------------------------------------------------------Public GetTaxCommodityCode (‗Item Number‘, ‗Vendor ID‘, ‗Address Code‘):‘Tax Commodity Code‘; ------------------------------------------------------------------------------} function returns 'Tax Commodity Code' rReturn; in optional in optional in 'Item Number' 'Vendor ID' 'Address Code' iItem; iVendor; iShipFromAddress; { Preconditions } { None } { Postconditions } { None } GetTransactionNature {-----------------------------------------------------------------------------Public GetTransactionNature (‗Vendor ID‘, ‗Address Code‘, ‗Location Code‘):‘Transaction Nature‘; Returns Transaction Nature ------------------------------------------------------------------------------} function returns 'Transaction Nature' rReturn; in in in 'Vendor ID' 'Address Code' 'Location Code' iVendor; iShipFromAddress; iLocationCode; { Preconditions } { None } { Postconditions } { None } GetVendorCountryCode {-----------------------------------------------------------------------------Public GetVendorCountryCode (‗Vendor ID‘, ‗Address Code‘):‘Country Code‘; ------------------------------------------------------------------------------} function returns 'Country Code' rReturn; in optional in 'Vendor ID' 'Address Code' iVendorID; iAddressCode; { Preconditions } { None } { Postconditions } { None } GetVendorRemitToCountryCode {------------------------------------------------------------------------------ Public GetVendorRemitToCountryCode (‗Vendor ID‘, ‗Address Code‘):‘Country Code‘; ------------------------------------------------------------------------------} function returns 'Country Code' rReturn; in optional in 'Vendor ID' 'Address Code' iVendorID; iAddressCode; { Preconditions } { None } { Postconditions } { None } IsCountryValidated {-----------------------------------------------------------------------------Public IsCountryValidated (‗Location Code‘, ‗Vendor ID‘):boolean; Return true if location code is mapped to a declarant. ------------------------------------------------------------------------------} function returns boolean rReturn; in in 'Location Code' 'Vendor ID' iLocationCode; iVendID; { Preconditions } if not(POR_EI_Loaded of globals) then rReturn = true; abort script; end if; { Postconditions } { None } IsEUMember {-----------------------------------------------------------------------------Public IsEUMember (‗Country Code‘):boolean; Return true if a country code is a member of EU. ------------------------------------------------------------------------------} function returns boolean rReturn; in 'Country Code' iCountryCode; { Preconditions } { None } { Postconditions } { None } IsItemTrackable {-----------------------------------------------------------------------------Public IsItemTrackable(‗Item Number‘, ‗Item Type‘, ‗Non IV‘):boolean; Return true if Item is trackable. Item must not be a non inventoried item and must not be a service, flat fee or miscellaneous ------------------------------------------------------------------------------} function returns boolean rReturn; in optional in optional in 'Item Number' 'Item Type' 'Non IV' iItemNumber; iItemType; iNonIV; { Preconditions } { None } { Postconditions } { None } IsLocationMapped {-----------------------------------------------------------------------------Public IsLocationMapped (‗Location Code‘):boolean; Return true if location code is mapped to a declarant. ------------------------------------------------------------------------------} function returns boolean rReturn; in 'Location Code' iLocationCode; { Preconditions } if not(POR_EI_Loaded of globals) then rReturn = true; abort script; end if; { Postconditions } { None } IsReturnsEUTrx {-----------------------------------------------------------------------------Public IsReturnsEUTrx (‗Vendor ID‘, ‗Location Code‘, ‗Item Type‘, ‗Item Number‘):boolean; Returns true if Item Type, Location Code and Vendor combination pass EU Trx validation. ------------------------------------------------------------------------------} function returns boolean rReturn; in in in in 'Vendor ID' 'Location Code' 'Item Type' 'Item Number' iVendor; iLocation; iItemType; iItemNum; { Preconditions } { None } { Postconditions } { None } IsSupplementaryUnitsReqd {-----------------------------------------------------------------------------Public IsSupplementaryUnitsReqd (‗Tax Commodity Code‘):boolean; Wrapper for PRODID_2788.IsSupplementaryUnitsReqd() function Returns: TRUE - if Supplementary Unit Required FALSEb- if Supplementary Unit not Required ------------------------------------------------------------------------------} function returns boolean rIsSupplementaryUnitsReqd = false; in 'Tax Commodity Code' iTaxComCode; { Preconditions } if not(POR_EI_Loaded of globals) then abort script; end if; { Postconditions } { None } PassCountryCodeValidation {-----------------------------------------------------------------------------Public PassCountryCodeValidation (‗Vendor ID‘, ‗Location Code‘):boolean; Return TRUE if pass Country Code validation for Intrastat Requirement: POP00029_01331 The Country Code Validation passes when all the following conditions are true: 1. The Country Code of the Site ID (Site Maintenance window) a. Is not the same Country Code as in the Vendor Ship From Address ID. b. Is not the same Country Code as in the Vendor Remit To Address ID. The Country Code of the Site ID (Site Maintenance window) and the Country Code of the Vendor Ship From Address ID are both marked as EU Member.-----------------------------------------------------------------------------} function returns boolean rReturn; 2. in in 'Vendor ID' 'Location Code' iVendor; iLocationCode; { Preconditions } { None } { Postconditions } { None } UpdateIntrastatSummary {-----------------------------------------------------------------------------Public UpdateIntrastatSummary (‗Location Code‘, ‗Tax Date‘, integer, ‗Document Amount‘):boolean; Wrapper for PRODID_2788.UpdateIntrastatSummary() function Call Intrastat dictionary to retrieve 'Declarant ID' for the specified Location Code. ------------------------------------------------------------------------------} function returns boolean rReturn; in in in in 'Location Code' 'Tax Date' integer 'Document Amount' iLocationCode; iTaxDate; iArrivalOrDispatch; iDocAmt; { 0 Arrival 1 Dispatch } { Preconditions } if not(POR_EI_Loaded of globals) then abort script; end if; { Postconditions } { None } VAT_ExistForAnyLine {-----------------------------------------------------------------------------Public VAT_ExistForAnyLine (‗Receipt Number‘, ‗POP type‘):boolean; Check if a VAT record exist for the current return receipt ------------------------------------------------------------------------------} function returns boolean rReturn; in in 'Receipt Number' 'POP Type' iRcpt; iPOPType; { Preconditions } { None } { Postconditions } { None } VAT_ExistForLine {-----------------------------------------------------------------------------Public VAT_ VAT_ExistForLine (‗Receipt Number‘, ‗Receipt Line Number‘, ‗POP type‘):boolean; Check if a VAT record exist for the current return receipt line ------------------------------------------------------------------------------} function returns boolean rReturn; in in in 'Receipt Number' 'Receipt Line Number' 'POP Type' iRcpt; iRcptLine; iPOPType; { Preconditions } { None } { Postconditions } { None } POR_PORcptApply Class Post {-----------------------------------------------------------------------------Class Post(popBackOrderedItemsRptState, 'POP Receipt Number', 'Receipt Line Number', ‗TRX Location‘, date, integer, integer, currency, currency, long, 'MC Def Structure','Capital Item', 'Extended Cost', 'Item Type', boolean, long, integer, integer); integer Set the Posting Status to POSTED, call the POP_POLine to update its status, retrieve the amount of this line item to be backed out of the vendor's On Order Amount. Expected Return Values: OKAY POP_POST_ERROR_PORCPTAPPLY POP_POST_ERROR_POLINE ------------------------------------------------------------------------------} function returns integer Post. inout popBackOrderedItemsRptState BOItemsState; { Back Ordered Items state composite } in 'POP Receipt Number' sRcptNum; { Receipt Number } in 'Receipt Line Number' nRcptLineNum; { Line Sequence Number } in 'TRX Location' sSiteID; { Location for the Shipment Line } in date dtRcpt; { Receipt Date } in integer nRcptSeq; { IV Purchase Receipt created by Ship or Ship/Ivc } in integer nSplitRcptSeq; { IV Purchase Receipt for split } in currency cyPurchRcptCost; { Funtional Unit Cost for the IV Purchase Receipt } in currency cySplitPurchRcptCost; { Functional Unit Cost for the IV Purchase Receipt, if split } in long nAccruedPurchIdx; { Accrued Purchase account index } in 'MC Def Structure' MCDefStructure; { Document's currency information } in 'Capital Item' fCapItem; { OEM field Capital Item } in 'Extended Cost' cyExtCost; { Receipt Line functional Extended Cost } in 'Item Type' nItemType; { Item type of the Receipt Line } in boolean fIsStdCostItem; { Is Item a Periodic Item } in long nUPPVIdx; { UPPV Account for Periodic Items } in integer nDecCurr; { Actual Currency Decimal Places (DDL - 1) } in integer nDecQtys; { Actual Qty Decimal Places (DDL - 1) } { Preconditions } assert not empty(sRcptNum), assert ( nRcptLineNum > 0 ), { Postconditions } { None } "ERROR: POR_PORcptApply.Post: Invalid Receipt Number."; "ERROR: POR_PORcptApply.Post: Invalid Line Sequence Number."; Public GetApplyReceiptData {-----------------------------------------------------------------------------Public GetApplyReceiptData (POP_ReceiptLineState, table POP_ReceiptLine, POR_PORcptApplyData, integer); Boolean; ------------------------------------------------------------------------------} function returns boolean rFound; inout inout inout in POP_ReceiptLineState table POR_PORcptApplyData integer Me; POP_ReceiptLine; ioRcptData; lApplyType; { Preconditions} { None } { Postconditions } { None } GetDocTypeForReceipt {-----------------------------------------------------------------------------Public GetDocTypeForReceipt(‗POP Receipt Number‘); integer Return Document Type for the receipt ------------------------------------------------------------------------------} function returns integer rDocType. in 'POP Receipt Number' iRcpt; { POP Receipt Number } { Preconditions } { None } { Postconditions } { None } SetPurchaseReceiptCost {-----------------------------------------------------------------------------Public SetPurchaseReceiptCost(POP_PORcptApplyState, table POP_PORcptApply, 'Receipt Cost') Sets the object's Originating Receipt Cost. ------------------------------------------------------------------------------} inout POP_PORcptApplyState Me. { PORcptApply State Data } inout table POP_PORcptApply. { PORcptApply Table Buffer } in 'Receipt Cost' cyPurchRcptCost. { Originating Unit Cost from ReceiptLine { Preconditions } assert TestRowState(Me, RS_CHANGE) of form TableObj, "ERROR: PORcptApply.SetReceiptCost: Invalid Row State.". { Postconditions } { None } } POR_Receipt Public Methods AdjustSubtotalRet {-----------------------------------------------------------------------------Public AdjustSubtotalRet (POP_ReceiptState, table POP_Receipt); Updates the originating subtotal for the document and calculates the functional subtotal. Used to get updates for the Receipt through the Receipt Line. Pre trigger on AdjustSubtotal of form POP_Receipt Used only for Return type ------------------------------------------------------------------------------} inout POP_ReceiptState Me; { State Data Composite } inout table POP_Receipt; { table buffer } { Preconditions } if (not IsReturnDoc(Me) of form POP_Receipt) then {--- Is not a return type ---} abort script; end if; if 'POP Type' of table POP_Receipt <> POP_DOCTYPE_RETURN then abort script; end if; assert ( TestRowState( Me, RS_CHANGE ) of form TableObj ), "ERROR: POP_Receipt.AdjustTax: Precondition RowState is Invalid. { Postconditions } { None } Expecting RS_CHANGE."; BackOutReceiptDistribution {-----------------------------------------------------------------------------Public BackOutReceiptDistribution (POP_ReceiptState, table POP_Receipt, POP_ReceiptLineState, table POP_ReceiptLine, ‗Account Index‘, MC_Def_Structure); Deletes a Receipt Line. Updates the subtotal and remaining subtotal for the document. Updates the distributions for the document. Usage: Used to initiate the deleting of a line through the Receipt. Pre trigger for DelLine of form POP_Receipt ------------------------------------------------------------------------------} inout POP_ReceiptState Me; inout table POP_Receipt; inout POP_ReceiptLineState ReceiptLine; { Receipt Line State Data Composite } inout table POP_ReceiptLine; { Receipt Line table buffer } inout 'Account Index' ioAPIdx; inout MC_Def_Structure ioMCDefStruc; { Preconditions } { None } { Postconditions } { None } CreateDefaultPPSDocDists {-----------------------------------------------------------------------------Public CreateDefaultPPSDocDists(table PM_Transaction_WORK, ‗Distribution Sequience Number‘, ‗MC Def Structure‘) Create default payables distributions for a PPS document that is created for the PPS Vendor. ------------------------------------------------------------------------------} in table PM_Transaction_WORK; inout 'Distribution Sequence Number' nSeqNumber; in 'MC Def Structure' MCDef; { Preconditions } { None } { Postconditions } { None } CreatePPSVendorDocument {-----------------------------------------------------------------------------Public CreatePPSVendorDocument(‗Batch Number‘, table POR_PPS_Data_TRX_TEMP, ‗Vendor ID‘, ‗Currency ID‘, ‗Document Number‘, ‗Document Type‘, ‗Document Date‘, ‗Posting Date‘, ‗PPS Amount Deducted‘, string, boolean) ------------------------------------------------------------------------------} inout 'Batch Number' IO_sPPSBatchNum; inout table POR_PPS_Data_TRX_TEMP; in 'Vendor ID' IN_sVendorID; in 'Currency ID' IN_sCurrID; in 'Document Number' IN_sDocNum; in 'Document Type' IN_nApplyFromDocType; in 'Document Date' IN_dtDocDate; in 'Posting Date' IN_dtPostingDate; in 'PPS Amount Deducted' IN_cyDeltaPPS; { change in PPS } in in string boolean IN_sApplyFromVouchNum; fTrackWithholding; { Preconditions } { None } { Postconditions } { None } CreatePPSWorkRecord {-----------------------------------------------------------------------------Public CreatePPSWorkRecord(table PM_Transaction_WORK, table POR_PPS_Data_TRX_TEMP, ‗Batch Number‘) Create a PM_Transaction_WORK for a PPS withholding amount. ------------------------------------------------------------------------------} inout table PM_Transaction_WORK; in table POR_PPS_Data_TRX_TEMP; in 'Batch Number' sBatchNum; { Preconditions } { None } { Postconditions } { None } DeleteTax {-----------------------------------------------------------------------------Public DeleteTax( POP_ReceiptState, POP_TaxState, boolean ) Deletes a Tax record. Updates distributions for the document. Usage: Used to initiate the deleting of a tax record through the Receipt. ------------------------------------------------------------------------------} inout POP_ReceiptState Me; { State Data Composite } inout POP_TaxState TaxState; { Tax State Data Composite } in boolean DeleteRow; { True - deleting a row from tax entry wdw (handle fr/misc, etc.) False - deleting all taxes (don't handle fr/misc, etc.) } { Preconditions } assert TestRowState(Me, RS_CHANGE) of form TableObj, "ERROR: POP_Receipt.DeleteTax: Precondition RowState is Invalid. Expecting RS_CHANGE". { Postconditions } { None } GetDistributionBackoutPPVAmount {-----------------------------------------------------------------------------Public GetDistributionBackoutPPVAmount( POP_ReceiptLineState, table POP_ReceiptLine, MC_Def_Structure, integer, currency, optional currency); Returns the PPV amount based on the POP Type, Valuation Method ------------------------------------------------------------------------------} inout POP_ReceiptLineState iRcptLine; { Object State } inout table POP_ReceiptLine; { Table Buffer } in MC_Def_Structure iMC; { MC setup for the receipt} in integer iOption; { Valuation Method} inout currency ioPPVAmt; { Returned PPV Amount} optional inout currency ioUPPVAmt; { Returned UPPV Amount (if applicable)} { Preconditions } { None } { Postconditions } { None } GetTotalRet {-----------------------------------------------------------------------------Public GetTotalRet( POP_ReceiptState, table POP_Receipt, optional integer ); ‗Total‘ Calculates and returns the total for the document. Used only for Return type. ------------------------------------------------------------------------------} function returns 'Total' GetTotal. inout POP_ReceiptState inout table optional in integer Me. { State Data Composite } POP_Receipt. { table buffer } nReturnFormat = CURRENCYVIEW_ORIGINATING.{ return orig, func, or reporting } { Preconditions } assert TestRowState (Me, RS_GET + RS_CHANGE) of form TableObj. assert (nReturnFormat = CURRENCYVIEW_ORIGINATING) or (nReturnFormat = CURRENCYVIEW_FUNCTIONAL) or (nReturnFormat = CURRENCYVIEW_REPORTING), "Invalid nReturnFormat specified.". { Postconditions } { None } GetTotalsWithLineRet {-----------------------------------------------------------------------------Public GetTotalsWithLineRet( POP_ReceiptState, table POP_Receipt, currency, Currency, currency, currency, ‗Subtotal‘, ‗Total‘, optional integer ) Calculates and returns the subtotal, trade disc, 1099 amt, and total for the document; taking into account the change in the current line being edited. Usage: This method is used when a line is being edited and then the user tabs from field to field. The HI must update the subtotal and total information so the screen is in sync with what's shown on the line However, since the line is not committed, the HI cannot just call GetSubtotal since the PD will not have this update until the line is saved. Note: The current instance of the line must be suppplied to determine the difference on screen to the previously saved instance. ------------------------------------------------------------------------------} inout POP_ReceiptState Me; { State Data Composite } inout table POP_Receipt; { table buffer for PO } in currency cyExtendedCost; in currency cyOldExtendedCost; in currency cyOrigExtendedCost; in currency cyOldOrigExtendedCost; out 'Subtotal' cySubtotal; { Document Subtotal } out 'Total' cyTotal; { Document Total } optional in integer nReturnFormat = CURRENCYVIEW_FUNCTIONAL; { Orig, Func, or Reporting } { Preconditions } assert TestRowState(Me, RS_GET + RS_CHANGE) of form TableObj, "ERROR: POR_Receipt.GetTotalsWithLine: RowState is invalid. Expecting RS_GET or RS_CHANGE"; assert (nReturnFormat = CURRENCYVIEW_ORIGINATING) or (nReturnFormat = CURRENCYVIEW_FUNCTIONAL), "ERROR: POP_Receipt.GetFreight: nReturnFormat is invalid."; { Postconditions } { None } SetBatchID {-----------------------------------------------------------------------------Public SetBatchID( POP_ReceiptState, table POP_Receipt, ‗Batch Number‘, Integer, ‗Note Index ); integer Verifies the batch exists. Returns: Updates Batch Activity OKAY - Batch successfully assigned. MISSING - Batch does not exist. BATCHACTIVITYERROR - Batch can not be edited MARKED_TO_POST - Batch is marked to post and can not be edited POSTING_DATE_INVALID - Batch Posting date not valid for Exchange Rate ------------------------------------------------------------------------------} function returns integer SetBatchID. inout inout in in out POP_ReceiptState table 'Batch Number' integer 'Note Index' Me. POP_Receipt. sBatchID. nUseBatchDate. NoteIdx. { { { { State Data Composite} table buffer } Batch ID } POSTING_DATE_BATCH or POSTING_DATE_TRX } { Preconditions } assert TestRowState( Me, RS_CHANGE ) of form TableObj, "ERROR: POP_Receipt.SetBatchID: Precondition RowState is Invalid. Expecting RS_CHANGE.". assert (nUseBatchDate = POSTING_DATE_BATCH) or (nUseBatchDate = POSTING_DATE_TRX), "ERROR: POP_Receipt.SetBatchID: Precondition nUseBatchDate must be POSTING_DATE_BATCH or POSTING_DATE_TRX.". { Postconditions } assert TestIsChanged(Me, true) of form TableObj, "ERROR: POP_Receipt.SetBatchID: Object was not updated.". SetDocumentType {-----------------------------------------------------------------------------Public SetDocumentType( POP_ReceiptState, table POP_Receipt, ‗POP Type‘ ); integer Sets the Document Type. Returns: OKAY - Document Type set successfully INVALIDDOCTYPE - DropShip PO only allowed on Invoices VENDORERR - - This change set up a duplicate vendor document error ------------------------------------------------------------------------------} function returns integer SetDocumentType. inout inout in POP_ReceiptState table 'POP Type' Me. POP_Receipt. nDocType. { Object State } { table buffer } { Document Type } { Preconditions } assert TestRowState(Me, RS_CHANGE) of form TableObj, "ERROR: POP_Receipt.SetDocumentType: Precondition RowState is Invalid. Expecting RS_CHANGE.". { Postconditions } assert TestIsChanged(Me, true) of form TableObj, "ERROR: POR_Receipt.SetDocumentType: Object has not changed since it was read from the table."; TRX_PM_Create_Distributions_EX {-----------------------------------------------------------------------------Public TRX_PM_Create_Distributions_EX(‗Account Index‘, string, string, currency, currency, currency, currency, currency, integer, integer, integer, ‗Vendor ID‘, ‗MC Def Structure‘); To add a record in the PM_Distribution_WORK_OPEN table for PPS. ------------------------------------------------------------------------------} in 'Account Index' IN_Account_Index; {GL Account Number Index} in string IN_Voucher_Number; {Voucher Number} in string IN_Apply_To_Voucher; {Apply to voucher number, blank unless from apply of computer checks} in currency IN_Debit_Amount; {Debit Amount} in currency IN_Credit_Amount; {Credit Amount} in currency IN_Orig_Debit_Amt; {Debit Amount - Originating currency} in currency IN_Orig_Credit_Amt; {Credit Amount - Originating currency} inout currency IO_Seq_Counter; {Distribution sequence number} in integer IN_Dist_Type; {Distribution type} in integer IN_Control_Type; {Control type - PAYMENT_NUMBER_CONTROL_TYPE (1), VOUCHER_NUMBER_CONTROL_TYPE (0)} in in in integer IN_Apply_To_Doc_Type; computer checks} 'Vendor ID' IN_Vendor_ID; 'MC Def Structure' IN_MC_Def; {Apply to document type, empty unless from apply of {Vendor ID} {Multicurrency information for distribution} { Preconditions } { None } { Postconditions } { None } Update_Vendor_MSTR_SUM {-----------------------------------------------------------------------------Public Update_Vendor_MSTR_SUM( string, currency ) This script will update specific fields to a vendor record. If the value passed in is empty, cleared or set to zero the field will NOT be updated. ------------------------------------------------------------------------------} in string IN_Vendor_ID; in currency IN_PPS_Amt[2]; {1 - YTD, 2 - LIFE} { Preconditions } { None } { Postconditions } { None } Update_Vendor_Period_Summary {-----------------------------------------------------------------------------Public Update_Vendor_Period_Summary( string, date, currency ) This script will perform all of the updates to the PM_Vendor_MSTR_Period_SUM file. ------------------------------------------------------------------------------} in string IN_Vendor_ID; in date IN_Document_Date; in currency IN_PPS_Amt[2]; {1 - LIFE} { Preconditions } { None } { Postconditions } { None } Restricted Methods PostDistributions {-----------------------------------------------------------------------------Restricted PostDistributions( POP_ReceiptState, table POP_Receipt, boolean, boolean, boolean, boolean, ‗GL_PostingInfo‘, ‗SYPost_Settings‘, ‗Voucher Number‘, ‗Account Index‘ ); integer Controls posting of all POP_Distribution rows for a given POP_Receipt to all tables across modules. ------------------------------------------------------------------------------} function returns integer nStatus. inout inout in in in inout inout in in out POP_ReceiptState table boolean boolean boolean boolean GL_PostingInfo SYPost_Settings 'Voucher Number' 'Account Index' Me. POP_Receipt. fPOPKeepDistHist. fPMKeepDistHist. fFullyPaid. fFirstTrx. CGLPostingInfo. CPostingOptions sVchrNum. nAccruedPurchIdx. { State Data Composite } { table buffer } { true - POP keeping distribution history } { true - vendor keeping distribution history } { true - transaction is fully paid off } { true - this is first trx in batch to be posted } { composite of fields needed for posting to GL } { posting settings pertaining to GL } { PM Voucher Number to use } { Accrued Purchases account index to put in PORcptApply } { Preconditions } assert TestRowState (Me, RS_CHANGE) of form TableObj. assert TestIsAddingNew (Me, false) of form TableObj. assert not empty('TRX Source' of table POP_Receipt). assert not empty('Posted User ID' of table POP_Receipt). { Postconditions } { None } PostHeader {-----------------------------------------------------------------------------Restricted PostHeader( POP_ReceiptState, table POP_Receipt, boolean, boolean, boolean, ‗Voucher Number, integer, integer, ‗Shipping Method‘, ‗PO Number‘ ); integer Controls posting of the POP_Receipt row = PM tables. ------------------------------------------------------------------------------} function returns inout inout in in in in in in in in integer nStatus. Me. POP_Receipt. fPMKeepTrxHist. fPMKeepFiscHist. fPMKeepCalHist. sVchrNum. nDocFiscYear. nDocFiscPeriod. sShipMethod. sPMPOID. { { { { { { { { { { State Data Composite } table buffer } true - vendor keeping trx history } true - vendor keeping fiscal period history } true - vendor keeping calendar period history } PM Voucher number to use } fiscal year of receipts document date } fiscal period of receipts document date } shipping method for receipt (from PO) } PO Number to post to PM } POP_ReceiptState table boolean boolean boolean 'Voucher Number' integer integer 'Shipping Method' 'PO Number' { Preconditions } assert TestRowState (Me, RS_CHANGE) of form TableObj. assert TestIsAddingNew (Me, false) of form TableObj. assert not empty ('TRX Source' of table POP_Receipt). { Postconditions } { None } PostPPS {-----------------------------------------------------------------------------Restricted PostPPS(table PM_Transaction_WORK, ‗Batch Number‘); ------------------------------------------------------------------------------} inout file PM_Transaction_WORK; inout 'Batch Number' IO_sPPSBatchNumber; { Preconditions } { None } { Postconditions } { None } PostPPSVendorDocument {-----------------------------------------------------------------------------Restricted PostPPSVendorDocument(table POR_PPS_Data_TRX_TEMP, ‗Batch Number‘, boolean); ------------------------------------------------------------------------------} inout table POR_PPS_Data_TRX_TEMP; inout 'Batch Number' IO_sPPSBatchNum; out boolean O_fPosted; { Preconditions } { None } { Postconditions } { None } PostTaxes {-----------------------------------------------------------------------------Restricted PostTaxes( POP_ReceiptState, table POP_Receipt, boolean, boolean, boolean, ‗Voucher Number‘, integer, integer ); integer Controls posting of all POP_Tax rows for a given POP_Receipt to all tables across modules. Usage: Used when Posting a Receipt. ------------------------------------------------------------------------------} function returns integer nStatus. inout inout in in in in in in POP_ReceiptState table boolean boolean boolean 'Voucher Number' integer integer Me. POP_Receipt. fPOPKeepRcptHist. fPMKeepTrxHist. fFullyPaid. sVchrNum. nDocFiscYear. nDocFiscPeriod. { { { { { { { { State Data Composite } table buffer } true - POP keeping receipt history } true - PM keeping Trx history (vendor) } Purchase Order date } PM Voucher number to use } fiscal year of receipt's document date } fiscal period of receipt's dpcument date } { Preconditions } assert ( TestRowState( Me, RS_CHANGE ) of form TableObj ), "ERROR: POR_Receipt.PostTaxes: assert ( not Me:IsAddingNew ), "ERROR: POR_Receipt.PostTaxes: assert ( not empty('TRX Source' of "ERROR: POR_Receipt.PostTaxes: { Postconditions } { None } Invalid RowState - expecting RS_CHANGE."; Invalid IsAddingNew."; table POP_Receipt) ), TRX Source not set."; POR_ReceiptLine Public Methods AdjustMFGAmt {-----------------------------------------------------------------------------Public AdjustMFGAmt( POP_ReceiptLineState, table POP_ReceiptLine, MC_Def_Structure, currency, optional boolean) Adjust Overhead / Applied Overhead distribution lines for a receipt. MFG has to be registered. ------------------------------------------------------------------------------} inout POP_ReceiptLineState Me; { Receipt Line State Data Composite } inout table POP_ReceiptLine; { Receipt Line table buffer } inout MC_Def_Structure ioMCDefStruc; out currency oIVDiff; optional in boolean iIsBackingOutDistribution=false; { Preconditions } { None } { Postconditions } { None } CheckForMultiplePOLines {-----------------------------------------------------------------------------Public CheckForMultiplePOLines( ‗PO Number‘ ):integer; Check if PO has multiple lines. Ignore Blanket PO parent line. ------------------------------------------------------------------------------} function returns integer rReturn; in 'PO Number' iPO; { Preconditions } { None } { Postconditions } { None } GetAccruedBackoutAmount {-----------------------------------------------------------------------------Public GetAccruedBackoutAmount( POP_ReceiptLineState, table POP_ReceiptLine, optional boolean ); currency Get Originating Extended Cost from the Original Receipt ------------------------------------------------------------------------------} function returns currency rIVBackOutAmount; inout inout optional POP_ReceiptLineState table in boolean Me; POP_ReceiptLine; iBackoutDistribution=false; { Preconditions } { None } { Postconditions } { None } GetExtCost {-----------------------------------------------------------------------------Public GetExtCost(POP_ReceiptLineState, table POP_ReceiptLine, optional boolean); currency Get Unit Cost to back out of inventory ------------------------------------------------------------------------------} function returns currency rExtCost; inout inout optional POP_ReceiptLineState table in boolean Me; POP_ReceiptLine; iBackoutDistribution=false; { Preconditions } { None } { Postconditions } { None } GetIVBackoutAmount {-----------------------------------------------------------------------------Public GetIVBackoutAmount ( POP_ReceiptLineState, table POP_ReceiptLine, optional boolean ) ; currency Get Originating Extended Cost from the Original Receipt ------------------------------------------------------------------------------} function returns currency rIVBackOutAmount; inout inout optional POP_ReceiptLineState table in boolean Me; POP_ReceiptLine; iBackoutDistribution=false; { FALSE: Calculate using current U of M and Qty Reserved TRUE: Calculate using old U of M and Qty Reserved } { Preconditions } { None } { Postconditions } { None } GetIVBackoutAmount_Functional {-----------------------------------------------------------------------------Public GetIVBackoutAmount_Functional ( POP_ReceiptLineState, table POP_ReceiptLine, optional boolean ) ; currency Get Functional Extended Cost from the Original Receipt ------------------------------------------------------------------------------} function returns currency rIVBackOutAmount; inout inout optional POP_ReceiptLineState table in boolean Me; POP_ReceiptLine; iBackoutDistribution=false; { FALSE: Calculate using current U of M and Qty Reserved TRUE: Calculate using old U of M and Qty Reserved } { Preconditions } { None } { Postconditions } { None } GetMFGDetails {-----------------------------------------------------------------------------Public GetMFGDetails ( POP_ReceiptLineState, boolean ) Get Manufacturing details. ------------------------------------------------------------------------------} inout POP_ReceiptLineState Me; in boolean iBackoutDistribution; { Preconditions } { None } { Postconditions } { None } GetOrigExtCost {-----------------------------------------------------------------------------Public GetOrigExtCost( POP_ReceiptLineState, table POP_ReceiptLine, optional boolean ); currency Get Originating Extended Cost based on valuation method and item type ------------------------------------------------------------------------------} function returns currency rExtUnitCost; inout POP_ReceiptLineState Me; inout table POP_ReceiptLine; optional in boolean iBackoutDistribution=false; { Preconditions } { None } { Postconditions } { None } GetOrigUnitCost {-----------------------------------------------------------------------------Public GetOrigUnitCost( POP_ReceiptLineState, table POP_ReceiptLine, optional boolean ); currency Get Originating Unit Cost to back out of inventory ------------------------------------------------------------------------------} function returns currency rUnitCost; inout inout optional POP_ReceiptLineState table in boolean Me; POP_ReceiptLine; iBackoutDistribution=false; { Preconditions } { None } { Postconditions } { None } GetPORItemPurchaseTaxID {-----------------------------------------------------------------------------Public GetPORItemPurchaseTaxID( POP_ReceiptLineState, ‗Purchase Tax Options‘ ); 'Purchase Site Tax Schedule ID' Return the Item Tax Schedule for the given return line ------------------------------------------------------------------------------} function returns 'Purchase Site Tax Schedule ID' rSiteTaxID; inout inout POP_ReceiptLineState 'Purchase Tax Options' Me; ioTaxOption; { Preconditions } assert TestRowState( Me, RS_GET + RS_CHANGE ) of form TableObj,"ERROR: POP_ReceiptLine. GetPORItemPurchaseTaxID. Row State must be RS_GET or RS_CHANGE."; { Postconditions } { None } GetPORSitePurchaseTaxID {-----------------------------------------------------------------------------Public GetPORSitePurchaseTaxID( POP_ReceiptLineState ); 'Purchase Site Tax Schedule ID' Return the Site Tax Schedule for the given return line ------------------------------------------------------------------------------} function returns 'Purchase Site Tax Schedule ID' rSiteTaxID; inout POP_ReceiptLineState Me; { Preconditions } assert TestRowState( Me, RS_GET + RS_CHANGE ) of form TableObj,"ERROR: POP_ReceiptLine. GetPORItemPurchaseTaxID. Row State must be RS_GET or RS_CHANGE."; { Postconditions } { None } GetQtyReserved {-----------------------------------------------------------------------------Public GetQtyReserved ( POP_ReceiptLineState); currency ------------------------------------------------------------------------------} function returns currency cyQtyReserved; inout POP_ReceiptLineState Me; { ReceiptLine State Data } { Preconditions } assert TestRowState(Me, RS_GET + RS_CHANGE) of form TableObj, "ERROR: POP_ReceiptLine.GetQtyInvoiced: RowState is invalid. { Postconditions } { None } Cannot be RS_NONE"; GetUnitCost {-----------------------------------------------------------------------------Public GetUnitCost( POP_ReceiptLineState, table POP_ReceiptLine, optional boolean ); vcurrency Get Unit Cost to back out of inventory ------------------------------------------------------------------------------} function returns vcurrency rUnitCost; inout inout optional POP_ReceiptLineState table in boolean Me; POP_ReceiptLine; iBackoutDistribution=false; { Preconditions } assert TestRowState(Me, RS_GET + RS_CHANGE) of form TableObj, "ERROR: POP_ReceiptLine.GetUnitCost: RowState is invalid. Cannot be RS_NONE". assert (nReturnFormat = CURRENCYVIEW_ORIGINATING) or (nReturnFormat = CURRENCYVIEW_FUNCTIONAL) or (nReturnFormat = CURRENCYVIEW_REPORTING), "ERROR: POP_ReceiptLine.GetUnitCost: nReturnFormat is invalid". { Postconditions } { None } POR_ReturnLine Public ClearReturnLineData {-----------------------------------------------------------------------------Public ClearReturnLineData(POR_ReturnLineData) Clear the data composite ------------------------------------------------------------------------------} inout POR_ReturnLineData ioRetLineData; {Preconditions} {None} {Postconditions} {None} DeleteRange {-----------------------------------------------------------------------------Public DeleteRange (‗POP Receipt Number‘):integer; Delete all records with the specified receipt number ------------------------------------------------------------------------------} function returns integer rStatus; in 'POP Receipt Number' lRcptNum; {Preconditions} {None} {Postconditions} {None} DeleteReturnLine {-----------------------------------------------------------------------------Public DeleteReturnLine(POP_ReceiptLineState, table POP_ReceiptLine):integer; Delete the Return Line for a specified record in POP_ReceiptLine ------------------------------------------------------------------------------} function returns integer rStatus; inout inout POP_ReceiptLineState table Me; POP_ReceiptLine; {Preconditions} {None} {Postconditions} {None} GetReturnLine {-----------------------------------------------------------------------------Public GetReturnLine(POP_ReceiptLineState, table POP_ReceiptLine, POP_ReturnLineData):integer; Get the specified Return Line linked to the POP_ReceiptLine record ------------------------------------------------------------------------------} function returns integer rStatus; inout inout inout POP_ReceiptLineState table POR_ReturnLineData Me; POP_ReceiptLine; ioRetLineData; {Preconditions} {None} {Postconditions} {None} GetTotalAmounts {-----------------------------------------------------------------------------Public GetTotalAmounts(‗POP Receipt Number‘, currency, currency, currency, Optional boolean); Sum up the total Purch, Accrue and Variance amounts in the POR_ReturnLine table for the specified receipt Returns: Total Purch, Accrue and Variance for the specified return receipt ------------------------------------------------------------------------------} in 'POP Receipt Number' iRcptNum; inout currency ioPurchAmt; inout currency ioAccrueAmt; inout currency ioVarianceAmt; optional in boolean iOriginatingView=true; {Preconditions} {None} {Postconditions} {None} RecalcFunctional {-----------------------------------------------------------------------------Public RecalcFunctional(POP_ReturnLineData, MC_Def_Structure); Calculate the functional amounts based on the MC def ------------------------------------------------------------------------------} inout POR_ReturnLineData ioRetLineData; inout MC_Def_Structure ioMCDef; {Preconditions} {None} {Postconditions} {None} SaveReturnLine {-----------------------------------------------------------------------------Public SaveReturnLine(POP_ReceiptLineState, table POP_ReceiptLine, POP_ReturnLineData):integer; Saves the composite into the table ------------------------------------------------------------------------------} function returns integer rStatus; inout inout inout POP_ReceiptLineState table POR_ReturnLineData Me; POP_ReceiptLine; ioRetLineData; {Preconditions} {None} {Postconditions} {None} SetAccountIndex {-----------------------------------------------------------------------------Public SetAccountIndex(POP_ReturnLineData, optional ‗Account Index‘, optional ‗Account Index‘, optional ‗Account Index‘); Set Account Index for Inventory, Variance and Offset ------------------------------------------------------------------------------} inout POR_ReturnLineData ioRetLineData; optional in 'Account Index' iInventorydx; optional in 'Account Index' iOffsetIdx; optional in 'Account Index' iVarianceIdx; {Preconditions} {None} {Postconditions} {None} SetFunctionalAmounts {-----------------------------------------------------------------------------Public SetFunctionalAmounts(POP_ReturnLineData, optional currency, optional currency, optional currency); Set functional amounts for Inventory, Variance and Offset ------------------------------------------------------------------------------} inout POR_ReturnLineData ioRetLineData; optional in currency iInventoryAmt; optional in currency iOffsetAmt; optional in currency iVarianceAmt; {Preconditions} {None} {Postconditions} {None} SetOriginatingAmounts {-----------------------------------------------------------------------------Public SetOriginatingAmounts(POP_ReturnLineData, optional currency, optional currency, optional currency); Set originating amounts for Inventory, Variance and Offset ------------------------------------------------------------------------------} inout POR_ReturnLineData ioRetLineData; optional in currency iInventoryAmt; optional in currency iOffsetAmt; optional in currency iVarianceAmt; {Preconditions} {None} {Postconditions} {None} SetReceiptID {-----------------------------------------------------------------------------Public SetReceiptID (POP_ReceiptLineState, table POP_ReceiptLine, POP_ReturnLineData); Saves the composite into the table ------------------------------------------------------------------------------} inout POP_ReceiptLineState Me; inout table POP_ReceiptLine; inout POR_ReturnLineData ioRetLineData; {Preconditions} {None} {Postconditions} {None} POR_ShipIvcApply Class Methods ExistPostedForShipment {-----------------------------------------------------------------------------Class ExistPostedForShipment(POP_ReturnData, table POP_PORcptApply, integer); boolean Determines if any posted invoice records exist for a given Shipment. ------------------------------------------------------------------------------} function returns boolean ExistPostedForShipment; inout in inout POR_ReturnData table integer cmpReturnData; POP_PORcptApply; nCountInv; {Return Data Composite } { Preconditions } assert ( not empty(cmpReturnData:'Receipt Return Number') ); { Postconditions } { None } Public Methods Get {-----------------------------------------------------------------------------Public Get(POP_ShipIvcApplyState, table POP_ShipIvcApply, integer, ‗POP Invoice Number‘, ‗Invoice Line Number‘, ‗POP Receipt Number‘, ‗Receipt Line Number‘); integer Retrieves a Shipment Invoice Apply object. -----------------------------------------------------------------------------} function returns integer rReturn; inout inout in POP_ShipIvcApplyState table integer ioShipIvcApply; { State Data Composite } POP_ShipIvcApply; { table buffer } iOp; { Database operation to perform: [GET] + [FIRST | PREV | EQUAL | NEXT | LAST] -or[CHG] + [FIRST | PREV | EQUAL | NEXT | LAST] -or[ADDNEW] + [EQUAL]} iIvcNum; iIvcLineNum; iRcptNum; iRcptLineNum; in in in in 'POP Invoice Number' 'Invoice Line Number' 'POP Receipt Number' 'Receipt Line Number' { Preconditions } { None } { Postconditions } { None } GetMaxInvoiceReserve {-----------------------------------------------------------------------------Public GetMaxInvoiceReserve(‗POP Invoice Number‘, ‗Invoice Line Number‘, ‗POP Receipt Number‘, ‗Receipt Line Number‘); currency Get maximum QTY Available to return for a specific invoice ------------------------------------------------------------------------------} function returns currency cyMaxInvoiceReserve; in in in in 'POP Invoice Number' 'Invoice Line Number' 'POP Receipt Number' 'Receipt Line Number' sIvcID; nIvcOrd; sRcptID; nRcptOrd; { { { { POP Invoice Number } Invoice Line Number } POP Receipt Number } ReceiptLine ordinal } { Preconditions } { None } { Postconditions } { None } GetTotalInvoiceReserve {-----------------------------------------------------------------------------Public GetTotalInvoiceReserve(‗POP Receipt Number‘, ‗Receipt Line Number‘, optional currency, optional currency):currency; Returns the quantity invoice reserve for posted/unposted invoices that were matched to the given Shipment Line. ------------------------------------------------------------------------------} function returns currency cyTotalInvoiceReserve; in 'POP Receipt Number' sRcptID; { Receipt Return Number } in 'Receipt Line Number' nOrd; { Receipt Return Line Number } optional inout currency cyTotalPosted; optional inout currency cyTotalUnposted; { Preconditions } assert ( not empty(sRcptID) ) and ( nOrd > 0 ); { Postconditions } {None} POR_Tax Class Methods ClearTaxAmts {----------------------------------------------------------------------------Class Method currency ClearTaxAmts('POP Receipt Number', 'Vendor ID', 'MC Def Structure') clears the Taxable Purchases, Tax Amount, Freight Tax Amount, Misc Tax Amount and their corresponding originating fields for the given receipt. ------------------------------------------------------------------------------} in 'POP Receipt Number' sRcptID; in 'Vendor ID' sVendorID; in 'MC Def Structure' MCDef; {Preconditions} {None} {Postconditions} {None} RecalcDistributions {-----------------------------------------------------------------------------Class RecalcDistributions(POP_ReceiptState, MC_Def_Structure); Recalculates the tax distributions for the Receipt. ------------------------------------------------------------------------------} inout POP_ReceiptState Receipt; in 'MC Def Structure' MCDef; {Preconditions} {None} {Postconditions} {None} Public Methods Post {-----------------------------------------------------------------------------Public Post(POP_TaxState, boolean, boolean, boolean, boolean, date, integer, integer, ‗Vendor ID‘, ‗Voucher Number‘, ‗Batch Number‘, boolean, ‗TRX Source‘, date, ‗GL Posting Date‘, ‗EC Transaction‘); integer Posting of taxes to PM from POP. Returns: OKAY POP_POST_ERROR_TAXDTL POP_POST_ERROR_TAXSUM POP_POST_ERROR_PMTAXWORK POP_POST_ERROR_POPTAXHIST ------------------------------------------------------------------------------} function returns integer nStatus; inout in in in in in in in in POP_TaxState boolean boolean boolean boolean date integer integer 'Vendor ID' Me; fPOPKeepRcptHist; fPMKeepTrxHist; fPMPrintHATB; fFullyPaid; dtDocDate; nFiscYear; nFiscPeriod; sVendID; { { { { { { { { { Tax State Data } True - POP keeping Receipt history } true - PM keeping Trx History (vendor) } true - PM allows printing of HATB (setup) } true - document is fully paid off } Receipt Date } fiscal year of receipt date } fiscal period of the receipt date } Vendor ID } in in in in in in in 'Voucher Number' 'Batch Number' boolean 'TRX Source' date 'GL Posting Date' 'EC Transaction' sVchNum; sBatchNum; fIncrease; sTrxSource; dtTaxDate; dtPostingDate; fEuTrx; { { { { { { { PM Voucher Number of document } Batch Number from Rcv Doc } True - Increase Tax amounts; False - Decrease } audit trail code } Receipt Date } GL Posting Date } EU Transaction } { Preconditions } assert TestRowState (Me, RS_GET) of form TableObj; { Postconditions } {None} RecalcLineDistributions {-----------------------------------------------------------------------------Public RecalcLineDistributions(‗POP Receipt Number‘, ‗Receipt Line Number‘, ‗Account Index‘, ‗Vendor ID‘, MC_Def_Structure); Adjusts the purchases distributions for the receipt line if the tax detail is a backout tax. ------------------------------------------------------------------------------} in 'POP Receipt Number' sRcptID; { Receipt Number } in 'Receipt Line Number' nLine; { line number } in 'Account Index' cyPurchAcctIdx;{ The line's inventory acct index } in 'Vendor ID' sVendorID; in 'MC Def Structure' MCDef; {Preconditions} {None} {Postconditions} {None} Glossary Assertion An expression stating an expected condition at a certain point in code. If the condition is satisfied at that point in the code, nothing happens. If the condition is not satisfied, an appropriate error message is displayed. Some languages, such as C, have an assert() statement. In Dynamics they are currently implemented manually through the use of an “if” statement. When a particular piece of code is written, the developer may be assuming that the code is being called under certain conditions. They can document those assumptions by using assertions to state conditions they expect to be satisfied at that point in the code. Unlike comments, assertions will tell the user of the code if they’re using it improperly. Such assertions are typically removed for the release of the final product by using conditional compilation. Assertions are often used to test preconditions and post conditions but may appear anywhere in code (e.g. to verify that a calculation produced a correct result). Assertions silently test the developer’s assumptions as code is running and, when they are false, quickly notify the programmer to error either in use of a routine or in the way it is written. Examples: Assert ―Discount Percent (calculated when subtotal is adjusted) is <= 100.00% and >= 0.00%‖ Assert ―Extended cost (calculated after quantity or unit cost is changed) is within $.01 of Unit Cost * Quantity Ordered‖ Attribute A piece of data that describes an object. Some languages refer to it as an object property, a member variable or simply “data.” Examples: Object: Object: Object: Object: Car Vendor PO PO Line Attributes: Attributes: Attributes: Attributes: Color, Weight Name, Address, Credit Limit ID (number), Freight (amount), Total (amount) Quantity Ordered, Extended Cost Class Used as a template for each object that is created, inheriting all attributes and services defined. When writing code, the object class is being defined, not the object itself. An object doesn’t exist until it is created at runtime based upon its object class. In Dynamics, a class can be seen as the object form, composite and table definition. Creating an object of that class is then accomplished by creating a variable of the correct composite type and using the correct table buffer. Collection In general, a grouping of or more individual objects, usually of the same class. In Dynamics most objects are collections and serve to hide and enforce the business rules for rows in a table. Thus a collection of objects is stored on disk as a table of rows. One object in a Dynamics collection is the current object (see current object), and some collection methods operate on the entire collection while others will operate only on the current object. Commit A method on most objects that stores a permanent copy of the object for later use—typically to an external storage device such as a hard disk, represented as a row in a table. Composite The Dexterity feature that allows a list of fields to be grouped, displayed and manipulated as a unit. Since Dexterity does not implement true data structures, composites are used to collect related data together. All objects have a composite fields referred to as its state, and may have other composites that are passed to and from various methods on the object rather than passing individual arguments. Create The method on all objects that prepares the object for use. Once the object is no longer in use, it should be destroyed using the Destroy method. Once Create has been called, other methods on the object may be invoked. It will not add a new object to the collection (nor a row to the database); use the AddNew method for that purpose. The Create methods on some objects provide the ability to retrieve an object. The DSDK documentation for the Create method will indicate whether it has such capabilities. Current Object The object within a Dynamics collection that is manipulated by methods on the collection. It is in one of four states:  None (there is no current object)  Get (the current object read but not changed)  Change (the current object may be read or changed)  AddNew (the current object may be read or changed but has never been saved). Destroy The method on all objects that destroys the object and releases any resources it is using. Destroy doesn’t delete the object from its collection or its database information; instead it removes from memory. Instance A single object of a particular class (as distinguished from a class which is the template for all objects). Many instances of an object can be created from a class, just as many variables can be created from a particular data type. In Dynamics, an object instance is created and prepared for use by (1) declaring a composite variable of the objects’ composite field type and (2) calling the Create method for the object with the composite and the proper table buffer. An instance is destroyed by calling the Destroy method for the object. Note that destroying an instance of a collection doesn’t destroy the contents of the table it uses for storage. Instead the memory copy of the object is no longer available for use. A collection represents two objects at the same time: the collection itself, which is instantiated by calling the Create method, and the current object (see current object) which is accessed through the collection. As a result, the current object, unlike the collection, does not need to be instantiated separately. Methods A way of communicating with an object (sometimes referred to as service or routine). Methods are implemented in Dexterity as form functions and procedures. Even though an object has attributes, those attributes are not accessed directly in Dynamics because their implementation may change. (Thus, in Dynamics all attributes are private.) The most simple of methods return an attribute from the object, or take an argument and save the value in the object. More advanced methods will use arguments to perform and store the results of calculations, to communicate with other objects, to perform various database operations, and so forth. Examples: Object: Object: Object: Object: Car Vendor PO POLine Methods: Methods: Methods: Methods: GetExteriorColor, GetInteriorColor, GetWeight GetName, SetName, SetCreditLimit, IsCreditLimitExceeded SetVendID, AddLine, GetStatus, GetTotal SetItemID, SetUnitCost, SetQty, GetExtCost Object Formally, an instance of a class, though the term is often used synonymously with both class and instance, depending upon the context. (See instance and class.) Informally, an object in Dynamics handles the business rules for some abstract or real world entity, such as a purchase order, a purchase order line item, a GL account, a vendor, a customer and so forth. Objects are usually nouns: people, places and things about which the software is concerned. For example, an accounts receivable module is interested in customers and transactions between customers and the company. Thus customers and transactions would be objects in a accounts receivable module. An object has a name (derived from the role it plays in the system), attributes and services. An attribute is a piece of data describing an instance of the object, such as the name, address and credit limit for a customer. An object understands the proper way to deal with its attributes (in an accounting system it understands its business rules) and provides methods to allow users of that object to utilize that functionality (or services). Objects provide a central location for all code that acts upon the data within the object, rather than duplicating code in each routine where that data is manipulated. Many object classes have been defined in Dynamics, including:  Most setup information (Comments, Payment Terms, Shipping Methods)  Cards (Customer, Vendor, Item)  Transactions (which may be represented by one or more objects, and interact with many others objects to accomplish their job) For example, the Purchase Order Entry window is implemented by directly accessing objects: the PO and the PO Line objects. The PO object contains all header/footer information, while the PO Line object contains all information for each line item assigned to a PO. The PO object then interacts with card and setup objects (such as the Vendor, Payment Terms, and Shipping Methods) while the PO Line interacts with the Item, Unit of Measure and other objects. Postconditions A statement of what will be accomplished once a routine has finished execution. Code can be made selfverifying by putting the assertions stating the post conditions at the end of the routine. This is done in Dynamics and most often will find errors in the way the method was implemented. Frequently post conditions are a reiteration of the statements executed within a method (to protect from later changes to the code that are faulty), but may also check to be sure some other part of the object is still correct. For example, after the vendor is set on a purchase order post conditions could check to ensure other related fields were properly updated with information from the vendor card. Preconditions A statement of what must be true for a routine to correctly execute. A routine can warn its caller of incorrect use by putting assertions stating the preconditions at the start of the routine. This is done in Dynamics and most often will find errors in the way the method was called. For example, correct use of the Destroy method requires that the object had first been created with the Create method. Property See Attribute Routine See Method Service See Method State The state of an object is the set of values of all of its attributes. Thus the state is the set of current values of any internal data for a particular object. For example, consider a complex number: its state consists of a real and an imaginary part. It is possible for an object to be a valid or an invalid state; a valid state is one where the attributes of the object are consistent with each other. For example, if there is a total on a purchase order, its value is supposed to be equal to the subtotal plus taxes. If they weren’t equal the object would be in an inconsistent state. Dynamics objects are written to make it difficult for a user of any given object to put it into an inconsistent state. (External consistency is also important but is a different issue than internal consistency. For example, if a particular vendor is in use on a purchase order, the purchase order is externally consistent if the vendor exists in the system. This is also known as referential integrity.) State Transition Diagram A very simple tool for describing the effects of various actions on the state of an object. For example, a purchase order has a status indicating whether it is new, open, canceled, modified or closed. Calling certain methods may cause the purchase order to change from the open state to the closed state. A state transition diagram is used to illustrate those changes. It also shows what sort of state changes are legal; for example, it is impossible for a purchase order to change from the new to the closed state. Such information can be obtained from a state transition diagram. For Dynamics objects, a state transition diagram was produced for the collection objects showing what the valid state are for those objects and indicating any state changes resulting from calling methods on an object. For example, when a collection object is created the Commit() method cannot be called on it because there is no data to save—the Get() method would need to be called first. The POP DSDK provides that state transition diagram.

Related docs
paper purchasing
Views: 18  |  Downloads: 1
PURCHASING
Views: 12  |  Downloads: 1
PURCHASING
Views: 6  |  Downloads: 3
chemical purchasing
Views: 89  |  Downloads: 6
Purchasing Policy
Views: 63  |  Downloads: 0
PURCHASING SYSTEM
Views: 10  |  Downloads: 0
Purchasing Manual
Views: 54  |  Downloads: 12
NEVADA STATE PURCHASING
Views: 9  |  Downloads: 0
PURCHASING OFFICE
Views: 0  |  Downloads: 0
PURCHASING MANUAL
Views: 0  |  Downloads: 0
Purchasing Contracts
Views: 114  |  Downloads: 10
PURCHASING DIVISION
Views: 4  |  Downloads: 0
premium docs
Other docs by Heroes On Para...
How To Chart In
Views: 13  |  Downloads: 0
Home In The Inventory
Views: 33  |  Downloads: 0
Ideal Weight Table For
Views: 26  |  Downloads: 1
In The Check Register
Views: 13  |  Downloads: 0
Loan Payment Calculator Auto
Views: 28  |  Downloads: 1
How To Define Function
Views: 40  |  Downloads: 0
Interest Rate Amortization Table
Views: 22  |  Downloads: 0
Interest Only Mortgage Amortization
Views: 51  |  Downloads: 1
Interest Loan Payoff Calculator
Views: 76  |  Downloads: 0
Ideal Weight 5 2
Views: 258  |  Downloads: 0
Home Loan Extra Payment
Views: 23  |  Downloads: 0
Loan Amortization Table Calculator
Views: 98  |  Downloads: 0
Free Online Budget Planner
Views: 924  |  Downloads: 0
Invoice Template For Pages
Views: 87  |  Downloads: 1
How To Calculate 401K
Views: 58  |  Downloads: 0