Class PO_PurchaseOrder_Bus

Properties

LOCAL cIsSysDB=isFALSE  
LOCAL cMainTable$="PO_PurchaseOrderHeader"  
LOCAL cMemoType$="01"  

[string] memo type for Purchase Order memos

LOCAL cVendorColumns$="VendorType$"  

[string] Vendor columns not in history required from vendor maintenance for copy process

LOCAL cDefaultServiceObject$  
LOCAL cTelephoneCountryCode$  

[string] Country Code to be used when validating telephone number values.

PROPERTY AllowModifyCompleteOrder   * Read Only *
PROPERTY AP_TrackDetailedInvPaymentHist$   * Read Only *

[string] current setting of Track Detailed Invoice/Payment History field in A/P Options

PROPERTY AuditTracking  

[boolean] Flag to indicate whether to track changes in audit trail

PROPERTY CheckMfgTask   * Read Only *

[boolean] Flag to indicate a check for manufacturing tasks can be done.

PROPERTY CompletedPO   * Read Only *
PROPERTY CopyOrderType$   * Read Only *
PROPERTY GeneratingOrders  
PROPERTY InvoicedToDate   * Read Only *
PROPERTY LastHeaderErrorMsg$   * Read Only *
PROPERTY LastHeaderErrorNum$   * Read Only *
PROPERTY OldMasterRepeatingOrderNo$   * Read Only *

[string] old master/repeating order number when the value is changed, used in the detail class to adjust qty in the correct master order

PROPERTY OrderBalance   * Read Only *
PROPERTY OrderCancelled   * Read Only *
PROPERTY OrderInUse$   * Read Only *
PROPERTY PO_DefaultQuoteUnitCost$   * Read Only *

[string] current setting of Default Unit Cost To Use For Quote field in P/O Options

PROPERTY PO_IPSetup   * Read Only *

[boolean] set to true if IP module is setup for this company

PROPERTY PO_MPSetup   * Read Only *
PROPERTY PO_RetainReceiptHistory$   * Read Only *

[string] current setting of Retain Receipt History field in P/O Options

PROPERTY PO_RequireCancelReasonCode$   * Read Only *

[string] current setting of Require Cancel Reason Code field in P/O Options

PROPERTY PO_TrackPurchaseOrderChanges$   * Read Only *

[string] P/O Setup Option "Purchase Order Changes to Track"

PROPERTY POSOFailed$  
PROPERTY POSOLineKeys$  
PROPERTY PrintPurchaseOrders$   * Read Only *
PROPERTY PurgePurchaseOrders  
PROPERTY QuoteVendors   * Read Only *

[objhandle] Object handle to an instance of PO_PurchaseOrderQuoteVendors_bus

PROPERTY SOCustPONo$   * Read Only *
PROPERTY SOJobNo$   * Read Only *
PROPERTY SOOrderType$   * Read Only *
PROPERTY UpdatePostingDate$  
PROPERTY UpdateType$  
PROPERTY VendorStatusErrorMsg$   * Read Only *

[string] Error message for inactive Vendor during copy from process

PROPERTY WTLinkUpdateError  

[boolean] Flag to indicate that work ticket links were not updated successfully in work tickets.

PROPERTY WTLinkUpdateErrMsg$  

[string] Concatenated string of error messages encountered when attempting to update the work ticket links. This list will be SEP separated.

Methods

FUNCTION CanWorkTicketBeChanged(workTicket$)  

Function whether the work ticket can be changed in purchase order, this is determined by seeing if the work ticket can be locked or has transactions in Transaction Entry.

ParameterDescription
workTicket$ [input, string] WorkTicketKey value for the work ticket to be tested.
Returns [boolean]
ValueDescription
True - if work ticket is not locked and has no entries in transaction entry
False - if work ticket is locked or has entries in transaction entry
FUNCTION ChangeOrderStatus(value$)  
FUNCTION CheckPurchaseOrder()  
FUNCTION CleanUpWorkTicketLinks(usr$, pOrder$)  

Function will purge any records remaining in the PO_WorkTicketLinkWork table that match the given user and purchase order.

ParameterDescription
usr$ [input, string] UserKey for the current user.
pOrder$ [input, string] Purchase Order number to clear data for.
Returns Always returns True
FUNCTION Clear()  

Override to base class PO_CommonEntryCustomer object. This is overridden to clean up work ticket link tables.

Returns Returns the value from the call to the base class.
FUNCTION CommitLines()  

Function is an override from SY_LineEntryHeader_bus. This is overridden to link work tickets after the lines are committed.

Returns Returns the value from the call to the base class.
FUNCTION ConfirmDelete()  
FUNCTION CopyFromInvoiceHistory(invoiceKey$, copyOrdType$, copyMemos$, tmpCopyUnitCost$)  

Create purchase order from invoice sourced from P/O in A/P invoice history

ParameterDescription
invoiceKey$ [input, string] key to invoice history header record to copy data from to create p/o
copyOrdType$ [input, string] Order type of purchase order to be created
copyMemos$ [input, string] Y/N value to copy receipt memo to created purchase order
tmpCopyUnitCost$ [input, string] Y/N value to copy unit cost to create purchase order that is a quote
Returns [numeric] 1 for success, 0 for failure, -1 for warning
FUNCTION CopyFromOrder(order$, type$, copyMemos$, tmpCopyUnitCost$)  

Create purchase order from an existing purchase order

ParameterDescription
order$ [input, string] purchase order number to copy.
type$ [input, string] order type for the new order.
copyMemo$ [input, string] Y/N value to copy purchase order memos to the new order.
tmpCopyUnitCost$ [input, string] Y/N value to copy unit cost to create purchase order that is a quote
Returns [boolean] True for success, False for failure.
FUNCTION CopyFromOrderHistory(order$, type$, copyMemos$, tmpCopyUnitCost$)  

Create purchase order from purchase order in history

ParameterDescription
order$ [input, string] purchase order number to copy.
type$ [input, string] order type for the new order.
copyMemo$ [input, string] Y/N value to copy purchase order memos to the new order.
tmpCopyUnitCost$ [input, string] Y/N value to copy unit cost to create purchase order that is a quote
Returns [boolean] True for success, False for failure.
FUNCTION CopyFromReceiptHistory(receiptKey$, copyOrdType$, copyMemos$, tmpCopyUnitCost$)  
FUNCTION CopyFromReceiptHistory(receiptKey$, copyOrdType$, copyMemos$, tmpCopyUnitCost$, poNumber$)  

Create purchase order from receipt in purchase order receipt history

ParameterDescription
receiptKey$ [input, string] key to receipt history header record to create in purchase order entry
copyOrdType$ [input, string] Order type of purchase order to be created
copyMemos$ [input, string] Y/N value to copy receipt memo to created purchase order
tmpCopyUnitCost$ [input, string] Y/N value to copy unit cost to create purchase order that is a quote
poNumber$ {optional} [input, string] applied purchase order number to copy receipt history detail from, when blank detail from all applied p/o's will be copied
FUNCTION CopySalesOrder(copyAllLines$, useVendPricing)  
FUNCTION Delete(key$)  

Delete, overridden from PO_CommonEntryVendor

ParameterDescription
key$ [input, string] key value of record to delete.
Returns [boolean] True for success, False for failure
FUNCTION GenerateFromQuote(quoteNo$, copyComments$, copyMemos$)  

Generate purchase order from quote

ParameterDescription
quoteNo$ [input, string] Quote number
copyComments$ [input, string] 'Y' to copy comment lines to the purchase order
copyMemos$ [input, string] 'Y' to copy quote memos to the purchase order
Returns [boolean] True for success, False for failure
FUNCTION GetContext$(destTable$)  
FUNCTION GetContextSourceTables$(context$)  
FUNCTION GetNextPurchaseOrderNo(value$)  
FUNCTION GetPrintQuoteValue$()  

Get Print Quote value for quote vendor selected on the p/o header

Returns [string] Y/N value of Print Quote
FUNCTION IsWorkTicketClosed(workTicket$)  

Function that returns the state of whether the given work ticket has a state of closed or not.

ParameterDescription
workTicket$ [input, string] WorkTicketKey$ for the work ticket that is being checked if it is closed or not.
Returns [boolean]
ValueDescription
True - If work ticket is closed
False - If work ticket is not closed
FUNCTION ResetLine(lKey$)  

Function overridden from base class SY_LineEntryHeader_bus. This function overridden to remove pending work ticket links when resetting a line.

ParameterDescription
lKey$ [input, string] Key to the line being reset.
Returns Returns the value returned from the base class call.
FUNCTION SalesTaxRecalculation()  

Sales Tax Recalculation, overridden from PO_CommonEntryVendor

Returns [boolean] True for success, False for failure
FUNCTION SetCommonTaxInfo()  

Set common tax info, overridden from PO_CommonEntryVendor

Returns [boolean] True
FUNCTION SetKey(key$)  
FUNCTION SetPrintQuoteValue(tmpPrintQuote$)  

Set Print Quote value for quote vendor selected on the p/o header

ParameterDescription
tmpPrintQuote$ [input, string] value to set
Returns [boolean] True for success, False for failure
FUNCTION UpdateBackOrderLost(value)  
FUNCTION UpdateChangeOrderStatus(newOrderStatus$, newCompletionDate$)  
FUNCTION UpdateNonTaxableAmt(value)  
FUNCTION ValidateCopyFrom(copyFrom$, copyFromNo$, copyFromRcpt$, copyKey$)  
FUNCTION ValidateCopyFrom(copyFrom$, copyFromNo$, copyFromRcpt$, copyKey$, multiPO$)  

Validate Copy From values

ParameterDescription
copyFrom$ [input, string] copy from source.
copyFromNo$ [input/output, string] copy from document number, if copyKey$ is being passed in, copyFromNo$ becomes an output value.
copyFromRcpt$ [input/output, string] copy from receipt type and number (if copy from receipt history), if copyKey$ is being passed in, copyFromRcpt$ becomes an output value.
copyKey$ [input/output, string] key value of record to copy. If value is passed in it will be validated and take precedence over any value passed into copyFromNo$ and copyFromRcpt$.
multiPO$ {optional} [output, string] multiple p/o's applied for copy from, Y or N
Returns [boolean] True for success, False for failure
FUNCTION Write()  

Properties inherited from: PO_PurchaseOrderHistory

cHistoryFreightChange, cHistoryRecalcTaxes, cHistorySchedChange, AP_SalesTaxReporting$, HistoryUpdated, OrderInHistory, OrderLineInHistory, PO_RetainDeletedPurchaseOrders$, PO_RetainDeletedLines$, PO_RetainPurchaseOrderHistory$, PO_CancelReasonCodeRequired$, PrecisionQty, PrecisionCost, SaveDeleted, SaveDeletedReason$, TaxExemptionChanged

Methods inherited from: PO_PurchaseOrderHistory

AddInHistory(), BackOutHistory(), CheckForHistoryLine(), SetupRetainHistory(), UpdateDetailLineDescription(), UpdateWorkTicketLinkInfo(), CheckForHistory(), DeleteOrderHistory(), SetHistoryCommonTaxInfo(), WriteOrderHistory()