Basic Business Processes for the Purchase Entity
The Purchase Entity has the following BPs:
- Add a Purchase Object
- Modify a Purchase Object
- Delete a Purchase Object
- Post a Purchase Object
- UnPost a Purchase Object
Purchase Quotes, Orders, Shipments and Invoices are Purchase Entities
Add a Purchase Object
This BP adds a bPurchase record and a related bBusinessDocument record- and if needed - it adds records to the related bBusinessDocument_ProductLine and bBusinessDocument_TAXLine tables.
Name
BP_Purchase_add
Call
BP_Purchase_add(LOCAL p_R_bBusinessDocument is Record of bBusinessDocument, LOCAL p_R_bPurchase is Record of bPurchase, p_Array_BusinessDocument_ProductLine, p_Array_BusinessDocument_ExpenseLine , p_Array_BusinessDocument_TAXLine, p_Array_BusinessDocument_AdjustTAXLine, LOCAL p_sUserPK is string, p_sReturnPK is string, p_sErrorMessage is string)
Returns
- True or
- False
Flow
- Start a transaction
- Call BP_Purchase_add_private, passing to it the SAME variables it received
- BP_Purchase_add_private returns true (if everything was OK) or false (if there was an error)
IF true then COMMIT ELSE ROLLBACK
Other Data Returned
- p_sReturnPK - see the call - returns the PK of the bBusinessDocument, if the add was successful
- p_sErrorMessage - see the call - returns the error, if the add was not successful
Modify a Purchase Object
This BP modifies a bPurchase record and its related bBusinessDocument record- and if needed - it adds/modifies/deletes records from the related bBusinessDocument_ProductLine and bBusinessDocument_TAXLine tables.
This BP can act on Purchase Objects that have NOT been posted.
Name
BP_Purchase_modify
Call
BP_Purchase_modify(LOCAL p_R_bBusinessDocument is Record of bBusinessDocument, LOCAL p_R_bPurchase is Record of bPurchase, p_Array_BusinessDocument_ProductLine, p_Array_BusinessDocument_ExpenseLine , p_Array_BusinessDocument_TAXLine, p_Array_BusinessDocument_AdjustTAXLine, LOCAL p_sUserPK is string, p_sErrorMessage is string)
Returns
- True or
- False
Flow
- Start a transaction
- Call BP_Purchase_modify_private, passing to it the SAME variables it received
- BP_Purchase_modify_private returns true (if everything was OK) or false (if there was an error)
IF true then COMMIT ELSE ROLLBACK
Other Data Returned
- p_sErrorMessage - see the call - returns the error, if the modify was not successful
Delete a Purchase Object
This BP deletes a bPurchase record and its related bBusinessDocument record- and if needed - it deletes all the records from the related bBusinessDocument_ProductLine and bBusinessDocument_TAXLine tables.
This BP can act on Purchase Objects that have NOT been posted.
Name
BP_Purchase_delete
Call
BP_Purchase_delete(LOCAL p_sPK is string, LOCAL p_sUserPK is string, p_sErrorMessage is string)
Returns
- True or
- False
Flow
- Start a transaction
- Call BP_Purchase_delete_private, passing to it the SAME variables it received
- BP_Purchase_delete_private returns true (if everything was OK) or false (if there was an error)
IF true then COMMIT ELSE ROLLBACK
Other Data Returned
- p_sErrorMessage - see the call - returns the error, if the add was not successful
Post a Purchase Object to the ERP
This BP posts a Purchase Object to the ERP - see Purchase Transactions for more information about posting.
This BP can act on Purchase Objects that have NOT been posted.
Name
BP_Purchase_Post
Call
BP_Purchase_Post(LOCAL p_sPK is string, LOCAL p_sUserPK is string, p_sErrorMessage is string)
Returns
- True or
- False
Flow
- Start a transaction
- Call BP_Purchase_Post_private, passing to it the SAME variables it received
- BP_Purchase_Post_private returns true (if everything was OK) or false (if there was an error)
IF true then COMMIT ELSE ROLLBACK
Other Data Returned
- p_sErrorMessage - see the call - returns the error, if the add was not successful
UnPost a Purchase Object from the ERP
This BP unposts a Purchase Object from the ERP - see Purchase Transactions for more information about posting.
This BP can act on Purchase Objects that have been posted.
Name
BP_Purchase_unPost
Call
BP_Purchase_unPost(LOCAL p_sPK is string, LOCAL p_sUserPK is string, p_sErrorMessage is string)
Returns
- True or
- False
Flow
- Start a transaction
- Call BP_Purchase_unPost_private, passing to it the SAME variables it received
- BP_Purchase_unPost_private returns true (if everything was OK) or false (if there was an error)
IF true then COMMIT ELSE ROLLBACK
Other Data Returned
- p_sErrorMessage - see the call - returns the error, if the add was not successful
next -> PurchaseAP BPs
Copyright 2017 - computerplus