Basic Business Processes for the Sales Entity
The Sales Entity has the following BPs:
- Add a Sales Object
- Modify a Sales Object
- Delete a Sales Object
- Post a Sales Object
- UnPost a Sales Object
Quotes, Orders, Shipments and Invoices are Sales Entities
Add a Sales Object
This BP adds a bSales record and a related bBusinessDocument record- and if needed - it adds records to the related bBusinessDocument_ProductLine and bBusinessDocument_TAXLine tables.
Name
BP_Sales_add
Call
BP_Sales_add (LOCAL p_R_bBusinessDocument is Record of bBusinessDocument, LOCAL p_R_bSales is Record of bSales, p_Array_BusinessDocument_ProductLine , p_Array_BusinessDocument_TAXLine, p_Array_BusinessDocument_AdjustTAXLine, p_Array_BusinessDocument_CashLine, LOCAL p_sUserPK is string, p_sReturnPK is string, p_sErrorMessage is string)
Returns
- True or
- False
Flow
- Start a transaction
- Call BP_Sales_add_private, passing to it the SAME variables it received
- BP_Sales_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 Sales Object
This BP modifies a bSales 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 Sales Objects that have NOT been posted.
Name
BP_Sales_modify
Call
BP_Sales_modify(LOCAL p_R_bBusinessDocument is Record of bBusinessDocument, LOCAL p_R_bSales is Record of bSales, p_Array_BusinessDocument_ProductLine , p_Array_BusinessDocument_TAXLine, p_Array_BusinessDocument_AdjustTAXLine, p_Array_BusinessDocument_CashLine, LOCAL p_sUserPK is string, p_sErrorMessage is string)
Returns
- True or
- False
Flow
- Start a transaction
- Call BP_Sales_modify_private, passing to it the SAME variables it received
- BP_Sales_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 Sales Object
This BP deletes a bSales 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 Sales Objects that have NOT been posted.
Name
BP_Sales_delete
Call
BP_Sales_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_Sales_delete_private, passing to it the SAME variables it received
- BP_Sales_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 Sales Object to the ERP
This BP posts a Sales Object to the ERP - see Sales Transactions for more information about posting.
This BP can act on Sales Objects that have NOT been posted.
Name
BP_Sales_Post
Call
BP_Sales_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_Sales_Post_private, passing to it the SAME variables it received
- BP_Sales_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 Sales Object from the ERP
This BP unposts a Sales Object from the ERP - see Sales Transactions for more information about posting.
This BP can act on Sales Objects that have been posted.
Name
BP_Sales_unPost
Call
BP_Sales_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_Sales_unPost_private, passing to it the SAME variables it received
- BP_Sales_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 -> SalesAR Business Processes
Copyright 2017 - computerplus