Exportfile for AOT version 1.0 or later
Formatversion: 1
***Element: DBT
; Microsoft Dynamics AX Table : PurchTable unloaded
; --------------------------------------------------------------------------------
TABLEVERSION 1
TABLE #PurchTable
Id 345
PROPERTIES
Name #PurchTable
Label #@SYS25204
SearchLinkRefName #EPPurchTableInfo
TitleField1 #PurchId
TitleField2 #PurchName
ConfigurationKey #LogisticsBasic
SecurityKey #VendTables
CacheLookup #NotInTTS
CreateRecIdIndex #Yes
TableGroup #WorksheetHeader
PrimaryIndex #PurchIdx
ClusterIndex #PurchIdx
AnalysisVisibility #High
CreatedDateTime #Yes
DeveloperDocumentation #@SYS124480
ENDPROPERTIES
FIELDS
FIELD #PurchId
Id 1
STRING
PROPERTIES
Name #PurchId
Mandatory #Yes
AllowEdit #No
Table #PurchTable
ExtendedDataType
ARRAY
#PurchIdBase
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #PurchName
Id 2
STRING
PROPERTIES
Name #PurchName
Table #PurchTable
ExtendedDataType
ARRAY
#PurchName
#
ENDARRAY
StringSize #60
ENDPROPERTIES
FIELD #OrderAccount
Id 3
STRING
PROPERTIES
Name #OrderAccount
HelpText #@SYS2496
Mandatory #Yes
Table #PurchTable
ExtendedDataType
ARRAY
#VendAccount
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #InvoiceAccount
Id 4
STRING
PROPERTIES
Name #InvoiceAccount
HelpText #@SYS3548
Mandatory #Yes
Table #PurchTable
ExtendedDataType
ARRAY
#VendInvoiceAccount
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #FreightZone
Id 5
STRING
PROPERTIES
Name #FreightZone
Table #PurchTable
ExtendedDataType
ARRAY
#VendFreightZoneId
#
ENDARRAY
ENDPROPERTIES
FIELD #Email
Id 6
STRING
PROPERTIES
Name #Email
Table #PurchTable
ExtendedDataType
ARRAY
#Email
#
ENDARRAY
StringSize #80
ENDPROPERTIES
FIELD #DeliveryDate
Id 7
DATE
PROPERTIES
Name #DeliveryDate
HelpText #@SYS2261
Table #PurchTable
ExtendedDataType
ARRAY
#DlvDate
#
ENDARRAY
ENDPROPERTIES
FIELD #DeliveryType
Id 8
ENUM
PROPERTIES
Name #DeliveryType
Table #PurchTable
ExtendedDataType
ARRAY
#PurchDlvAddrType
#
ENDARRAY
EnumType #PurchDlvAddr
ENDPROPERTIES
FIELD #AddressRefRecId
Id 9
INT64
PROPERTIES
Name #AddressRefRecId
AllowEditOnCreate #No
AllowEdit #No
Visible #No
Table #PurchTable
ExtendedDataType
ARRAY
#AddressRefRecId
#
ENDARRAY
ENDPROPERTIES
FIELD #AddressRefTableId
Id 10
INT
PROPERTIES
Name #AddressRefTableId
AllowEditOnCreate #No
AllowEdit #No
Visible #No
Table #PurchTable
ExtendedDataType
ARRAY
#AddressRefTableId
#
ENDARRAY
ENDPROPERTIES
FIELD #InterCompanyOriginalSalesId
Id 11
STRING
PROPERTIES
Name #InterCompanyOriginalSalesId
Table #PurchTable
ExtendedDataType
ARRAY
#InterCompanyOriginalSalesId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #InterCompanyOriginalCustAccount
Id 12
STRING
PROPERTIES
Name #InterCompanyOriginalCustAccount
Table #PurchTable
ExtendedDataType
ARRAY
#InterCompanyOriginalCustAccount
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #CurrencyCode
Id 13
STRING
PROPERTIES
Name #CurrencyCode
HelpText #@SYS5717
Mandatory #Yes
Table #PurchTable
ExtendedDataType
ARRAY
#VendCurrencyCode
#
ENDARRAY
StringSize #3
ENDPROPERTIES
FIELD #Payment
Id 14
STRING
PROPERTIES
Name #Payment
Label #@SYS828
HelpText #@SYS13766
Table #PurchTable
ExtendedDataType
ARRAY
#VendPaymTermId
#
ENDARRAY
ENDPROPERTIES
FIELD #CashDisc
Id 15
STRING
PROPERTIES
Name #CashDisc
HelpText #@SYS5825
Table #PurchTable
ExtendedDataType
ARRAY
#VendCashDiscCode
#
ENDARRAY
ENDPROPERTIES
FIELD #PurchPlacer
Id 16
STRING
PROPERTIES
Name #PurchPlacer
Label #@SYS21867
HelpText #@SYS15278
Table #PurchTable
ExtendedDataType
ARRAY
#EmplId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #CountyOrigDest
Id 17
STRING
PROPERTIES
Name #CountyOrigDest
Table #PurchTable
AnalysisVisibility #Low
ExtendedDataType
ARRAY
#AddressCountyOrigDest
#
ENDARRAY
ENDPROPERTIES
FIELD #InterCompanyDirectDelivery
Id 18
ENUM
PROPERTIES
Name #InterCompanyDirectDelivery
Table #PurchTable
ExtendedDataType
ARRAY
#InterCompanyDirectDelivery
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #VendGroup
Id 19
STRING
PROPERTIES
Name #VendGroup
HelpText #@SYS17188
Mandatory #Yes
Table #PurchTable
ExtendedDataType
ARRAY
#VendGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #LineDisc
Id 20
STRING
PROPERTIES
Name #LineDisc
HelpText #@SYS2174
Table #PurchTable
ExtendedDataType
ARRAY
#VendLineDiscCode
#
ENDARRAY
ENDPROPERTIES
FIELD #DiscPercent
Id 21
REAL
PROPERTIES
Name #DiscPercent
Table #PurchTable
ExtendedDataType
ARRAY
#PurchEndDiscPct
#
ENDARRAY
ENDPROPERTIES
FIELD #Dimension
Id 22
STRING
PROPERTIES
Name #Dimension
Table #PurchTable
ExtendedDataType
ARRAY
#Dimension
#
ENDARRAY
ENDPROPERTIES
FIELD #PriceGroupId
Id 23
STRING
PROPERTIES
Name #PriceGroupId
Table #PurchTable
ExtendedDataType
ARRAY
#VendPriceGroup
#
ENDARRAY
ENDPROPERTIES
FIELD #MultiLineDisc
Id 24
STRING
PROPERTIES
Name #MultiLineDisc
Table #PurchTable
ExtendedDataType
ARRAY
#VendMultiLineDiscCode
#
ENDARRAY
ENDPROPERTIES
FIELD #EndDisc
Id 25
STRING
PROPERTIES
Name #EndDisc
Table #PurchTable
ExtendedDataType
ARRAY
#VendEndDiscCode
#
ENDARRAY
ENDPROPERTIES
FIELD #InterCompanyCustPurchOrderFormNum
Id 26
STRING
PROPERTIES
Name #InterCompanyCustPurchOrderFormNum
Table #PurchTable
ExtendedDataType
ARRAY
#CustPurchaseOrder
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #DeliveryAddress
Id 27
STRING
PROPERTIES
Name #DeliveryAddress
Label #@SYS7924
HelpText #@SYS27762
AllowEditOnCreate #No
AllowEdit #No
Table #PurchTable
ExtendedDataType
ARRAY
#Addressing
#
ENDARRAY
StringSize #250
ENDPROPERTIES
FIELD #TaxGroup
Id 28
STRING
PROPERTIES
Name #TaxGroup
HelpText #@SYS27938
Table #PurchTable
ExtendedDataType
ARRAY
#TaxGroup
#
ENDARRAY
ENDPROPERTIES
FIELD #DlvTerm
Id 29
STRING
PROPERTIES
Name #DlvTerm
HelpText #@SYS13640
Table #PurchTable
ExtendedDataType
ARRAY
#VendDlvTermId
#
ENDARRAY
ENDPROPERTIES
FIELD #DlvMode
Id 30
STRING
PROPERTIES
Name #DlvMode
HelpText #@SYS12294
Table #PurchTable
ExtendedDataType
ARRAY
#VendDlvModeId
#
ENDARRAY
ENDPROPERTIES
FIELD #PurchStatus
Id 31
ENUM
PROPERTIES
Name #PurchStatus
AllowEditOnCreate #No
AllowEdit #No
Table #PurchTable
EnumType #PurchStatus
ENDPROPERTIES
FIELD #MarkupGroup
Id 32
STRING
PROPERTIES
Name #MarkupGroup
HelpText #@SYS9643
Table #PurchTable
ExtendedDataType
ARRAY
#VendMarkupGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #PurchaseType
Id 33
ENUM
PROPERTIES
Name #PurchaseType
Table #PurchTable
EnumType #PurchaseType
ENDPROPERTIES
FIELD #ShippingDateRequested
Id 34
DATE
PROPERTIES
Name #ShippingDateRequested
SaveContents #No
AllowEditOnCreate #No
AllowEdit #No
Visible #No
Table #PurchTable
ExtendedDataType
ARRAY
#SalesShippingDateRequested
#
ENDARRAY
ENDPROPERTIES
FIELD #URL
Id 35
STRING
PROPERTIES
Name #URL
Table #PurchTable
ExtendedDataType
ARRAY
#URL
#
ENDARRAY
StringSize #255
ENDPROPERTIES
FIELD #PostingProfile
Id 36
STRING
PROPERTIES
Name #PostingProfile
Table #PurchTable
ExtendedDataType
ARRAY
#VendPostingProfile
#
ENDARRAY
ENDPROPERTIES
FIELD #TransactionCode
Id 37
STRING
PROPERTIES
Name #TransactionCode
Table #PurchTable
ExtendedDataType
ARRAY
#IntrastatTransactionCodeId
#
ENDARRAY
ENDPROPERTIES
FIELD #ShippingDateConfirmed
Id 38
DATE
PROPERTIES
Name #ShippingDateConfirmed
SaveContents #No
AllowEditOnCreate #No
AllowEdit #No
Visible #No
Table #PurchTable
ExtendedDataType
ARRAY
#SalesShippingDateConfirmed
#
ENDARRAY
ENDPROPERTIES
FIELD #ReceiptDateConfirmed
Id 39
DATE
PROPERTIES
Name #ReceiptDateConfirmed
SaveContents #No
AllowEditOnCreate #No
AllowEdit #No
Visible #No
Table #PurchTable
ExtendedDataType
ARRAY
#SalesReceiptDateConfirmed
#
ENDARRAY
ENDPROPERTIES
FIELD #EnterpriseNumber
Id 40
STRING
PROPERTIES
Name #EnterpriseNumber
Table #PurchTable
ExtendedDataType
ARRAY
#TaxEnterpriseNumber
#
ENDARRAY
StringSize #50
ENDPROPERTIES
FIELD #DeliveryZipCode
Id 41
STRING
PROPERTIES
Name #DeliveryZipCode
HelpText #@SYS17896
Table #PurchTable
ExtendedDataType
ARRAY
#AddressZipCodeId
#
ENDARRAY
ENDPROPERTIES
FIELD #DlvCounty
Id 42
STRING
PROPERTIES
Name #DlvCounty
Table #PurchTable
ExtendedDataType
ARRAY
#AddressCountyId
#
ENDARRAY
ENDPROPERTIES
FIELD #DlvCountryRegionId
Id 43
STRING
PROPERTIES
Name #DlvCountryRegionId
HelpText #@SYS17899
Table #PurchTable
ExtendedDataType
ARRAY
#AddressCountryRegionId
#
ENDARRAY
ENDPROPERTIES
FIELD #DlvState
Id 44
STRING
PROPERTIES
Name #DlvState
HelpText #@SYS27941
Table #PurchTable
ExtendedDataType
ARRAY
#AddressStateId
#
ENDARRAY
ENDPROPERTIES
FIELD #SettleVoucher
Id 45
ENUM
PROPERTIES
Name #SettleVoucher
Table #PurchTable
ExtendedDataType
ARRAY
#PurchSettlementType
#
ENDARRAY
EnumType #SettlementType
ENDPROPERTIES
FIELD #InterCompanyAllowIndirectCreation
Id 46
ENUM
PROPERTIES
Name #InterCompanyAllowIndirectCreation
AllowEditOnCreate #No
AllowEdit #No
Visible #No
Table #PurchTable
ExtendedDataType
ARRAY
#InterCompanyAllowIndirectCreation
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #InterCompanyOrigin
Id 47
ENUM
PROPERTIES
Name #InterCompanyOrigin
AllowEditOnCreate #No
AllowEdit #No
Visible #No
Table #PurchTable
EnumType #InterCompanyOrigin
ENDPROPERTIES
FIELD #CashDiscPercent
Id 48
REAL
PROPERTIES
Name #CashDiscPercent
Table #PurchTable
ExtendedDataType
ARRAY
#DiscPct
#
ENDARRAY
ENDPROPERTIES
FIELD #DeliveryName
Id 49
STRING
PROPERTIES
Name #DeliveryName
Label #@SYS22058
HelpText #@SYS17217
GroupPrompt #@SYS7399
Table #PurchTable
ExtendedDataType
ARRAY
#VendName
#
ENDARRAY
StringSize #60
ENDPROPERTIES
FIELD #CovStatus
Id 50
INT
PROPERTIES
Name #CovStatus
Table #PurchTable
ExtendedDataType
ARRAY
#CovStatus
#
ENDARRAY
ENDPROPERTIES
FIELD #PaymentSched
Id 51
STRING
PROPERTIES
Name #PaymentSched
Table #PurchTable
ExtendedDataType
ARRAY
#PaymSchedId
#
ENDARRAY
StringSize #30
ENDPROPERTIES
FIELD #InventSiteId
Id 52
STRING
PROPERTIES
Name #InventSiteId
Table #PurchTable
ExtendedDataType
ARRAY
#InventSiteId
#
ENDARRAY
ENDPROPERTIES
FIELD #OneTimeVendor
Id 53
ENUM
PROPERTIES
Name #OneTimeVendor
Table #PurchTable
ExtendedDataType
ARRAY
#OneTimeSupplier
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #ReturnItemNum
Id 54
STRING
PROPERTIES
Name #ReturnItemNum
Table #PurchTable
ExtendedDataType
ARRAY
#PurchReturnItemNum
#
ENDARRAY
ENDPROPERTIES
FIELD #FreightSlipType
Id 55
ENUM
PROPERTIES
Name #FreightSlipType
Table #PurchTable
ExtendedDataType
ARRAY
#VendFreightSlipType
#
ENDARRAY
EnumType #FreightSlipType
ENDPROPERTIES
FIELD #DocumentStatus
Id 56
ENUM
PROPERTIES
Name #DocumentStatus
AllowEditOnCreate #No
AllowEdit #No
Table #PurchTable
EnumType #DocumentStatus
ENDPROPERTIES
FIELD #ContactPersonId
Id 57
STRING
PROPERTIES
Name #ContactPersonId
Table #PurchTable
ExtendedDataType
ARRAY
#ContactPersonId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #InventLocationId
Id 61
STRING
PROPERTIES
Name #InventLocationId
Table #PurchTable
ExtendedDataType
ARRAY
#PurchInventLocationId
#
ENDARRAY
ENDPROPERTIES
FIELD #BankCentralBankPurposeCode
Id 63
STRING
PROPERTIES
Name #BankCentralBankPurposeCode
ConfigurationKey #CRSENorway
Table #PurchTable
ExtendedDataType
ARRAY
#BankCentralBankPurposeCode
#
ENDARRAY
ENDPROPERTIES
FIELD #ItemBuyerGroupId
Id 64
STRING
PROPERTIES
Name #ItemBuyerGroupId
Table #PurchTable
ExtendedDataType
ARRAY
#ItemBuyerGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #ProjId
Id 65
STRING
PROPERTIES
Name #ProjId
Table #PurchTable
ExtendedDataType
ARRAY
#ProjId
#
ENDARRAY
ENDPROPERTIES
FIELD #PurchPoolId
Id 66
STRING
PROPERTIES
Name #PurchPoolId
Table #PurchTable
ExtendedDataType
ARRAY
#PurchPoolId
#
ENDARRAY
ENDPROPERTIES
FIELD #VATNum
Id 67
STRING
PROPERTIES
Name #VATNum
Table #PurchTable
ExtendedDataType
ARRAY
#VATNumJournal
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #Port
Id 68
STRING
PROPERTIES
Name #Port
Table #PurchTable
ExtendedDataType
ARRAY
#IntrastatPortId
#
ENDARRAY
ENDPROPERTIES
FIELD #InclTax
Id 71
ENUM
PROPERTIES
Name #InclTax
Table #PurchTable
ExtendedDataType
ARRAY
#InclTax
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #BankCentralBankPurposeText
Id 72
STRING
PROPERTIES
Name #BankCentralBankPurposeText
ConfigurationKey #CRSENorway
Table #PurchTable
ExtendedDataType
ARRAY
#BankCentralBankPurposeText
#
ENDARRAY
StringSize #140
ENDPROPERTIES
FIELD #NumberSequenceGroup
Id 73
STRING
PROPERTIES
Name #NumberSequenceGroup
Table #PurchTable
ExtendedDataType
ARRAY
#NumberSequenceGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #LanguageId
Id 74
STRING
PROPERTIES
Name #LanguageId
HelpText #@SYS8305
Mandatory #Yes
Table #PurchTable
ExtendedDataType
ARRAY
#VendLanguageId
#
ENDARRAY
StringSize #7
ENDPROPERTIES
FIELD #AutoSummaryModuleType
Id 75
ENUM
PROPERTIES
Name #AutoSummaryModuleType
Label #@SYS57738
AllowEditOnCreate #No
AllowEdit #No
Visible #No
Table #PurchTable
EnumType #ModuleVendPurch
ENDPROPERTIES
FIELD #Transport
Id 76
STRING
PROPERTIES
Name #Transport
Table #PurchTable
ExtendedDataType
ARRAY
#IntrastatTransport
#
ENDARRAY
ENDPROPERTIES
FIELD #DEL_PrintModuleType
Id 77
ENUM
PROPERTIES
Name #DEL_PrintModuleType
Label #@SYS54502
Visible #No
ConfigurationKey #SysDeletedObjects41
Table #PurchTable
EnumType #DEL_ModuleVendPurchParameters
ENDPROPERTIES
FIELD #PaymMode
Id 78
STRING
PROPERTIES
Name #PaymMode
Table #PurchTable
ExtendedDataType
ARRAY
#VendPaymMode
#
ENDARRAY
ENDPROPERTIES
FIELD #PaymSpec
Id 79
STRING
PROPERTIES
Name #PaymSpec
Table #PurchTable
ExtendedDataType
ARRAY
#VendPaymSpec
#
ENDARRAY
ENDPROPERTIES
FIELD #FixedDueDate
Id 80
DATE
PROPERTIES
Name #FixedDueDate
Table #PurchTable
ExtendedDataType
ARRAY
#PurchFixedDueDate
#
ENDARRAY
ENDPROPERTIES
FIELD #DeliveryCity
Id 81
STRING
PROPERTIES
Name #DeliveryCity
Table #PurchTable
ExtendedDataType
ARRAY
#AddressCity
#
ENDARRAY
StringSize #60
ENDPROPERTIES
FIELD #DeliveryStreet
Id 82
STRING
PROPERTIES
Name #DeliveryStreet
Table #PurchTable
ExtendedDataType
ARRAY
#AddressStreet
#
ENDARRAY
StringSize #250
ENDPROPERTIES
FIELD #StatProcId
Id 83
STRING
PROPERTIES
Name #StatProcId
Table #PurchTable
ExtendedDataType
ARRAY
#IntrastatProcId
#
ENDARRAY
ENDPROPERTIES
FIELD #DEL_CorrectiveReason
Id 84
STRING
PROPERTIES
Name #DEL_CorrectiveReason
Visible #No
ConfigurationKey #SysDeletedObjects40
Table #PurchTable
ExtendedDataType
ARRAY
#DEL_CustVendCorrectiveReason_ES
#
ENDARRAY
StringSize #(Memo)
ENDPROPERTIES
FIELD #DEL_RefDlvZipCode
Id 85
INT64
PROPERTIES
Name #DEL_RefDlvZipCode
AllowEditOnCreate #No
AllowEdit #No
ConfigurationKey #SysDeletedObjects40
Table #PurchTable
ExtendedDataType
ARRAY
#RefRecId
#
ENDARRAY
ENDPROPERTIES
FIELD #VendorRef
Id 86
STRING
PROPERTIES
Name #VendorRef
Table #PurchTable
ExtendedDataType
ARRAY
#VendRef
#
ENDARRAY
StringSize #60
ENDPROPERTIES
FIELD #InterCompanyCompanyId
Id 87
STRING
PROPERTIES
Name #InterCompanyCompanyId
AllowEditOnCreate #No
AllowEdit #No
Table #PurchTable
ExtendedDataType
ARRAY
#InterCompanyCompanyId
#
ENDARRAY
StringSize #4
ENDPROPERTIES
FIELD #InterCompanySalesId
Id 88
STRING
PROPERTIES
Name #InterCompanySalesId
Table #PurchTable
ExtendedDataType
ARRAY
#InterCompanySalesId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #InterCompanyOrder
Id 89
ENUM
PROPERTIES
Name #InterCompanyOrder
Table #PurchTable
ExtendedDataType
ARRAY
#InterCompanyVendor
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #SkipUpdate
Id 91
ENUM
PROPERTIES
Name #SkipUpdate
SaveContents #No
Visible #No
Table #PurchTable
EnumType #InterCompanySkipUpdate
ENDPROPERTIES
FIELD #DEL_CorrectedInvoiceId
Id 92
STRING
PROPERTIES
Name #DEL_CorrectedInvoiceId
Visible #No
ConfigurationKey #SysDeletedObjects40
Table #PurchTable
ExtendedDataType
ARRAY
#DEL_CustVendCorrectedInvoiceId_ES
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #ReturnReasonCodeId
Id 93
STRING
PROPERTIES
Name #ReturnReasonCodeId
AllowEditOnCreate #No
AllowEdit #No
Table #PurchTable
ExtendedDataType
ARRAY
#ReturnReasonCodeId
#
ENDARRAY
ENDPROPERTIES
FIELD #ReturnReplacementCreated
Id 94
ENUM
PROPERTIES
Name #ReturnReplacementCreated
Table #PurchTable
ExtendedDataType
ARRAY
#ReturnReplacementCreated
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #ReqAttention
Id 95
STRING
PROPERTIES
Name #ReqAttention
Table #PurchTable
ExtendedDataType
ARRAY
#PurchReqAttention
#
ENDARRAY
StringSize #255
ENDPROPERTIES
FIELD #Requisitioner
Id 96
STRING
PROPERTIES
Name #Requisitioner
Table #PurchTable
ExtendedDataType
ARRAY
#PurchRequisitioner
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #ContractNum_SA
Id 126
STRING
PROPERTIES
Name #ContractNum_SA
Table #PurchTable
ExtendedDataType
ARRAY
#ZakatContractNum_SA
#
ENDARRAY
StringSize #60
ENDPROPERTIES
FIELD #InvoiceDeclarationId_IS
Id 130
STRING
PROPERTIES
Name #InvoiceDeclarationId_IS
HelpText #@SYS126905
Table #PurchTable
ExtendedDataType
ARRAY
#InvoiceSlipDeclarationId_IS
#
ENDARRAY
ENDPROPERTIES
FIELD #Listcode
Id 195
ENUM
PROPERTIES
Name #Listcode
ConfigurationKey #CRSESpain
Table #PurchTable
ExtendedDataType
ARRAY
#ListcodeId
#
ENDARRAY
EnumType #Listcode
ENDPROPERTIES
FIELD #BPLVendorConfirmedDlvDate
Id 20001
DATE
PROPERTIES
Name #BPLVendorConfirmedDlvDate
ConfigurationKey #CRSEIsrael
Table #PurchTable
ExtendedDataType
ARRAY
#BPLVendorConfirmedDlvDate
#
ENDARRAY
ENDPROPERTIES
FIELD #BPLRequestedDlvDate
Id 20002
DATE
PROPERTIES
Name #BPLRequestedDlvDate
Mandatory #Yes
ConfigurationKey #CRSEIsrael
Table #PurchTable
ExtendedDataType
ARRAY
#BPLRequestedDlvDate
#
ENDARRAY
ENDPROPERTIES
ENDFIELDS
GROUPS
GROUP #AutoReport
PROPERTIES
Name #AutoReport
ENDPROPERTIES
GROUPFIELDS
#PurchId
#OrderAccount
#PurchName
#InvoiceAccount
#PurchStatus
#DocumentStatus
#DeliveryDate
ENDGROUPFIELDS
ENDGROUP
GROUP #Address
PROPERTIES
Name #Address
Label #@SYS9362
ENDPROPERTIES
GROUPFIELDS
#DeliveryName
#DeliveryStreet
#DeliveryZipCode
#DeliveryCity
#DlvCounty
#DlvState
#DlvCountryRegionId
ENDGROUPFIELDS
ENDGROUP
GROUP #AddressDisplay
PROPERTIES
Name #AddressDisplay
Label #@SYS9362
ENDPROPERTIES
GROUPFIELDS
#DeliveryAddress
ENDGROUPFIELDS
ENDGROUP
GROUP #AddressLookup
PROPERTIES
Name #AddressLookup
Label #@SYS88672
ENDPROPERTIES
GROUPFIELDS
#PurchId
#OrderAccount
#InvoiceAccount
#PurchaseType
ENDGROUPFIELDS
ENDGROUP
GROUP #AddressReference
PROPERTIES
Name #AddressReference
Label #@SYS88679
ENDPROPERTIES
GROUPFIELDS
#AddressRefRecId
#AddressRefTableId
ENDGROUPFIELDS
ENDGROUP
GROUP #Administration
PROPERTIES
Name #Administration
Label #@SYS9853
ENDPROPERTIES
GROUPFIELDS
#ItemBuyerGroupId
#PurchPlacer
#Requisitioner
#PurchPoolId
#LanguageId
ENDGROUPFIELDS
ENDGROUP
GROUP #Attention
PROPERTIES
Name #Attention
Label #@SYS1593
ENDPROPERTIES
GROUPFIELDS
#ReqAttention
ENDGROUPFIELDS
ENDGROUP
GROUP #BPLAllFields
PROPERTIES
Name #BPLAllFields
Label #@BPL141
ENDPROPERTIES
GROUPFIELDS
#BPLVendorConfirmedDlvDate
#BPLRequestedDlvDate
ENDGROUPFIELDS
ENDGROUP
GROUP #ContactInfo
PROPERTIES
Name #ContactInfo
Label #@SYS21663
ENDPROPERTIES
GROUPFIELDS
#URL
#Email
ENDGROUPFIELDS
ENDGROUP
GROUP #Contract_SA
PROPERTIES
Name #Contract_SA
Label #@SYS73302
ENDPROPERTIES
GROUPFIELDS
#ContractNum_SA
ENDGROUPFIELDS
ENDGROUP
GROUP #Currency
PROPERTIES
Name #Currency
Label #@SYS7572
ENDPROPERTIES
GROUPFIELDS
#CurrencyCode
ENDGROUPFIELDS
ENDGROUP
GROUP #Delivery
PROPERTIES
Name #Delivery
Label #@SYS4508
ENDPROPERTIES
GROUPFIELDS
#DeliveryDate
#DlvMode
#DlvTerm
#BPLRequestedDlvDate
#BPLVendorConfirmedDlvDate
ENDGROUPFIELDS
ENDGROUP
GROUP #Dimension
PROPERTIES
Name #Dimension
Label #@SYS5951
ENDPROPERTIES
GROUPFIELDS
#Dimension
ENDGROUPFIELDS
ENDGROUP
GROUP #Discount
PROPERTIES
Name #Discount
Label #@SYS11829
ENDPROPERTIES
GROUPFIELDS
#MultiLineDisc
#EndDisc
#LineDisc
#DiscPercent
ENDGROUPFIELDS
ENDGROUP
GROUP #DiscountMiscCharges
PROPERTIES
Name #DiscountMiscCharges
Label #@SYS22031
ENDPROPERTIES
GROUPFIELDS
#PriceGroupId
#MultiLineDisc
#EndDisc
#DiscPercent
#LineDisc
#MarkupGroup
ENDGROUPFIELDS
ENDGROUP
GROUP #EPDelivery
PROPERTIES
Name #EPDelivery
Label #@SYS4508
ENDPROPERTIES
GROUPFIELDS
#DeliveryName
#DeliveryAddress
#DeliveryDate
#DlvTerm
#DlvMode
ENDGROUPFIELDS
ENDGROUP
GROUP #ExternalReference
PROPERTIES
Name #ExternalReference
Label #@SYS21697
ENDPROPERTIES
GROUPFIELDS
#VendorRef
#ReturnItemNum
ENDGROUPFIELDS
ENDGROUP
GROUP #ForeignTrade
PROPERTIES
Name #ForeignTrade
Label #@SYS27650
ENDPROPERTIES
GROUPFIELDS
#TransactionCode
#Transport
#Port
#StatProcId
#CountyOrigDest
#Listcode
ENDGROUPFIELDS
ENDGROUP
GROUP #HeaderToLineUpdate
PROPERTIES
Name #HeaderToLineUpdate
Label #@SYS62436
ENDPROPERTIES
GROUPFIELDS
#OrderAccount
#TaxGroup
#Dimension
#InventLocationId
#TransactionCode
#Port
#StatProcId
#PriceGroupId
#LineDisc
#MarkupGroup
#DeliveryDate
#LanguageId
#Transport
ENDGROUPFIELDS
ENDGROUP
GROUP #Identification
PROPERTIES
Name #Identification
Label #@SYS5711
ENDPROPERTIES
GROUPFIELDS
#PurchId
ENDGROUPFIELDS
ENDGROUP
GROUP #Intercompany
PROPERTIES
Name #Intercompany
Label #@SYS93837
ENDPROPERTIES
GROUPFIELDS
#InterCompanyOrder
#InterCompanyCompanyId
#InterCompanySalesId
#interCompanyOriginDisplay
ENDGROUPFIELDS
ENDGROUP
GROUP #InterCompanyOriginal
PROPERTIES
Name #InterCompanyOriginal
Label #@SYS93838
ENDPROPERTIES
GROUPFIELDS
#InterCompanyOriginalSalesId
#InterCompanyOriginalCustAccount
#InterCompanyCustPurchOrderFormNum
#InterCompanyDirectDelivery
ENDGROUPFIELDS
ENDGROUP
GROUP #InterCompanyReturn
PROPERTIES
Name #InterCompanyReturn
Label #@SYS120343
ENDPROPERTIES
GROUPFIELDS
#ReturnReasonCodeId
#ReturnReplacementCreated
ENDGROUPFIELDS
ENDGROUP
GROUP #Inventory
PROPERTIES
Name #Inventory
Label #@SYS981
ENDPROPERTIES
GROUPFIELDS
#InventSiteId
#InventLocationId
ENDGROUPFIELDS
ENDGROUP
GROUP #InvoiceDeclaration_IS
PROPERTIES
Name #InvoiceDeclaration_IS
Label #@SYS126906
ENDPROPERTIES
GROUPFIELDS
#InvoiceDeclarationId_IS
ENDGROUPFIELDS
ENDGROUP
GROUP #NotificationToTheCentralBank
PROPERTIES
Name #NotificationToTheCentralBank
Label #@SYS67156
ENDPROPERTIES
GROUPFIELDS
#BankCentralBankPurposeCode
#BankCentralBankPurposeText
ENDGROUPFIELDS
ENDGROUP
GROUP #Payment
PROPERTIES
Name #Payment
Label #@SYS828
ENDPROPERTIES
GROUPFIELDS
#Payment
#FixedDueDate
#PaymMode
#PaymSpec
#PaymentSched
#CashDisc
#CashDiscPercent
ENDGROUPFIELDS
ENDGROUP
GROUP #Posting
PROPERTIES
Name #Posting
Label #@SYS5943
ENDPROPERTIES
GROUPFIELDS
#PostingProfile
#SettleVoucher
#NumberSequenceGroup
ENDGROUPFIELDS
ENDGROUP
GROUP #Project
PROPERTIES
Name #Project
Label #@SYS4534
ENDPROPERTIES
GROUPFIELDS
#ProjId
ENDGROUPFIELDS
ENDGROUP
GROUP #PurchaseTable
PROPERTIES
Name #PurchaseTable
Label #@SYS1653
ENDPROPERTIES
GROUPFIELDS
#ContactPersonId
#ReturnItemNum
#CovStatus
#VendGroup
#PurchaseType
#MarkupGroup
#PostingProfile
#SettleVoucher
#PurchStatus
#PurchName
#DocumentStatus
#DeliveryType
ENDGROUPFIELDS
ENDGROUP
GROUP #Requisitioner
PROPERTIES
Name #Requisitioner
Label #@SYS108788
ENDPROPERTIES
GROUPFIELDS
#Requisitioner
ENDGROUPFIELDS
ENDGROUP
GROUP #SalesTax
PROPERTIES
Name #SalesTax
Label #@SYS5878
ENDPROPERTIES
GROUPFIELDS
#TaxGroup
#VATNum
#EnterpriseNumber
#InclTax
ENDGROUPFIELDS
ENDGROUP
GROUP #Status
PROPERTIES
Name #Status
Label #@SYS25587
ENDPROPERTIES
GROUPFIELDS
#PurchStatus
#DocumentStatus
ENDGROUPFIELDS
ENDGROUP
GROUP #SummaryNumber
PROPERTIES
Name #SummaryNumber
Label #*** OUTDATED ***
ENDPROPERTIES
GROUPFIELDS
ENDGROUPFIELDS
ENDGROUP
GROUP #SummaryPurchase
PROPERTIES
Name #SummaryPurchase
Label #@SYS24162
ENDPROPERTIES
GROUPFIELDS
ENDGROUPFIELDS
ENDGROUP
GROUP #SummaryUpdate
PROPERTIES
Name #SummaryUpdate
Label #@SYS57755
ENDPROPERTIES
GROUPFIELDS
#OrderAccount
#InvoiceAccount
#FreightZone
#CurrencyCode
#Payment
#CashDisc
#LineDisc
#DiscPercent
#Dimension
#PriceGroupId
#MultiLineDisc
#EndDisc
#DlvTerm
#DlvMode
#PurchaseType
#PostingProfile
#TransactionCode
#PaymentSched
#FreightSlipType
#ContactPersonId
#InventLocationId
#ItemBuyerGroupId
#PurchPoolId
#VATNum
#InclTax
#NumberSequenceGroup
#LanguageId
#PaymMode
#PaymSpec
#FixedDueDate
#InterCompanyCompanyId
#InterCompanyOriginalCustAccount
#InterCompanyDirectDelivery
#Listcode
ENDGROUPFIELDS
ENDGROUP
GROUP #SummaryUpdateParameters
PROPERTIES
Name #SummaryUpdateParameters
Label #@SYS57738
ENDPROPERTIES
GROUPFIELDS
#AutoSummaryModuleType
ENDGROUPFIELDS
ENDGROUP
GROUP #Transport
PROPERTIES
Name #Transport
Label #@SYS3843
ENDPROPERTIES
GROUPFIELDS
#FreightZone
#FreightSlipType
ENDGROUPFIELDS
ENDGROUP
GROUP #Vendor
PROPERTIES
Name #Vendor
Label #@SYS9455
ENDPROPERTIES
GROUPFIELDS
#OrderAccount
#OneTimeVendor
#InvoiceAccount
ENDGROUPFIELDS
ENDGROUP
GROUP #WebCategoryBrowsing
PROPERTIES
Name #WebCategoryBrowsing
Label #@SYS74258
ENDPROPERTIES
GROUPFIELDS
#PurchStatus
#PurchaseType
ENDGROUPFIELDS
ENDGROUP
ENDGROUPS
INDICES
#PurchIdx
Id 1
PROPERTIES
Name #PurchIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#PurchId
ENDINDEXFIELDS
#VendIdx
Id 2
PROPERTIES
Name #VendIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#OrderAccount
#PurchId
ENDINDEXFIELDS
#StatusOrderAccIdx
Id 4
PROPERTIES
Name #StatusOrderAccIdx
ENDPROPERTIES
INDEXFIELDS
#PurchStatus
#OrderAccount
ENDINDEXFIELDS
#ProjIdx
Id 5
PROPERTIES
Name #ProjIdx
ConfigurationKey #ProjBasic
ENDPROPERTIES
INDEXFIELDS
#ProjId
#PurchId
ENDINDEXFIELDS
ENDINDICES
REFERENCES
REFERENCE #AddressCounty
PROPERTIES
Name #AddressCounty
Table #AddressCounty
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #DlvCountryRegionId
RelatedField #CountryRegionId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #DlvState
RelatedField #StateId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #DlvCounty
RelatedField #CountyId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #AddressState
PROPERTIES
Name #AddressState
Table #AddressState
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #DlvCountryRegionId
RelatedField #CountryRegionId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #DlvState
RelatedField #StateId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #Common
PROPERTIES
Name #Common
Table #Common
Validate #No
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #AddressRefRecId
RelatedField #RecId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #AddressRefTableId
RelatedField #TableId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #CountyOrigDest
PROPERTIES
Name #CountyOrigDest
Table #AddressCounty
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #CountyOrigDest
RelatedField #CountyId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #MarkupGroup
PROPERTIES
Name #MarkupGroup
Table #MarkupGroup
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE EXTERNFIXED
PROPERTIES
Value #2
Table #MarkupGroup
RelatedField #Module
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #MarkupGroup
RelatedField #GroupId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #SalesTable
PROPERTIES
Name #SalesTable
Table #SalesTable
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PurchTable
Field #InterCompanyOrder
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PurchTable
Field #InterCompanyCompanyId
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PurchTable
Field #InterCompanySalesId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #SalesTableInterCompany
PROPERTIES
Name #SalesTableInterCompany
Table #SalesTable
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PurchTable
Field #InterCompanyOrder
Value #1
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #InterCompanyCompanyId
RelatedField #dataAreaId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #InterCompanySalesId
RelatedField #SalesId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #VendPaymModeSpec
PROPERTIES
Name #VendPaymModeSpec
Table #VendPaymModeSpec
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #PaymMode
RelatedField #PaymMode
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #PaymSpec
RelatedField #Specification
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
ENDREFERENCES
DELETEACTIONS
#BPLChangeDlvReasonHistory
PROPERTIES
Table #BPLChangeDlvReasonHistory
DeleteAction #Cascade
ENDPROPERTIES
#PrintMgmtDocInstance
PROPERTIES
Table #PrintMgmtDocInstance
DeleteAction #Cascade
ENDPROPERTIES
#TaxWorkRegulation
PROPERTIES
Table #TaxWorkRegulation
DeleteAction #Cascade
ENDPROPERTIES
#DocuRef
PROPERTIES
Table #DocuRef
DeleteAction #Cascade
ENDPROPERTIES
#InterCompanyPurchSalesReference
PROPERTIES
Table #InterCompanyPurchSalesReference
DeleteAction #Cascade
ENDPROPERTIES
#LedgerCov
PROPERTIES
Table #LedgerCov
DeleteAction #Cascade
ENDPROPERTIES
#MarkupTrans
PROPERTIES
Table #MarkupTrans
DeleteAction #Cascade
ENDPROPERTIES
#VendPaymSched
PROPERTIES
Table #VendPaymSched
DeleteAction #Cascade
ENDPROPERTIES
#CustVendCreditInvoicingTable
PROPERTIES
Table #CustVendCreditInvoicingTable
DeleteAction #Cascade
ENDPROPERTIES
ENDDELETEACTIONS
METHODS
Version: 3
SOURCE #AccountClearing
#//BP Deviation documented
#server display LedgerAccount accountClearing()
#{
# return VendLedgerAccounts::clearingAccount(this.InvoiceAccount,
# this.PostingProfile);
#}
ENDSOURCE
SOURCE #AccountVend
#//BP Deviation documented
#server display LedgerAccount accountVend()
#{
# return VendLedgerAccounts::sumAccount(this.InvoiceAccount,
# this.PostingProfile);
#}
ENDSOURCE
SOURCE #aifEndpointActionValueMap
#AifEndpointActionValueMap aifEndpointActionValueMap(boolean _forUpdate = false)
#{
# #InterCompany
# AifActionId defaultPurchaseRequisitionAction = #DefaultPurchaseRequisitionAction;
# AifEndpointActionValueMap aifEndpointActionValueMap;
#;
# changecompany(this.DataAreaId)
# {
# aifEndpointActionValueMap = AifEndpointActionValueMap::find(AifEndpointConstraint::findInterCompanyEndpointId(VendTable::find(this.OrderAccount)),defaultPurchaseRequisitionAction);
# }
# return aifEndpointActionValueMap;
#}
#
ENDSOURCE
SOURCE #amountDelivered
#// BP Deviation Documented
#server display AmountCur amountDelivered()
#{
# PurchLine purchLine;
# AmountCur amountCur = 0;
# ;
#
# while select purchLine
# index hint PurchLineIdx
# where purchLine.PurchId == this.PurchId
# {
# amountCur += purchLine.calcLineAmountExclTax(purchLine.PurchQty - purchLine.RemainPurchPhysical);
# }
#
# return amountCur;
#}
ENDSOURCE
SOURCE #amountInvoiced
#//BP Deviation documented
#server display AmountCur amountInvoiced()
#{
# VendInvoiceJour vendInvoiceJour;
# ;
#
# select sum(InvoiceAmount) from vendInvoiceJour
# where vendInvoiceJour.PurchId == this.PurchId;
#
# return vendInvoiceJour.InvoiceAmount;
#}
ENDSOURCE
SOURCE #amountInvoicedExclTax
#// BP Deviation Documented
#server display AmountCur amountInvoicedExclTax()
#{
# PurchLine purchLine;
# AmountCur amountCur = 0;
# ;
#
# while select purchLine
# index hint PurchLineIdx
# where purchLine.PurchId == this.PurchId
# {
# amountCur += purchLine.calcLineAmountExclTax(purchLine.PurchQty - purchLine.RemainPurchFinancial);
# }
#
# return amountCur;
#}
#
ENDSOURCE
SOURCE #amountOrderedNotInvoiced
#//BP Deviation documented
#server display AmountCur amountOrderedNotInvoiced()
#{
# PurchLine purchLine;
# AmountCur ordered;
# ;
#
# while select purchLine
# index PurchLineIdx
# where purchLine.PurchId == this.PurchId
# {
# ordered += purchLine.calcLineAmountExclTax(purchLine.RemainPurchPhysical+purchLine.RemainPurchFinancial);
# }
#
# return ordered;
#}
ENDSOURCE
SOURCE #amountRemainingExclTax
#// BP Deviation Documented
#server display AmountCur amountRemainingExclTax()
#{
# PurchLine purchLine;
# AmountCur amountCur = 0;
# ;
#
# while select purchLine
# index hint PurchLineIdx
# where purchLine.PurchId == this.PurchId
# {
# amountCur += purchLine.calcLineAmountExclTax(purchLine.RemainPurchPhysical);
# }
#
# return amountCur;
#}
#
ENDSOURCE
SOURCE #amountRemainingMST
#// BP Deviation Documented
#server display AmountMST amountRemainingMST()
#{
# PurchLine purchLine;
# AmountMST amountMST = 0;
# AmountMST lineAmountMSTExclTax, receivedInTotalPrice;
# ;
#
# while select purchLine
# index hint PurchLineIdx
# where purchLine.PurchId == this.PurchId
# {
# lineAmountMSTExclTax = purchLine.lineAmountMSTExclTax();
# receivedInTotalPrice = purchLine.receivedInTotalPrice();
# amountMST += (lineAmountMSTExclTax-receivedInTotalPrice);
# }
#
# return amountMST;
#}
ENDSOURCE
SOURCE #AxPurchTable
#public AxPurchTable axPurchTable()
#{
# AxPurchTable axPurchTable = AxPurchTable::newPurchTable(this);
# return axPurchTable;
#}
#
ENDSOURCE
SOURCE #BPLcheckDlvDates
#// Israel-Localisation-Prodware-ImportFolder
#boolean BPLcheckDlvDates()
#{
# // BPLRequestedDlvDate mandatory
# if ((this.BPLVendorConfirmedDlvDate && this.BPLVendorConfirmedDlvDate < this.BPLRequestedDlvDate) ||
# (this.DeliveryDate && this.DeliveryDate < this.BPLRequestedDlvDate) ||
# (this.BPLVendorConfirmedDlvDate && this.DeliveryDate && this.DeliveryDate < this.BPLVendorConfirmedDlvDate))
# {
# return checkFailed(strfmt("@BPL78", this.PurchId));
# }
#
# return true;
#}
#
ENDSOURCE
SOURCE #BPLcopyDlvFieldsToLine
#// Israel-Localisation-Prodware-ImportFolder
#server void BPLcopyDlvFieldsToLine(FieldName _fieldName)
#{
# PurchLine purchLine;
# BPLChangeDlvReasonHistory BPLChangeDlvReasonHistory;
# ;
#
# ttsbegin;
#
# while select forupdate purchLine
# where purchLine.PurchId == this.PurchId
# {
# purchLine.(fieldname2id(tablenum(PurchLine), _fieldName)) = this.(fieldname2id(tablenum(PurchTable), _fieldName));
# purchLine.modifiedField(fieldname2id(tablenum(PurchLine), _fieldName));
# purchLine.validateWrite();
# purchLine.write();
# }
#
# ttscommit;
#}
ENDSOURCE
SOURCE #BPLmodifyDeliveryDates
#// Israel-Localisation-Prodware-ImportFolder
#void BPLmodifyDeliveryDates(fieldId _fieldId)
#{
# switch (_fieldId)
# {
# case fieldnum(PurchTable, BPLRequestedDlvDate):
# if (this.BPLRequestedDlvDate)
# {
# this.BPLVendorConfirmedDlvDate = this.BPLRequestedDlvDate;
# this.DeliveryDate = this.BPLRequestedDlvDate;
# }
# break;
#
# case fieldnum(PurchTable, BPLVendorConfirmedDlvDate):
# if (this.BPLVendorConfirmedDlvDate)
# this.DeliveryDate = this.BPLVendorConfirmedDlvDate;
# break;
# }
#
#}
ENDSOURCE
SOURCE #BPLupdateDlvFieldsToLine
#// Israel-Localisation-Prodware-ImportFolder
#void BPLupdateDlvFieldsToLine(NoYes _copyDlvFields, boolean _AddChangeDlvReasonHistory, BPLChangeDlvReasonId _ChangeDlvReasonId, PurchTable _purchTable_orig)
#{
# BPLChangeDlvReasonHistory BPLChangeDlvReasonHistory;
# PurchLine purchLine ;
#
# ttsbegin;
#
# if (_AddChangeDlvReasonHistory)
# {
# BPLChangeDlvReasonHistory.clear();
# BPLChangeDlvReasonHistory.initFromPurchTable(_purchTable_orig, this);
# BPLChangeDlvReasonHistory.ChangeDlvReasonId = _ChangeDlvReasonId;
# BPLChangeDlvReasonHistory.insert();
# }
#
# if (_copyDlvFields)
# {
#
# while select forupdate purchLine
# where purchLine.PurchId == this.PurchId
# {
# if (this.BPLRequestedDlvDate != _purchTable_orig.BPLRequestedDlvDate)
# {
# purchLine.BPLRequestedDlvDate = this.BPLRequestedDlvDate;
# purchLine.modifiedField(fieldnum(PurchLine, BPLRequestedDlvDate));
# }
#
# if (this.BPLVendorConfirmedDlvDate != _purchTable_orig.BPLVendorConfirmedDlvDate)
# {
# purchLine.BPLVendorConfirmedDlvDate = this.BPLVendorConfirmedDlvDate;
# purchLine.modifiedField(fieldnum(PurchLine, BPLVendorConfirmedDlvDate));
# }
#
# if (this.DeliveryDate != _purchTable_orig.DeliveryDate)
# {
# purchLine.DeliveryDate = this.DeliveryDate;
# purchLine.modifiedField(fieldnum(PurchLine, DeliveryDate));
# }
#
# purchLine.validateWrite();
#
# if ((purchLine.BPLVendorConfirmedDlvDate != purchLine.orig().BPLVendorConfirmedDlvDate) ||
# (purchLine.DeliveryDate != purchLine.orig().DeliveryDate))
# {
# purchline.BPLAddChangeDlvReasonHistory(_ChangeDlvReasonId, purchLine, purchLine.orig());
# }
#
# purchLine.write();
# }
# }
#
# ttscommit;
#
#}
#
ENDSOURCE
SOURCE #canCreditNoteBeCreated
#boolean canCreditNoteBeCreated()
#{
# return this.type().canCreditNoteBeCreated();
#}
ENDSOURCE
SOURCE #CheckAccount
#boolean checkAccount()
#{
# boolean ok = true;
# ;
#
# if (VendTable::blocked(this.OrderAccount) == CustVendorBlocked::All)
# return checkFailed(strfmt("@SYS1138", this.OrderAccount));
#
# return ok;
#}
ENDSOURCE
SOURCE #CheckCashPayment
#boolean checkCashPayment()
#{
# if (PaymTerm::isCashAccount(this.Payment) && this.PaymentSched )
# {
# return checkFailed(strfmt("@SYS28733"));
# }
# return true;
#}
ENDSOURCE
SOURCE #CheckCurrencyCode
#client server boolean checkCurrencyCode()
#{
# boolean oK = true;
# ;
#
# if (this)
# {
# if (this.CurrencyCode != this.orig().CurrencyCode &&
# PurchLine::existDifferentCurrency(this.PurchId,this.CurrencyCode))
# {
# warning("@SYS15290");
#
# this.CurrencyCode = this.orig().CurrencyCode;
# }
#
# if (this.CurrencyCode != this.orig().CurrencyCode &&
# MarkupTrans::existDifferentCurrency(this.TableId, this.RecId, this.CurrencyCode))
# {
# warning("@SYS24528");
#
# this.CurrencyCode = this.orig().CurrencyCode;
# }
# }
#
# return oK;
#}
ENDSOURCE
SOURCE #checkDelete
#boolean checkDelete(boolean _useWarning = true)
#{
# return this.type().checkDelete(_useWarning);
#}
#
ENDSOURCE
SOURCE #checkIfUpdate
#server container checkIfUpdate(boolean _excludePending)
#{
# return this.type().checkIfUpdate(_excludePending);
#}
#
#
ENDSOURCE
SOURCE #CheckMarkupTrans
#server boolean checkMarkupTrans(boolean _warningOnly = true)
#{
# ;
# return MarkupTrans::checkMarkupTrans(this.TableId, this.RecId, _warningOnly);
#}
#
ENDSOURCE
SOURCE #checkPayment
#boolean checkPayment()
#{
# if (this.PaymentSched && this.FixedDueDate)
# {
# return checkFailed("@SYS69828");
# }
#
# return true;
#}
#
ENDSOURCE
SOURCE #CheckUpdate
#boolean checkUpdate(boolean useWarning = true,
# boolean _interCompanyCheck = true)
#{
# boolean ok = (this ? true : false);
# SalesTable salesTable;
# ;
#
# if (this && this.PurchStatus == PurchStatus::Invoiced)
# {
# switch (PurchParameters::find().AccesLevelInvoiced)
# {
#
#
#
# case SalesPurchAccesLevel::None : ok = true;
# break;
#
# case SalesPurchAccesLevel::Warning : if (useWarning && Box::yesNo("@SYS27044",DialogButton::Yes) != DialogButton::Yes)
# ok = false;
# break;
#
# case SalesPurchAccesLevel::Locked : ok = false;
# break;
# }
# }
#
# if (_interCompanyCheck)
# {
# if (this && !ok && (this.isInterCompanyOrder() || this.InterCompanyDirectDelivery))
# warning("@SYS106306");
#
# if (ok
# && this.SkipUpdate != InterCompanySkipUpdate::InterCompany
# && this.SkipUpdate != InterCompanySkipUpdate::Both
# && this.isInterCompanyOrder())
# {
# changecompany(this.InterCompanyCompanyId)
# {
# salesTable = null;
# salesTable = SalesTable::find(this.InterCompanySalesId);
# if (salesTable)
# {
# salesTable.SkipUpdate = InterCompanySkipUpdate::InterCompany;
# ok = SalesTableType::construct(salesTable).checkUpdate(false,_interCompanyCheck);
# }
# }
# }
#
# if (ok
# && this.SkipUpdate != InterCompanySkipUpdate::Internal
# && this.SkipUpdate != InterCompanySkipUpdate::Both)
# {
# salesTable = null;
# salesTable = SalesTable::find(this.InterCompanyOriginalSalesId);
# if (salesTable)
# {
# salesTable.SkipUpdate = InterCompanySkipUpdate::Internal;
# ok = SalesTableType::construct(salesTable).checkUpdate(false,_interCompanyCheck);
# }
# }
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #clearAddressReference
#public void clearAddressReference()
#{
# this.AddressRefRecId = 0;
# this.AddressRefTableId = 0;
#}
ENDSOURCE
SOURCE #ClearingPeriod
#//BP Deviation documented
#display ClearingPeriod clearingPeriod()
#{
# return this.payer().clearingPeriod();
#}
ENDSOURCE
SOURCE #clearPurchReqRef
#void clearPurchReqRef()
#{
# #OCCRetryCount
# PurchReqLine purchReqLine;
# PurchReqTable purchReqTable;
# #define.EmptyString('')
# ;
#
# select firstonly PurchReqId from purchReqLine where purchReqLine.PurchId == this.PurchId;
#
# if (purchReqLine.PurchReqId)
# {
# try
# {
# ttsbegin;
# purchReqTable = PurchReqTable::find(purchReqLine.PurchReqId, true);
# purchReqTable.Status = PurchReqStatus::ApprovedCancelled;
# purchReqTable.update();
# ttscommit;
# }
# catch(Exception::Deadlock)
# {
# retry;
# }
# catch(Exception::UpdateConflict)
# {
# if (appl.ttsLevel() == 0)
# {
# if (xSession::currentRetryCount() >= #RetryNum)
# {
# throw Exception::UpdateConflictNotRecovered;
# }
# else
# {
# retry;
# }
# }
# else
# {
# throw Exception::UpdateConflict;
# }
# }
# }
#}
ENDSOURCE
SOURCE #contactPerson
#ContactPerson contactPerson(boolean update = false)
#{
# return ContactPerson::find(this.ContactPersonId, update);
#}
ENDSOURCE
SOURCE #ContactPersonName
#//BP Deviation documented
#display ContactPersonName contactPersonName()
#{
# return ContactPerson::name(this.ContactPersonId);
#}
ENDSOURCE
SOURCE #convertCurrencyCode
#server void convertCurrencyCode(CurrencyCode currencyCode, TradeCurencyConversion tradeCurencyConversion = TradeCurencyConversion::ExchRate)
#{
# PurchLine purchLine;
# MarkupTrans markupTrans;
#
# ttsbegin;
#
# while select forupdate purchLine
# where purchLine.PurchId == this.PurchId
# {
# purchLine.convertCurrencyCode(currencyCode, tradeCurencyConversion);
# purchLine.doUpdate();
# if(purchLine.ProjId && (purchLine.RemainPurchFinancial+purchLine.RemainPurchPhysical)!=0) //Committed cost updated since vender conrency changes
# this.projCostControlUpdate(purchLine,ProjCommittedCostUpdateAction::UpdateReverse);
#
# }
#
# while select forupdate markupTrans
# index hint TableRecIdIdx
# where markupTrans.TransTableId == this.TableId &&
# markupTrans.TransRecId == this.RecId
# {
# markupTrans.convertCurrencyCode(currencyCode);
# markupTrans.doUpdate();
# }
#
# VendPaymSched::deleteVendPaymSched(this.TableId, this.RecId);
#
# this.CurrencyCode = currencyCode;
#
# ttscommit;
#
#}
ENDSOURCE
SOURCE #copyAddressToLine
#server void copyAddressToLine(DialogButton copyAddress,
# PurchTable purchTable)
#{
# PurchLine purchLine;
# ;
#
# if (copyAddress == DialogButton::Cancel)
# return;
#
# ttsbegin;
#
# while select forupdate purchLine
# where purchLine.PurchId == this.PurchId &&
# (copyAddress == DialogButton::YesToAll ||
# purchLine.DeliveryAddress == purchTable.orig().DeliveryAddress)
# {
# purchLine.setAddressFromPurchTable(this);
#
# purchLine.write();
# }
#
# ttscommit;
#}
ENDSOURCE
SOURCE #copyDimension
#///
#/// Returns a dimension set that can be applied to the PurchTable.dimension field.
#/// The method ensures that potential linked dimensions are not overwritten.
#///
#///
#/// A dimension set that should be applied to the PurchTable.dimension field.
#///
#///
#/// A dimensionCopy object previously instantiated using the current PurchTable buffer; optional.
#///
#///
#/// Dimension set that can be applied to the PurchTable.dimension field.
#///
#public Dimension copyDimension(Dimension _dimension, DimensionCopy _dimensionCopy = DimensionCopy::newFromTable(this))
#{
# return _dimensionCopy.copy(_dimension);
#}
#
ENDSOURCE
SOURCE #CopyPaymentSched
#server void copyPaymentSched(VendInvoiceJour vendInvoiceJour)
#{
# VendPaymSched vendorPaymSched;
# VendPaymSchedLine vendPaymSchedLine;
#
# VendPaymSched newVendPaymSched;
# VendPaymSchedLine newVendPaymSchedLine;
# ;
#
# ttsbegin;
#
# select firstonly vendorPaymSched
# where vendorPaymSched.ExtTableId == this.TableId &&
# vendorPaymSched.ExtRecId == this.RecId;
#
# if (vendorPaymSched)
# {
# newVendPaymSched = vendorPaymSched.data();
# newVendPaymSched.ExtTableId = vendInvoiceJour.TableId;
# newVendPaymSched.ExtRecId = vendInvoiceJour.RecId;
# newVendPaymSched.insert();
#
# while select vendPaymSchedLine
# where vendPaymSchedLine.FatherRecID == vendorPaymSched.RecId
# {
# newVendPaymSchedLine = vendPaymSchedLine.data();
# newVendPaymSchedLine.FatherRecID = newVendPaymSched.RecId;
# newVendPaymSchedLine.insert();
# }
# }
# ttscommit;
#}
ENDSOURCE
SOURCE #createMarkupTrans
#server void createMarkupTrans()
#{;
# Markup::insertMarkupTrans(HeadingLine::Heading,
# ModuleInventCustVend::Vend,
# this,
# this.OrderAccount,
# this.MarkupGroup,
# this.CurrencyCode,
# this.LanguageId,
# '',
# this.MarkupGroup);
#}
ENDSOURCE
SOURCE #CreateOneTimeAccount
#server void createOneTimeAccount()
#{
# this.OrderAccount = VendTable::createOneTimeAccount(this);
# this.initFromVendTable();
#
# if (!this.InvoiceAccount)
# this.InvoiceAccount = this.OrderAccount;
#
#}
ENDSOURCE
SOURCE #CreatePaymentSched
#client server void createPaymentSched()
#{
# CustVendPaymSched custVendPaymSched;
# PurchTotals purchTotals = PurchTotals::newPurchTable(this, PurchUpdate::All);
# ;
#
# purchTotals.calc();
#
# custVendPaymSched = CustVendPaymSched::construct(SysModule::Vend,this);
# custVendPaymSched.setPurchTotals(purchTotals);
# custVendPaymSched.createPaymSched(PaymSched::find(this.PaymentSched));
#}
#
ENDSOURCE
SOURCE #delete
#public void delete()
#{
# PurchTableType purchTableType;
# ;
#
# this.clearPurchReqRef();
# purchTableType = this.type();
# purchTableType.delete();
#
# TradeBLWIJournalPurposeCodes::deleteRecord(this.RecId, TradeBLWITypeOfForm::PurchTable);
#
#}
#
ENDSOURCE
SOURCE #deliveryDate
#//BP Deviation documented
#display DlvDate deliveryDate(DlvDate blankDate = systemdateget())
#{
# if (this.DeliveryDate)
# return this.DeliveryDate;
#
# return blankDate;
#}
ENDSOURCE
SOURCE #editContactPersonName
#//BP Deviation documented
#client server edit ContactPersonName editContactPersonName(boolean _set, ContactPersonName _name)
#{
# ContactPersonName name = _name;
# ContactPerson contactPerson;
# ContactPersonId contactPersonId;
# if (_set)
# {
# if (name)
# {
# contactPersonId = this.ContactPersonId;
# contactPerson = ContactPerson::find(_name);
# this.ContactPersonId = contactPerson.ContactPersonId;
# if (this.ContactPersonId)
# {
# name = contactPerson.Name;
# }
# else
# {
# select contactPerson
# where contactPerson.VendAccount == this.OrderAccount &&
# contactPerson.Name like name;
# if (contactPerson)
# {
# this.ContactPersonId=contactPerson.ContactPersonId;
# name=contactPerson.Name;
# }
# }
# if (contactPersonId != this.ContactPersonId)
# {
# this.initFromContactInfo();
# if (this.dataSource())
# this.dataSource().refresh();
# }
# }
# else
# {
# this.ContactPersonId = '';
# }
# }
# else
# {
# name = this.contactPersonName();
# }
# return name;
#}
ENDSOURCE
SOURCE #existingJournals
#server container existingJournals()
#{
# return[this.lastPurchaseOrder(),
# this.lastReceiptsList(),
# this.lastPackingSlip(),
# this.lastInvoice()];
#}
#
ENDSOURCE
SOURCE #existMarkedSettlement
#boolean existMarkedSettlement(fieldId _fieldId)
#{
# if (this.SettleVoucher && SpecTrans::getSpecTransCount(this.DataAreaId, this.TableId, this.RecId))
# {
# switch(_fieldId)
# {
# case fieldnum(PurchTable, OrderAccount): error("@SYS99930");
# break;
#
# case fieldnum(PurchTable, InvoiceAccount): error("@SYS100000");
# break;
#
# default: return false;
# }
# return true;
# }
#
# return false;
#}
ENDSOURCE
SOURCE #existPendingInvoice
#///
#/// Determines if any unposted invoices exist for the current record.
#///
#///
#/// True if a pending invoice exists for this purchase order; otherwise, false.
#///
#///
#/// It includes unposted invoices saved in batches or in the process of being edited. Additionally
#/// it includes those invoices actually saved as pending.
#///
#public boolean existPendingInvoice()
#{
# PurchParmTable purchParmTable;
# PurchParmLine purchParmLine;
# ;
#
# if (this.existSavedInvoice())
# {
# return true;
# }
#
# if (this.PurchStatus == PurchStatus::Backorder || this.PurchStatus == PurchStatus::Received)
# {
# select firstonly RecId from purchParmLine
# where purchParmLine.OrigPurchId == this.PurchId
# exists join purchParmTable
# where purchParmTable.VendInvoiceSaveStatus == VendInvoiceSaveStatus::Pending &&
# purchParmTable.ParmJobStatus == ParmJobStatus::Waiting &&
# (purchParmTable.Ordering == DocumentStatus::Invoice ||
# purchParmTable.Ordering == DocumentStatus::ApproveJournal) &&
# purchParmTable.ParmId == purchParmLine.ParmId &&
# purchParmTable.TableRefId == purchParmLine.TableRefId;
#
# if (purchParmLine.RecId != 0)
# {
# return true;
# }
# }
# return false;
#}
#
ENDSOURCE
SOURCE #existPurchLine
#boolean existPurchLine()
#{
# Query query;
# QueryRun queryRun;
# PurchLine purchLine;
# ;
# query = this.queryPurchLine();
# query.dataSourceTable(tablenum(PurchLine)).firstOnly(true);
#
# queryRun = new QueryRun(query);
# while (queryRun.next())
# {
# if (queryRun.changed(tablenum(PurchLine)))
# {
# purchLine = queryRun.get(tablenum(PurchLine));
# if (purchLine.RecId)
# {
# break;
# }
# }
# }
#
# return purchLine.RecId != 0;
#}
ENDSOURCE
SOURCE #existSavedInvoice
#///
#/// Determines if any saved invoices exist for the current record.
#///
#///
#/// True if a saved invoice exists for this purchase order; otherwise, false.
#///
#public boolean existSavedInvoice()
#{
# VendInvoiceInfoLine vendInvoiceInfoLine;
# ;
#
# if (this.PurchStatus == PurchStatus::Backorder || this.PurchStatus == PurchStatus::Received)
# {
# select firstonly RecId from vendInvoiceInfoLine
# where vendInvoiceInfoLine.OrigPurchId == this.PurchId;
#
# if (vendInvoiceInfoLine.RecId != 0)
# {
# return true;
# }
# }
# return false;
#}
#
#
#
ENDSOURCE
SOURCE #fieldChanged
#boolean fieldChanged(fieldId fieldId)
#{
# boolean ok = false;
# ;
#
# if (!this.RecId)
# ok = true;
#
# if (this.orig().(fieldId) != this.(fieldId))
# ok = true;
#
# return ok;
#}
ENDSOURCE
SOURCE #initDefaultAddress
#public void initDefaultAddress()
#{
# CompanyInfo companyInfo = CompanyInfo::find();
# Address address = Address::find(companyInfo.TableId, companyInfo.RecId, AddressType::Delivery);
# ;
#
# if (address)
# {
# this.setAddress(address);
# }
# else
# {
# this.DeliveryName = companyInfo.Name;
# this.DeliveryAddress = companyInfo.Address;
# this.DeliveryZipCode = companyInfo.ZipCode;
# this.DlvCountryRegionId = companyInfo.CountryRegionId;
# this.DlvState = companyInfo.State;
# this.DlvCounty = companyInfo.County;
# this.DeliveryStreet = companyInfo.Street;
# this.DeliveryCity = companyInfo.City;
# this.AddressRefRecId = companyInfo.RecId;
# this.AddressRefTableId = companyInfo.TableId;
# }
#}
ENDSOURCE
SOURCE #initFromContactInfo
#void initFromContactInfo()
#{
# ContactPerson contactPerson = this.contactPerson();
#
# if (this.ContactPersonId && contactPerson.Email)
# this.Email = contactPerson.Email;
# else
# this.Email = this.vendTable_OrderAccount().Email;
#
# if (this.ContactPersonId && contactPerson.url)
# this.url = contactPerson.url;
#}
#
ENDSOURCE
SOURCE #initFromPayment
#void initFromPayment()
#{
# this.PaymentSched = this.payment().PaymSched;
# this.FixedDueDate = dateNull();
#}
ENDSOURCE
SOURCE #initFromProjInvoiceTable
#void initFromProjInvoiceTable()
#{
# ProjTable projTable;
# ProjInvoiceTable projInvoiceTable;
# ;
# projTable = this.projTable();
# projInvoiceTable = projTable.projInvoice();
#
# this.TransactionCode = projInvoiceTable.TransactionCodeId;
# this.Dimension = this.copyDimension(projTable.Dimension);
# this.Listcode = projInvoiceTable.ListCodeId;
#
# if (VendParameters::find().VendPaym_NO == NoYes::Yes)
# {
# this.BankCentralBankPurposeCode = projInvoiceTable.BankCentralBankPurposeCode;
# this.BankCentralBankPurposeText = projInvoiceTable.BankcentralBankPurposeText;
# }
#}
ENDSOURCE
SOURCE #initFromPurchRFQReplyTable
#void initFromPurchRFQReplyTable(PurchRFQReplyTable _purchRFQReplyTable)
#{
# ;
# this.Payment = _purchRFQReplyTable.Payment;
# this.CurrencyCode = _purchRFQReplyTable.CurrencyCode;
# this.DlvTerm = _purchRFQReplyTable.DlvTerm;
# this.DlvMode = _purchRFQReplyTable.DlvMode;
# this.DiscPercent = _purchRFQReplyTable.DiscPercent;
# this.DeliveryDate = _purchRFQReplyTable.DeliveryDate;
# this.VendorRef = _purchRFQReplyTable.VendRef;
#}
ENDSOURCE
SOURCE #initFromPurchRFQTable
#void initFromPurchRFQTable(PurchRFQTable _purchRFQTable)
#{
# this.PurchaseType = _purchRFQTable.purchaseType();
# this.LanguageId = _purchRFQTable.LanguageId;
# this.Payment = _purchRFQTable.Payment;
# this.PaymMode = _purchRFQTable.PaymMode;
# this.PaymSpec = _purchRFQTable.PaymSpec;
# this.NumberSequenceGroup = _purchRFQTable.NumberSequenceGroup;
# this.CashDisc = _purchRFQTable.CashDisc;
# this.EndDisc = _purchRFQTable.EndDisc;
#
# this.CurrencyCode = _purchRFQTable.CurrencyCode;
# this.DlvTerm = _purchRFQTable.DlvTerm;
# this.DlvMode = _purchRFQTable.DlvMode;
# this.Dimension = _purchRFQTable.Dimension;
# this.TaxGroup = _purchRFQTable.TaxGroup;
# this.InclTax = _purchRFQTable.InclTax;
#
# this.DeliveryName = _purchRFQTable.DeliveryName;
# this.DeliveryAddress = _purchRFQTable.DeliveryAddress;
# this.DeliveryZipCode = _purchRFQTable.DeliveryZipCode;
# this.DlvCountryRegionId = _purchRFQTable.DeliveryCountryRegionId;
# this.DlvState = _purchRFQTable.DeliveryState;
# this.DlvCounty = _purchRFQTable.DeliveryCounty;
# this.DeliveryStreet = _purchRFQTable.DeliveryStreet;
# this.DeliveryCity = _purchRFQTable.DeliveryCity;
# this.AddressRefRecId = _purchRFQTable.RecId;
# this.AddressRefTableId = _purchRFQTable.TableId;
# this.InventSiteId = _purchRFQTable.InventSiteId;
# this.InventLocationId = _purchRFQTable.InventLocationId;
#
# this.ProjId = _purchRFQTable.ProjId;
#}
#
ENDSOURCE
SOURCE #initFromPurchTable
#///
#/// Initializes the PurchTable record from another purchase order record.
#///
#///
#/// The purchase order to initialize from.
#///
#void initFromPurchTable(PurchTable purchTable)
#{
# this.LanguageId = purchTable.LanguageId;
# this.Payment = purchTable.Payment;
# this.PaymMode = purchTable.PaymMode;
# this.PaymSpec = purchTable.PaymSpec;
# this.NumberSequenceGroup = purchTable.NumberSequenceGroup;
# this.CashDisc = purchTable.CashDisc;
#
# if(TaxParameters::find().CashDiscOnInvoice)
# this.CashDiscPercent = purchTable.CashDiscPercent;
#
# this.CurrencyCode = purchTable.CurrencyCode;
# this.DlvTerm = purchTable.DlvTerm;
# this.DlvMode = purchTable.DlvMode;
# this.Dimension = this.copyDimension(purchTable.Dimension);
# this.TaxGroup = purchTable.TaxGroup;
# this.InclTax = purchTable.InclTax;
# this.Transport = purchTable.Transport;
# this.Port = purchTable.Port;
# this.StatProcId = purchTable.StatProcId;
#
# if (!this.RecId || !this.skipAddressFields())
# {
# this.DeliveryName = purchTable.DeliveryName;
# this.DeliveryAddress = purchTable.DeliveryAddress;
# this.DeliveryZipCode = purchTable.DeliveryZipCode;
# this.DlvCountryRegionId = purchTable.DlvCountryRegionId;
# this.DlvState = purchTable.DlvState;
# this.DlvCounty = purchTable.DlvCounty;
# this.DeliveryStreet = purchTable.DeliveryStreet;
# this.DeliveryCity = purchTable.DeliveryCity;
# this.AddressRefRecId = purchTable.RecId;
# this.AddressRefTableId = purchTable.TableId;
# }
#
# this.Listcode = purchTable.Listcode;
#}
ENDSOURCE
SOURCE #initFromSalesTable
#void initFromSalesTable(SalesTable salesTable)
#{
# this.InterCompanyOriginalSalesId = salesTable.SalesId;
# this.InterCompanyOriginalCustAccount = salesTable.CustAccount;
# this.InterCompanyDirectDelivery = salesTable.InterCompanyDirectDelivery;
#}
#
ENDSOURCE
SOURCE #initFromVendInvoiceJour
#void initFromVendInvoiceJour(VendInvoiceJour vendInvoiceJour)
#{
# this.Payment = vendInvoiceJour.Payment;
# this.NumberSequenceGroup = vendInvoiceJour.NumberSequenceGroup;
# this.CashDisc = vendInvoiceJour.CashDiscCode;
#
# if(TaxParameters::find().CashDiscOnInvoice)
# this.CashDiscPercent = vendInvoiceJour.CashDiscPercent;
#
# this.CurrencyCode = vendInvoiceJour.CurrencyCode;
# this.Dimension = this.copyDimension(vendInvoiceJour.Dimension);
# this.InclTax = vendInvoiceJour.InclTax;
#}
ENDSOURCE
SOURCE #initFromVendPackingSlipJour
#void initFromVendPackingSlipJour(VendPackingSlipJour vendPackingSlipJour)
#{
# this.DlvTerm = vendPackingSlipJour.DlvTerm;
# this.DlvMode = vendPackingSlipJour.DlvMode;
# this.Dimension = this.copyDimension(vendPackingSlipJour.Dimension);
#}
ENDSOURCE
SOURCE #initFromVendPurchOrderJour
#void initFromVendPurchOrderJour(VendPurchOrderJour vendPurchOrderJour)
#{;
# this.DlvTerm = vendPurchOrderJour.DlvTerm;
# this.DlvMode = vendPurchOrderJour.DlvMode;
# this.LanguageId = vendPurchOrderJour.LanguageId;
# this.Payment = vendPurchOrderJour.Payment;
# this.CashDisc = vendPurchOrderJour.CashDiscCode;
# this.CurrencyCode = vendPurchOrderJour.CurrencyCode;
# this.Dimension = this.copyDimension(vendPurchOrderJour.Dimension);
# this.InclTax = vendPurchOrderJour.InclTax;
#}
ENDSOURCE
SOURCE #InitFromVendTable
#///
#/// Initializes the PurchTable record from a VendTable record.
#///
#///
#/// The vendor record to initialize from.
#///
#server void initFromVendTable(VendTable vendTable = this.vendTable_OrderAccount())
#{
# VendTable invoiceVendTable;
# boolean addressSet;
# TaxVATNumTable taxVATNumTable;
# ;
#
# this.OrderAccount = vendTable.AccountNum;
#
# this.InvoiceAccount = vendTable.InvoiceAccount ? vendTable.InvoiceAccount
# : vendTable.AccountNum;
#
# invoiceVendTable = this.vendTable_InvoiceAccount();
# this.vatNum = vendTable.vatNum;
# this.EnterpriseNumber = vendTable.EnterpriseNumber;
# this.NumberSequenceGroup = invoiceVendTable.NumberSequenceGroup;
#
# this.CurrencyCode = vendTable.Currency;
# if(VendParameters::find().VendNameFromVATNum)
# {
# taxVATNumTable = TaxVATNumTable::find(vendTable.vatNum, vendTable.CountryRegionId);
#
# if(taxVATNumTable.Name)
# {
# this.PurchName = taxVATNumTable.Name;
# }
# else
# {
# this.PurchName = vendTable.Name;
# }
# }
# else
# {
# this.PurchName = vendTable.Name;
# }
#
# this.ItemBuyerGroupId = vendTable.ItemBuyerGroupId;
# this.VendGroup = vendTable.VendGroup;
# this.PriceGroupId = vendTable.PriceGroup;
# this.TaxGroup = vendTable.TaxGroup;
# this.InclTax = vendTable.InclTax;
# this.LineDisc = vendTable.LineDisc;
# this.MultiLineDisc = vendTable.MultiLineDisc;
# this.EndDisc = vendTable.EndDisc;
#
# this.Email = vendTable.Email;
# this.url = vendTable.url;
#
# this.LanguageId = vendTable.LanguageId;
#
# this.Dimension = this.copyDimension(vendTable.Dimension);
# this.DlvTerm = vendTable.DlvTerm;
# this.DlvMode = vendTable.DlvMode;
# this.MarkupGroup = vendTable.MarkupGroup;
# this.FreightZone = vendTable.FreightZone;
#
# this.Payment = vendTable.PaymTermId;
# this.initFromPayment();
# if (vendTable.PaymSched)
# {
# this.PaymentSched = vendTable.PaymSched;
# }
# this.PaymMode = vendTable.PaymMode;
# this.PaymSpec = vendTable.PaymSpec;
#
# this.PostingProfile = VendParameters::find().PostingProfile;
#
# this.setInventSiteId(vendTable.InventSiteId);
# this.InventLocationId = vendTable.InventLocation;
#
# if (!this.RecId || !this.isDirectDeliveryOrder())
# {
# addressSet = this.setAddressFromInventLocationId(this.InventLocationId);
#
# if (!addressSet)
# {
# this.initDefaultAddress();
# }
# }
# this.ContactPersonId = vendTable.ContactPersonId;
#
# this.CashDisc = vendTable.CashDisc;
#
# if(vendTable.CashDisc)
# this.CashDiscPercent = CashDisc::find(vendTable.CashDisc).Percent;
#
# this.PurchPoolId = PurchParameters::find().PurchPoolId;
# if (vendTable.PurchPoolId)
# this.PurchPoolId = vendTable.PurchPoolId;
#
# this.InterCompanyOrder = vendTable.interCompanyAccount();
# this.InterCompanyCompanyId = vendTable.interCompanyCompanyId();
#
# if (VendParameters::find().VendPaym_NO == NoYes::Yes)
# {
# this.BankCentralBankPurposeCode = vendTable.BankCentralBankPurposeCode;
# this.BankCentralBankPurposeText = vendTable.BankCentralBankPurposeText;
# }
#
# if (vendTable.InvoiceDeclarationId_IS)
# {
# this.InvoiceDeclarationId_IS = vendTable.InvoiceDeclarationId_IS;
# }
#
#
# this.setListCode();
#}
#
ENDSOURCE
SOURCE #initFromVendTableMandatoryFields
#server void initFromVendTableMandatoryFields()
#{
# VendTable vendTable = this.vendTable_OrderAccount();
# ;
#
# this.VendGroup = vendTable.VendGroup;
#}
#
ENDSOURCE
SOURCE #InitInvoiceAccount
#void initInvoiceAccount()
#{
# VendTable vendTable = this.vendTable_InvoiceAccount();
# ;
#
# this.NumberSequenceGroup = vendTable.NumberSequenceGroup;
# this.Payment = vendTable.PaymTermId;
#
# this.initFromPayment();
#
# if (vendTable.PaymSched)
# this.PaymentSched = vendTable.PaymSched;
#
# this.PaymMode = vendTable.PaymMode;
# this.PaymSpec = vendTable.PaymSpec;
#
# this.CashDisc = vendTable.CashDisc;
# this.setListCode();
#}
ENDSOURCE
SOURCE #InitValue
#void initValue()
#{
# PurchTableType purchTableType;
# ;
#
# super();
#
# purchTableType = this.type();
# purchTableType.initValue();
#}
ENDSOURCE
SOURCE #insert
#void insert(boolean _interCompanySilent = false)
#{
# PurchTableType purchTableType;
# ;
#
# purchTableType = this.type();
# purchTableType.insert(_interCompanySilent);
# if (TradeBLWIParameters::find().ActivateBLWI == NoYes::Yes)
# {
# TradeBLWIFormCodes::createRecord(TradeBLWICustVend::Vendor, this.RecId, this.OrderAccount, TradeBLWITypeOfForm::PurchTable);
# }
#}
ENDSOURCE
SOURCE #interCompanyAllowIndirectCreationOrig
#// BP Deviation documented
#display InterCompanyAllowIndirectCreationTxt interCompanyAllowIndirectCreationOrig()
#{
# InterCompanyAllowIndirectCreationTxt interCompanyAllowIndirectCreationTxt;
# ;
# if (this.InterCompanyDirectDelivery
# && !this.InterCompanyAllowIndirectCreation)
# {
# interCompanyAllowIndirectCreationTxt = "@SYS95179";
# }
# return interCompanyAllowIndirectCreationTxt;
#}
ENDSOURCE
SOURCE #interCompanyCheckCurrency
#boolean interCompanyCheckCurrency()
#{
# MarkupTrans markupTrans;
# ;
# if (this.isInterCompanyOrder()
# && this.CurrencyCode != this.orig().CurrencyCode)
# {
# if (PurchLine::exist(this.PurchId))
# return checkFailed(strfmt("@SYS105402"));
#
# select firstonly markupTrans
# index hint TableRecIdIdx
# where markupTrans.TransTableId == this.TableId
# && markupTrans.TransRecId == this.RecId;
# if (markupTrans)
# {
# return checkFailed(strfmt("@SYS105402"));
# }
# }
# return true;
#}
ENDSOURCE
SOURCE #interCompanyEndpointActionPolicy
#InterCompanyEndpointActionPolicy interCompanyEndpointActionPolicy(boolean _forUpdate = false)
#{
# #InterCompany
# AifActionId defaultPurchaseRequisitionAction = #DefaultPurchaseRequisitionAction;
# InterCompanyEndpointActionPolicy interCompanyEndpointActionPolicy;
#;
# changecompany(this.DataAreaId)
# {
# interCompanyEndpointActionPolicy = InterCompanyEndpointActionPolicy::find(AifEndpointConstraint::findInterCompanyEndpointId(VendTable::find(this.OrderAccount)),defaultPurchaseRequisitionAction);
# }
# return interCompanyEndpointActionPolicy;
#}
#
ENDSOURCE
SOURCE #interCompanyOriginDisplay
#//BP Deviation Documented
#display InterCompanyOriginDisplay interCompanyOriginDisplay()
#{
# InterCompanyOriginDisplay interCompanyOriginDisplay;
# DictEnum dictEnum = new DictEnum(enumnum(InterCompanyOrigin));
# ;
# if (this.InterCompanyOrder)
# {
# interCompanyOriginDisplay = dictEnum.value2Name(this.InterCompanyOrigin);
# }
# return interCompanyOriginDisplay;
#}
#
ENDSOURCE
SOURCE #interCompanyPurchSalesReferenceCreate
#void interCompanyPurchSalesReferenceCreate(SalesId _origSalesId = this.InterCompanyOriginalSalesId)
#{
# InterCompanyPurchSalesReference interCompanyPurchSalesReference;
# ;
# if (this.PurchId
# && _origSalesId)
# {
# ttsbegin;
# select firstonly interCompanyPurchSalesReference
# index hint SalesPurchIdx
# where interCompanyPurchSalesReference.SalesId == _origSalesId
# && interCompanyPurchSalesReference.PurchId == this.PurchId;
#
# if (!interCompanyPurchSalesReference)
# {
# interCompanyPurchSalesReference.clear();
# interCompanyPurchSalesReference.SalesId = _origSalesId;
# interCompanyPurchSalesReference.PurchId = this.PurchId;
# interCompanyPurchSalesReference.insert();
# }
# ttscommit;
# }
#
# if (this.PurchId
# && this.InterCompanyOriginalSalesId
# && this.InterCompanyOriginalSalesId != _origSalesId)
# {
# this.InterCompanyOriginalSalesId = '';
# this.InterCompanyOriginalCustAccount = '';
# this.InterCompanyOrigin = InterCompanyOrigin::Source;
# }
#}
#
ENDSOURCE
SOURCE #interCompanySalesInfo
#//BP Deviation Documented
#public server container interCompanySalesInfo()
#{
# SalesTable salesTable;
# InterCompanySalesType salesType;
# SalesStatus salesStatus;
# DocumentStatus documentStatus;
# date documentDate;
# Num documentNum;
# DictEnum dictEnum = new DictEnum(enumnum(SalesType));
#;
# if (this.InterCompanyOrder
# && this.InterCompanyCompanyId)
# {
# changecompany(this.InterCompanyCompanyId)
# {
# select SalesId, SalesType, SalesStatus, DocumentStatus, QuotationId from salesTable
# index hint SalesIdx
# where salesTable.SalesId == this.InterCompanySalesId;
#
# if (salesTable.RecId)
# salesType = dictEnum.value2Name(salesTable.SalesType);
#
# salesStatus = salesTable.SalesStatus;
# documentStatus = salesTable.DocumentStatus;
#
# switch(salesTable.DocumentStatus)
# {
# case(DocumentStatus::Quotation):
# documentDate = salesTable.lastQuotationDate();
# documentNum = salesTable.lastQuotation();
# break;
# case(DocumentStatus::Confirmation):
# documentDate = salesTable.lastConfirmDate();
# documentNum = salesTable.lastConfirm();
# break;
# case(DocumentStatus::PickingList):
# documentDate = salesTable.lastPickingListDate();
# documentNum = salesTable.lastPickingList();
# break;
# case(DocumentStatus::PackingSlip):
# documentDate = salesTable.lastPackingSlipDate();
# documentNum = salesTable.lastPackingSlip();
# break;
# case(DocumentStatus::Invoice):
# documentDate = salesTable.lastInvoiceDate();
# documentNum = salesTable.lastInvoice();
# break;
# }
# }
# }
# return [salesType,salesStatus,documentStatus,documentDate,documentNum];
#}
ENDSOURCE
SOURCE #interCompanySalesTable
#SalesTable interCompanySalesTable(boolean _forUpdate = false)
#{
# SalesTable salesTable;
#;
# if (this.InterCompanyOrder
# && this.InterCompanyCompanyId
# && TradeInterCompany::checkDataAreaAccess(this.InterCompanyCompanyId,false))
# {
# changecompany(this.InterCompanyCompanyId)
# {
# salesTable = SalesTable::find(this.InterCompanySalesId, _forUpdate);
# }
#
# }
# return salesTable;
#}
ENDSOURCE
SOURCE #interCompanySalesTableOriginal
#SalesTable interCompanySalesTableOriginal(boolean _forUpdate = false)
#{
# SalesTable salesTable;
#;
# if (this.InterCompanyOriginalSalesId)
# {
# changecompany(this.DataAreaId)
# {
# salesTable = SalesTable::find(this.InterCompanyOriginalSalesId, _forUpdate);
# }
# }
# return salesTable;
#}
ENDSOURCE
SOURCE #interCompanyUpdateNow
#boolean interCompanyUpdateNow()
#{
# boolean ok = false;
# ;
#
# if (!this.RecId)
# ok = true;
#
# if (this.orig().PurchaseType != this.PurchaseType
# || this.orig().CurrencyCode != this.CurrencyCode
# || this.orig().DlvTerm != this.DlvTerm
# || this.orig().DlvMode != this.DlvMode
# || this.orig().DeliveryDate != this.DeliveryDate
# || this.orig().ReceiptDateConfirmed != this.ReceiptDateConfirmed
# || this.orig().ShippingDateRequested != this.ShippingDateRequested
# || this.orig().ShippingDateConfirmed != this.ShippingDateConfirmed
# || this.orig().DeliveryAddress != this.DeliveryAddress
# || this.orig().DeliveryName != this.DeliveryName
# || this.orig().DeliveryStreet != this.DeliveryStreet
# || this.orig().DeliveryZipCode != this.DeliveryZipCode
# || this.orig().DlvCountryRegionId != this.DlvCountryRegionId
# || this.orig().DlvState != this.DlvState
# || this.orig().DlvCounty != this.DlvCounty
# || this.orig().InterCompanyOriginalSalesId != this.InterCompanyOriginalSalesId
# || this.orig().InterCompanyOriginalCustAccount != this.InterCompanyOriginalCustAccount
# || this.orig().InterCompanyDirectDelivery != this.InterCompanyDirectDelivery
# || this.orig().Dimension != this.Dimension
# || this.orig().InterCompanyCustPurchOrderFormNum != this.InterCompanyCustPurchOrderFormNum
# || this.orig().VendorRef != this.VendorRef
# || this.orig().ReturnItemNum != this.ReturnItemNum
# || this.orig().Dimension != this.Dimension
# || this.orig().DiscPercent != this.DiscPercent)
# {
# ok = true;
# }
#
# return ok;
#}
#
ENDSOURCE
SOURCE #InventSiteActive
#boolean inventSiteActive()
#{;
# return classfactory.inventDimGlobal().inventSiteActiveWithoutItem();
#}
ENDSOURCE
SOURCE #InvoiceName
#//BP Deviation documented
#display VendName invoiceName()
#{
# return this.vendTable_InvoiceAccount().Name;
#}
#
ENDSOURCE
SOURCE #isDirectDeliveryOrder
#///
#/// Indicates if an purchase order is created as an direct delivery order.
#///
#///
#/// true if there are direct delivery lines for the purchase order: otherwise false.
#///
#boolean isDirectDeliveryOrder()
#{
# PurchLine purchLine;
# ;
# select firstonly RecId from purchLine
# where purchLine.PurchId == this.PurchId
# && purchLine.DeliveryType == TradeLineDlvType::DropShip;
#
# return purchLine.RecId;
#}
ENDSOURCE
SOURCE #isIntercompanyOrder
#boolean isInterCompanyOrder()
#{;
# return (this.InterCompanyOrder
# && this.InterCompanyCompanyId != ''
# && this.SkipUpdate != InterCompanySkipUpdate::InterCompany
# && this.SkipUpdate != InterCompanySkipUpdate::Both);
#}
ENDSOURCE
SOURCE #LastInvoice
#//BP Deviation documented
#client server
#display LastInvoiceId lastInvoice()
#{
# return (select firstonly InvoiceId from vendInvoicePurchLink
# index hint origPurchIdx
# order by InvoiceDate desc, InvoiceId desc
# where vendInvoicePurchLink.OrigPurchId == this.PurchId).InvoiceId;
#}
ENDSOURCE
SOURCE #LastInvoiceDate
#//BP Deviation documented
#client server
#display LastInvoiceDate lastInvoiceDate()
#{
# return (select maxof(InvoiceDate) from vendInvoicePurchLink
# index hint origPurchIdx
# where vendInvoicePurchLink.OrigPurchId == this.PurchId).InvoiceDate;
#}
ENDSOURCE
SOURCE #lastJournals
#server container lastJournals()
#{
# container c;
# ;
#
# c = conins(c, PurchTableType::posPurchaseOrder(), [this.lastPurchaseOrder(), this.lastPurchaseOrderDate()]);
# c = conins(c, PurchTableType::posReceiptsList(), [this.lastReceiptsList(), this.lastReceiptsListDate()]);
# c = conins(c, PurchTableType::posPackingSlip(), [this.lastPackingSlip(), this.lastPackingSlipDate()]);
# c = conins(c, PurchTableType::posInvoice(), [this.lastInvoice(), this.lastInvoiceDate()]);
#
# return c;
#}
ENDSOURCE
SOURCE #LastPackingSlip
#//BP Deviation documented
#client server
#display LastPackingSlipId lastPackingSlip()
#{
# return (select firstonly PackingSlipId from vendPackingSlipPurchLink
# index hint origPurchIdx
# order by DeliveryDate desc, PackingSlipId desc
# where vendPackingSlipPurchLink.OrigPurchId == this.PurchId).PackingSlipId;
#}
ENDSOURCE
SOURCE #LastPackingSlipDate
#//BP Deviation documented
#client server
#display LastPackingSlipDate lastPackingSlipDate()
#{
# return (select maxof(DeliveryDate) from vendPackingSlipPurchLink
# index hint origPurchIdx
# where vendPackingSlipPurchLink.OrigPurchId == this.PurchId).DeliveryDate;
#}
ENDSOURCE
SOURCE #LastPurchaseOrder
#//BP Deviation documented
#client server
#display LastPurchaseOrderId lastPurchaseOrder()
#{
# VendPurchOrderPurchLink vendPurchOrderPurchLink;
# VendPurchOrderJour vendPurchOrderJour;
# ;
# select firstonly TableId from vendPurchOrderPurchLink
# index hint origPurchIdx
# order by PurchOrderDate desc, PurchaseOrderId desc
# where vendPurchOrderPurchLink.OrigPurchId == this.PurchId
# join PurchOrderDocNum from vendPurchOrderJour
# where vendPurchOrderJour.PurchaseOrderId == vendPurchOrderPurchLink.PurchaseOrderId &&
# vendPurchOrderJour.PurchOrderDate == vendPurchOrderPurchLink.PurchOrderDate;
# return vendPurchOrderJour.PurchOrderDocNum;
#}
ENDSOURCE
SOURCE #LastPurchaseOrderDate
#//BP Deviation documented
#client server
#display LastPurchaseOrderDate lastPurchaseOrderDate()
#{
# return (select maxof(PurchOrderDate) from vendPurchOrderPurchLink
# index hint origPurchIdx
# where vendPurchOrderPurchLink.OrigPurchId == this.PurchId).PurchOrderDate;
#}
ENDSOURCE
SOURCE #lastReceiptsList
#//BP Deviation documented
#client server
#display LastReceiptsListId lastReceiptsList()
#{
# return (select firstonly ReceiptsListId from vendReceiptsListPurchLink
# index hint origPurchIdx
# order by ReceiptsListDate desc, ReceiptsListId desc
# where vendReceiptsListPurchLink.OrigPurchId == this.PurchId).ReceiptsListId;
#}
ENDSOURCE
SOURCE #lastReceiptsListDate
#//BP Deviation documented
#client server
#display LastReceiptsListDate lastReceiptsListDate()
#{
# return (select maxof(ReceiptsListDate) from vendReceiptsListPurchLink
# index hint origPurchIdx
# where vendReceiptsListPurchLink.OrigPurchId == this.PurchId).ReceiptsListDate;
#}
ENDSOURCE
SOURCE #mayInvoiceBeUpdated
#boolean mayInvoiceBeUpdated()
#{
# return this.type().mayInvoiceBeUpdated();
#}
ENDSOURCE
SOURCE #mayPackingslipBeUpdated
#boolean mayPackingSlipBeUpdated()
#{
# return this.type().mayPackingSlipBeUpdated();
#}
ENDSOURCE
SOURCE #mayPurchaseOrderBeUpdated
#boolean mayPurchaseOrderBeUpdated()
#{
# return this.type().mayPurchaseOrderBeUpdated();
#}
ENDSOURCE
SOURCE #mayReceiptsListBeUpdated
#boolean mayReceiptsListBeUpdated()
#{
# return this.type().mayReceiptsListBeUpdated();
#}
ENDSOURCE
SOURCE #modifiedField
#public void modifiedField(fieldId _fieldId)
#{
# ;
# super(_fieldId);
#
# switch (_fieldId)
# {
# case fieldnum(PurchTable, ContactPersonId):
# this.initFromContactInfo();
# break;
#
# case fieldnum(PurchTable, DeliveryZipCode):
# this.AddressMap::modifiedFieldZipCode();
# this.clearAddressReference();
# break;
#
# case fieldnum(PurchTable, DlvCounty):
# this.AddressMap::formatAddress();
# this.clearAddressReference();
# this.setListCode();
# break;
#
# case fieldnum(PurchTable, DlvCountryRegionId):
# this.AddressMap::formatAddress();
# this.clearAddressReference();
# this.setListCode();
# break;
#
# case fieldnum(PurchTable, DlvState):
# this.AddressMap::formatAddress();
# this.clearAddressReference();
# break;
#
# case fieldnum(PurchTable, DeliveryCity):
# this.AddressMap::formatAddress();
# this.clearAddressReference();
# break;
#
# case fieldnum(PurchTable, DeliveryStreet):
# this.AddressMap::formatAddress();
# this.clearAddressReference();
# break;
#
# case fieldnum(PurchTable, InventLocationId):
# this.InventStorageDimMap::modifiedField(fieldnum(InventStorageDimMap, InventLocationId));
# this.setAddressFromInventLocationId(this.InventLocationId);
# break;
#
# case fieldnum(PurchTable, InventSiteId):
# this.InventStorageDimMap::modifiedField(fieldnum(InventStorageDimMap, InventSiteId));
# this.setAddressFromInventSiteId(this.InventSiteId);
# break;
#
# case fieldnum(PurchTable, InterCompanyOrder):
# if (this.InterCompanyOrder)
# this.InterCompanyCompanyId = this.vendTable_OrderAccount().interCompanyCompanyId();
# else
# this.InterCompanyCompanyId = '';
# break;
#
# case fieldnum(PurchTable, InvoiceAccount):
# if (!this.existMarkedSettlement(_fieldId))
# this.transferInvoiceAccount();
# else
# this.reread();
# break;
#
# case fieldnum(PurchTable, MarkupGroup):
# this.modifieMarkupGroup();
# break;
#
# case fieldnum(PurchTable, OrderAccount):
# //
# if (LedgerParameters::find().EnableZakatReports_SA)
# {
# this.ContractNum_SA = '';
# }
# //
#
# if (!this.existMarkedSettlement(_fieldId))
# this.transferOrderAccount();
# else
# this.reread();
# break;
#
# case fieldnum(PurchTable, Payment):
# this.initFromPayment();
# break;
#
# case fieldnum(PurchTable, PaymMode):
# this.paymModeModified();
# break;
#
# case fieldnum(PurchTable, BankCentralBankPurposeCode):
# this.BankCentralBankPurposeText = BankCentralBankPurpose::find(this.BankCentralBankPurposeCode).Text;
# break;
#
# case fieldnum(PurchTable, Requisitioner):
# this.ReqAttention = EmplTable::find(this.Requisitioner).ReqAttention;
# break;
#
# case fieldnum(PurchTable, ProjId):
# if(this.ProjId)
# this.initFromProjInvoiceTable();
# break;
# // Israel-Localisation-Prodware-ImportFolder-Begin
# case fieldnum(PurchTable, BPLRequestedDlvDate):
# case fieldnum(PurchTable, BPLVendorConfirmedDlvDate):
# this.BPLmodifyDeliveryDates(_fieldId);
# break;
# // Israel-Localisation-Prodware-ImportFolder-End
#
# default:
# break;
# }
#}
#
ENDSOURCE
SOURCE #modifiedInventSiteFromParent
#public void modifiedInventSiteFromParent()
#{
# this.InventStorageDimMap::modifiedInventSiteFromParent(this);
#}
ENDSOURCE
SOURCE #ModifieMarkupGroup
#server void modifieMarkupGroup()
#{
# PurchLine purchLine;
# ;
# while select purchLine
# index hint PurchLineIdx
# where purchLine.PurchId == this.PurchId
# {
# purchLine.createMarkupTrans(this);
# }
#}
ENDSOURCE
SOURCE #ModuleType
#ModuleInventPurchSales moduleType()
#{
# return ModuleInventPurchSales::Purch;
#}
ENDSOURCE
SOURCE #MustBeCovPlanned
#boolean mustBeCovPlanned()
#{
# PurchTableType purchTableType;
# ;
#
# purchTableType = this.type();
# return purchTableType.mustBeCovPlanned();
#}
ENDSOURCE
SOURCE #Payer
#VendTable payer(boolean update = false)
#{
# return this.vendTable_InvoiceAccount(update);
#}
#
ENDSOURCE
SOURCE #paymDayId
#VendPaymDayId paymDayId()
#{
# VendPaymDayId paymDayId;
# ;
# paymDayId = this.vendTable_InvoiceAccount().PaymDayId;
#
# if (!paymDayId)
# paymDayId = this.payment().PaymDayId;
#
# return paymDayId;
#}
ENDSOURCE
SOURCE #payment
#PaymTerm payment(boolean _update = false)
#{
# return PaymTerm::find(this.Payment, _update);
#}
ENDSOURCE
SOURCE #paymModeModified
#void paymModeModified()
#{
# this.PaymModeMap::modifiedPaymMode();
#}
#
ENDSOURCE
SOURCE #projCostControlUpdate
#public void projCostControlUpdate(PurchLine _purchLine,ProjCommittedCostUpdateAction _action=ProjCommittedCostUpdateAction::Unknown)
#{
#
# InventMov_Purch movement;
# InventMov_Virtuel movement_Virtuel;
# CostControlPostingItemPurchOrder costControlPostingItemPurchOrder;
# ;
# movement=InventMovement::construct(_purchLine);
# movement_Virtuel=new InventMov_Virtuel(null);
# movement_Virtuel.parmInventMovReference(movement);
#
# if (movement_Virtuel.mustBeCostControlled() && movement_Virtuel.canCommittedCostBeReversed())
# {
# costControlPostingItemPurchOrder=CostControlPosting::newCostControlPostingItem(movement_Virtuel);
# costControlPostingItemPurchOrder.run(_action);
# }
#}
ENDSOURCE
SOURCE #projTable
#ProjTable projTable(boolean update = false)
#{
# return ProjTable::find(this.ProjId, update);
#}
ENDSOURCE
SOURCE #purchIdBlanket
#//BP Deviation documented
#display PurchIdBlanket purchIdBlanket()
#{
# return PurchTableLinks::find(this.PurchId).MainPurchId;
#}
ENDSOURCE
SOURCE #qualityOrderStatusDisplay
#///
#/// Retrieves and returns the associated qualtiy orders's status.
#///
#///
#/// Current quality order status.
#///
#
#//BP deviation documented
#display InventTestOrderStatusDisplay qualityOrderStatusDisplay()
#{
# ;
# return InventQualityOrderType::newBuffer(this).orderStatusDisplay();
#}
#
ENDSOURCE
SOURCE #queryPurchLine
#Query queryPurchLine(boolean _update = false)
#{
# DictRelation dictRelation;
# DictField externdictField;
# DictField dictField;
# Query query = new Query();
# Counter c;
# ;
#
# query.addDataSource(tablenum(PurchLine));
#
# dictRelation = new DictRelation(tablenum(PurchLine));
# dictRelation.loadTableRelation(this.TableId);
#
#
# if (dictRelation.lines())
# {
# for (c=1; c <= dictRelation.lines(); c++)
# {
# externdictField = new DictField(this.TableId,dictRelation.lineExternTableValue(c));
# dictField = new DictField(tablenum(PurchLine),dictRelation.lineTableValue(c));
# query.dataSourceTable(tablenum(PurchLine)).addRange(dictField.id()).value(queryValue(this.(externdictField.id())));
# }
# }
# query.dataSourceTable(tablenum(PurchLine)).update(_update);
#
# return query;
#}
#
ENDSOURCE
SOURCE #releaseOrderExists
#boolean releaseOrderExists()
#{
# PurchTableLinks purchTableLinks;
# ;
# if (this.PurchaseType != PurchaseType::Blanket)
# return false;
#
# select firstonly purchTableLinks
# where purchTableLinks.MainPurchId == this.PurchId;
#
# if (purchTableLinks)
# return true;
# return false;
#}
ENDSOURCE
SOURCE #setAddress
#void setAddress(Address address)
#{
# TaxGroup localTaxGroup;
# ;
#
# if (address.Name)
# this.DeliveryName = address.Name;
#
# this.DeliveryAddress = address.Address;
# this.DeliveryZipCode = address.ZipCode;
# this.DlvCountryRegionId = address.CountryRegionId;
# this.DlvState = address.State;
# this.DlvCounty = address.County;
# this.DeliveryStreet = address.Street;
# this.DeliveryCity = address.City;
# this.AddressRefRecId = address.RecId;
# this.AddressRefTableId = address.TableId;
#
# this.setListCode();
# localTaxGroup = TaxSales::custTaxGroup(this.DlvTerm, this.TaxGroup, address);
# if(localTaxGroup)
# {
# this.setTaxGroup(localTaxGroup);
# }
#
#}
ENDSOURCE
SOURCE #setAddressFromInventLocationId
#boolean setAddressFromInventLocationId(InventLocationId _inventLocationId)
#{
# Address inventLocationAddress;
# InventLocation inventLocation;
# boolean addressSet;
# ;
#
# addressSet = false;
#
# if (_inventLocationId
# && !this.InterCompanyDirectDelivery)
# {
# inventLocation = InventLocation::find(_inventLocationId);
# inventLocationAddress = Address::find(tablenum(InventLocation), inventLocation.RecId, AddressType::Delivery);
#
# if (inventLocationAddress)
# {
# this.setAddress(inventLocationAddress);
# addressSet = true;
# }
#
# else if(inventLocation.VendAccount)
# {
# this.setAddressFromVendTable(VendTable::find(inventLocation.VendAccount));
# addressSet = true;
# }
# }
#
# if(!addressSet)
# {
# addressSet = this.setAddressFromInventSiteId(this.InventSiteId);
# }
#
#
# return addressSet;
#}
ENDSOURCE
SOURCE #setAddressFromInventSiteId
#boolean setAddressFromInventSiteId(InventSiteId _inventSiteId)
#{
# Address address;
# InventSite inventSite;
# boolean addressSet = false;
# CompanyInfo companyInfo;
# ;
#
# if (_inventSiteId
# && !this.InterCompanyDirectDelivery)
# {
# inventSite = InventSite::find(_inventSiteId);
# address = Address::find(tablenum(InventSite), inventSite.RecId, AddressType::Delivery);
#
# if (address.RecId)
# {
# this.setAddress(address);
# addressSet = true;
# }
# }
#
# if(!addressSet)
# {
# companyInfo = CompanyInfo::find();
# address = Address::find(tablenum(CompanyInfo), companyInfo.RecId, AddressType::Delivery);
# if (address.RecId)
# {
# this.setAddress(address);
# addressSet = true;
# }
# }
#
# return addressSet;
#}
ENDSOURCE
SOURCE #setAddressFromVendTable
#void setAddressFromVendTable(VendTable _vendTable)
#{;
# this.DeliveryName = _vendTable.Name;
# this.DeliveryAddress = _vendTable.Address;
# this.DeliveryZipCode = _vendTable.ZipCode;
# this.DlvCountryRegionId = _vendTable.CountryRegionId;
# this.DlvState = _vendTable.State;
# this.DlvCounty = _vendTable.County;
# this.DeliveryStreet = _vendTable.Street;
# this.DeliveryCity = _vendTable.City;
# this.AddressRefRecId = _vendTable.RecId;
# this.AddressRefTableId = _vendTable.TableId;
#}
ENDSOURCE
SOURCE #setInventSiteId
#public void setInventSiteId(InventSiteId _inventSiteId)
#{;
# if (this.inventSiteActive())
# {
# this.InventSiteId = _inventSiteId;
# this.modifiedInventSiteFromParent();
# this.setAddressFromInventSiteId(_inventSiteId);
# }
#}
ENDSOURCE
SOURCE #setListCode
#void setListCode()
#{
# this.Listcode = EUSalesList::resolveListCode(this.vendTable_OrderAccount().CountryRegionId, this.payer().CountryRegionId);
#}
ENDSOURCE
SOURCE #setTaxGroup
#void setTaxGroup(TaxGroup _taxGroup)
#{
# PurchTableType purchTableType;
# ;
# purchTableType = this.type();
# purchTableType.setTaxGroup(_taxGroup);
#}
#
ENDSOURCE
SOURCE #skipAddressFields
#///
#/// Indicates if address fields should be skiped.
#///
#///
#/// true if address field sholud be skiped: otherwise false.
#///
#boolean skipAddressFields()
#{
# ;
# return ((this.InterCompanyCompanyId && this.InterCompanyOriginalSalesId && this.InterCompanyDirectDelivery)
# || this.isDirectDeliveryOrder());
#}
ENDSOURCE
SOURCE #taxModuleType
#TaxModuleType taxModuleType()
#{
# return TaxModuleType::Purch;
#}
#
ENDSOURCE
SOURCE #TransferInvoiceAccount
#void transferInvoiceAccount()
#{
# if (PurchParameters::find().PromptTransfer)
# {
# if (Box::yesNo("@SYS19435" + '\n\n' + this.InvoiceAccount+'\n\n'+VendTable::promptAddress(this.InvoiceAccount), DialogButton::Yes) == DialogButton::Yes)
# this.initInvoiceAccount();
# }
# else
# this.initInvoiceAccount();
#}
ENDSOURCE
SOURCE #TransferOrderAccount
#client server
#public void transferOrderAccount()
#{
# if (this.OrderAccount)
# {
# if (PurchParameters::find().PromptTransfer)
# {
# if (Box::yesNo("@SYS22099"+'\n\n'+VendTable::promptAddress(this.OrderAccount),DialogButton::Yes)==DialogButton::Yes)
# {
# this.initFromVendTable();
# if (this.OrderAccount != this.InvoiceAccount)
# this.transferInvoiceAccount();
# }
# else
# {
# this.initFromVendTableMandatoryFields();
# if (!this.RecId || !this.isDirectDeliveryOrder())
# {
# this.initDefaultAddress();
# }
# }
# }
# else
# {
# this.initFromVendTable();
# if (this.OrderAccount != this.InvoiceAccount)
# this.transferInvoiceAccount();
# }
# }
#}
ENDSOURCE
SOURCE #Type
#PurchTableType type()
#{
# return PurchTableType::construct(this);
#}
ENDSOURCE
SOURCE #Update
#public void update()
#{
# PurchTableType purchTableType;
# ;
# purchTableType = this.type();
# purchTableType.update();
#}
ENDSOURCE
SOURCE #UpdateBackStatus
#void updateBackStatus()
#{
# PurchTableType purchTableType;
# ;
#
# purchTableType = this.type();
# purchTableType.updateBackStatus();
#}
ENDSOURCE
SOURCE #UpdateDocumentStatus
#void updateDocumentStatus(DocumentStatus documentStatus)
#{
# PurchTableType purchTableType;
# ;
#
# purchTableType = this.type();
# purchTableType.updateDocumentStatus(documentStatus);
#}
ENDSOURCE
SOURCE #UpdateFinalDisc
#server void updateFinalDisc()
#{
# PurchLine purchLine;
# ;
#
# this.PriceDiscHeading::updateFinalDisc(purchLine);
#}
ENDSOURCE
SOURCE #UpdateLedgerCov
#void updateLedgerCov()
#{
# PurchTableType purchTableType;
# ;
#
# purchTableType = this.type();
# purchTableType.updateLedgerCov();
#}
ENDSOURCE
SOURCE #UpdateMultiLineDisc
#server void updateMultiLineDisc()
#{
# PurchLine purchLine;
# ;
#
# this.PriceDiscHeading::updateMultiLineDisc(purchLine);
#}
ENDSOURCE
SOURCE #updatePurchaseType
#void updatePurchaseType()
#{
# PurchTableType purchTableType;
# ;
#
# purchTableType = this.type();
# purchTableType.updatePurchaseType();
#}
ENDSOURCE
SOURCE #ValidateDelete
#public boolean validateDelete()
#{
# boolean ok = true;
# PurchTableType purchTableType;
# ;
#
# ok = super();
#
# if (ok)
# {
# purchTableType = this.type();
# ok = purchTableType.validateDelete();
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #validateField
#boolean validateField(fieldId fieldId)
#{
# boolean ok;
# PurchTableType purchTableType;
# ;
#
# if(!this.AddressMap::validatePostalCode(fieldId))
# {
# return false;
# }
#
# ok = super(fieldId);
#
# if (ok)
# {
# purchTableType = this.type();
# ok = purchTableType.validateField(fieldId);
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #ValidateWrite
#boolean validateWrite()
#{
# boolean ok = true;
# PurchTableType purchTableType;
# ;
#
# ok = super();
#
# if (ok)
# {
# setprefix(strfmt("@SYS25974", this.PurchId));
#
# purchTableType = this.type();
# ok = purchTableType.validateWrite();
# }
#
# if (ok)
# {
# ok = appl.dimensionSetValidation().checkDimension(this, fieldnum(PurchTable, Dimension), true);
# }
#
# return ok;
#}
#
ENDSOURCE
SOURCE #VendorAddress
#//BP Deviation documented
#display Addressing vendorAddress()
#{
# return this.vendTable_OrderAccount().Address;
#}
#
ENDSOURCE
SOURCE #vendorEmail
#//BP Deviation documented
#display Email vendorEmail()
#{
# return this.vendTable_OrderAccount().Email;
#}
ENDSOURCE
SOURCE #VendorName
#//BP Deviation documented
#display VendName vendorName()
#{
# return this.vendTable_OrderAccount().Name;
#}
#
ENDSOURCE
SOURCE #vendorPhone
#//BP Deviation documented
#display VendPhone vendorPhone()
#{
# return this.vendTable_OrderAccount().Phone;
#}
ENDSOURCE
SOURCE #vendTable_InvoiceAccount
#VendTable vendTable_InvoiceAccount(boolean update = false)
#{
# return VendTable::find(this.InvoiceAccount, update);
#}
ENDSOURCE
SOURCE #vendTable_OrderAccount
#VendTable vendTable_OrderAccount(boolean update = false)
#{
# return VendTable::find(this.OrderAccount, update);
#}
ENDSOURCE
SOURCE #balanceAmountDelivered
#server static AmountMST balanceAmountDelivered(VendAccount _invoiceAccount,
# PurchId _excludePurchId = '')
#{
# PurchTable purchTable;
# PurchTotals purchTotals;
# AmountMST amountMST;
#
# while select purchTable
# where purchTable.InvoiceAccount == _invoiceAccount &&
# (purchTable.PurchStatus == PurchStatus::None ||
# purchTable.PurchStatus == PurchStatus::Backorder ||
# purchTable.PurchStatus == PurchStatus::Received) &&
# purchTable.PurchaseType != PurchaseType::Journal &&
# purchTable.PurchaseType != PurchaseType::Blanket &&
# purchTable.PurchId != _excludePurchId
# {
# purchTotals = PurchTotals::newPurchTable(purchTable, PurchUpdate::PackingSlip);
# purchTotals.calc();
# amountMST += Currency::mstAmount(purchTotals.purchTotalAmount(),purchTable.CurrencyCode);
# }
#
# return amountMST;
#}
#
ENDSOURCE
SOURCE #balanceAmountNotInvoiced
#server static AmountMST balanceAmountNotInvoiced(VendAccount _invoiceAccount,
# PurchId _excludePurchId = '')
#{
# PurchTable purchTable;
# PurchTotals purchTotals;
# AmountMST amountMST;
# ;
#
# while select purchTable
# where purchTable.InvoiceAccount == _invoiceAccount &&
# (purchTable.PurchStatus == PurchStatus::None ||
# purchTable.PurchStatus == PurchStatus::Backorder ||
# purchTable.PurchStatus == PurchStatus::Received) &&
# purchTable.PurchaseType != PurchaseType::Journal &&
# purchTable.PurchaseType != PurchaseType::Blanket &&
# purchTable.PurchId != _excludePurchId
# {
# purchTotals = PurchTotals::newPurchTable(purchTable, PurchUpdate::All);
# purchTotals.calc();
# amountMST += Currency::mstAmount(purchTotals.purchTotalAmount(),purchTable.CurrencyCode);
# }
#
# return amountMST;
#}
#
ENDSOURCE
SOURCE #checkExist
#static boolean checkExist(PurchId purchId)
#{
# if (purchId && !PurchTable::exist(purchId))
# return checkFailed(strfmt(PurchTable::txtNotExist(),purchId));
#
# return true;
#}
ENDSOURCE
SOURCE #exist
#static boolean exist(PurchId purchId)
#{
# return (select firstonly RecId from purchTable
# index hint PurchIdx
# where purchTable.PurchId == purchId
# ).RecId != 0;
#}
ENDSOURCE
SOURCE #existVendOpenOrder
#static boolean existVendOpenOrder(VendAccount vendAccount)
#{
# PurchTable purchTable;
# ;
#
# return (select firstonly RecId from purchTable
# index hint VendIdx
# where purchTable.OrderAccount == vendAccount &&
# (purchTable.PurchStatus == PurchStatus::None ||
# purchTable.PurchStatus == PurchStatus::Backorder ||
# purchTable.PurchStatus == PurchStatus::Received)).RecId != 0;
#
#}
ENDSOURCE
SOURCE #find
#static PurchTable find(PurchId purchId,
# boolean _forUpdate = false,
# ConcurrencyModel _concurrencyModel = ConcurrencyModel::Auto)
#{
# PurchTable purchTable;
# ;
#
# if (purchId)
# {
# if (_forUpdate)
# {
# purchTable.selectForUpdate (_forUpdate);
# if (_concurrencyModel != ConcurrencyModel::Auto)
# purchTable.concurrencyModel(_concurrencyModel);
# }
# purchTable.selectLocked (_forUpdate);
#
# select firstonly purchTable
# index hint PurchIdx
# where purchTable.PurchId == purchId;
# }
#
# return purchTable;
#}
ENDSOURCE
SOURCE #findRecId
#static PurchTable findRecId(recId _recId,
# boolean _forUpdate = false)
#{
# PurchTable purchTable;
# ;
#
# purchTable.selectForUpdate(_forUpdate);
#
# select purchTable
# where purchTable.RecId == _recId;
#
# return purchTable;
#}
ENDSOURCE
SOURCE #getCurrentemployee
#public static EmplId getCurrentemployee()
#{
# ;
# return SysCompanyUserInfo::current().EmplId;
#}
#
ENDSOURCE
SOURCE #jumpRefPurchIdBlanket
#static void jumpRefPurchIdBlanket(PurchIdBlanket _purchIdBlanket)
#{
# PurchTableLinks purchTableLinks;
# Args args;
# FormRun formRun;
# ;
#
# purchTableLinks = PurchTableLinks::subPurchTableLink(_purchIdBlanket);
#
# args = new Args(formstr(PurchTable));
# args.record(purchTableLinks);
# formRun = classfactory.formRunClass(args);
# formRun.init();
# formRun.run();
# formRun.detach();
#
#}
ENDSOURCE
SOURCE #lookupDeliveryAccount
#client static void lookupDeliveryAccount(FormStringControl ctrl,
# VendInvoiceAccount invoiceAccount)
#{
# Args args;
# Object formRun;
# ;
#
# args = new Args();
# args.name(formstr(PurchDeliveryAccountLookup));
#
# formRun = classfactory.formRunClass(args);
# formRun.invoiceAccount(invoiceAccount);
# formRun.init();
#
# ctrl.performFormLookup(formRun);
#}
ENDSOURCE
SOURCE #lookupWMSReception
#static void lookupWMSReception(FormStringControl ctrl, VendAccount vendAccount)
#{
# SysTableLookup sysTableLookup = SysTableLookup::newParameters(tablenum(PurchTable), ctrl);
# Query query = new Query();
# QueryBuildDataSource queryBuildDataSource;
# QueryBuildRange queryBuildRange;
# ;
# sysTableLookup.addLookupfield(fieldnum(PurchTable, PurchId));
# sysTableLookup.addLookupfield(fieldnum(PurchTable, PurchName));
# sysTableLookup.addLookupfield(fieldnum(PurchTable, OrderAccount));
#
# queryBuildDataSource = query.addDataSource(tablenum(PurchTable));
#
# if (vendAccount)
# {
# queryBuildRange = queryBuildDataSource.addRange(fieldnum(PurchTable, OrderAccount));
# queryBuildRange.value(queryValue(vendAccount));
# }
# queryBuildRange = queryBuildDataSource.addRange(fieldnum(PurchTable, PurchStatus));
# queryBuildRange.value(enum2Value(PurchStatus::Backorder));
#
# // Filter out Blanket and Journal PO
# queryBuildRange = queryBuildDataSource.addRange(fieldnum(PurchTable, PurchaseType));
# queryBuildRange.value(strfmt('(%1 != %2) && (%1 != %3)',
# fieldstr(PurchTable, PurchaseType),
# int2str(PurchaseType::Blanket),
# int2str(PurchaseType::Journal)));
#
# queryBuildDataSource.addSortField(fieldnum(PurchTable, PurchId));
#
# sysTableLookup.parmQuery(query);
# sysTableLookup.performFormLookup();
#}
ENDSOURCE
SOURCE #promptConvertCurrencyCode
#client static container promptConvertCurrencyCode()
#{
# Dialog dialog;
# DialogField dialogField;
# DialogButton dialogButton;
# ;
# if (!isConfigurationkeyEnabled(configurationkeynum(PriceDisc)))
# {
# dialogButton = Box::okCancel("@SYS79467", DialogButton::Ok);
# if (dialogButton == DialogButton::Ok)
# return [NoYes::Yes, TradeCurencyConversion::ExchRate];
#
# return [NoYes::No, TradeCurencyConversion::ExchRate];
# }
#
# dialog = new Dialog("@SYS79467");
# dialog.addText("@SYS79467");
# dialogField = dialog.addField(typeid(TradeCurencyConversion));
# if (dialog.run())
# return [NoYes::Yes, dialogField.value()];
#
# return [NoYes::No, TradeCurencyConversion::ExchRate];
#}
#
ENDSOURCE
SOURCE #promptCopyDeliveryAddress
#client static DialogButton promptCopyDeliveryAddress()
#{;
# return Box::yesYesAllNoCancel("@SYS89799", DialogButton::Yes);
#}
ENDSOURCE
SOURCE #txtNotExist
#static TxtNotExist txtNotExist()
#{
# return "@SYS15741";
#}
ENDSOURCE
SOURCE #vendOpenOrders
#static PurchTable vendOpenOrders(VendAccount vendAccount, boolean update = false)
#{
# PurchTable purchTable;
# ;
#
# purchTable.selectForUpdate (update);
#
# select purchTable
# index hint VendIdx
# where purchTable.OrderAccount == vendAccount &&
# (purchTable.PurchStatus == PurchStatus::None ||
# purchTable.PurchStatus == PurchStatus::Backorder ||
# purchTable.PurchStatus == PurchStatus::Received);
#
# return purchTable;
#}
ENDSOURCE
ENDMETHODS
ENDTABLE
en-us
Purchase orders
Translation should be in multiple
@SYS25204
0
0
he
הזמנות רכש
Translation should be in multiple
@SYS25204
0
0
en-us
The PurchTable table contains all purchase order headers regardless whether they have been posted or not.
{locked}
@SYS124480
0
0
he
The PurchTable table contains all purchase order headers regardless whether they have been posted or not.
{locked}
@SYS124480
0
0
en-us
Vendor with whom the purchase order is placed.
@SYS2496
0
0
he
הספק שאליו הועברה הזמנת הרכש.
@SYS2496
0
0
en-us
Vendor invoicing the purchase
@SYS3548
0
0
he
הספק המפיק חשבונית עבור הרכישה
@SYS3548
0
0
en-us
Purchase delivery date
@SYS2261
0
0
he
תאריך המסירה של רכישה
@SYS2261
0
0
en-us
Currency the purchase is invoiced in.
@SYS5717
0
0
he
המטבע שבו חויבה החשבונית.
@SYS5717
0
0
en-us
Payment
@SYS828
0
0
he
תשלום
@SYS828
0
0
en-us
Terms of payment for the received invoice
@SYS13766
0
0
he
תנאי התשלום עבור החשבונית שהתקבלה
@SYS13766
0
0
en-us
Code for cash discount on invoice received
@SYS5825
0
0
he
התקבל קוד עבור הנחת מזומן בחשבונית
@SYS5825
0
0
en-us
Orderer
@SYS21867
0
0
he
מזמין
@SYS21867
0
0
en-us
Employee who 'ordered' the lines.
@SYS15278
0
0
he
העובד ש'הזמין' את השורות.
@SYS15278
0
0
en-us
Vendor group that the purchase is attached to.
@SYS17188
0
0
he
קבוצת הספקים שאליה מצורפת הרכישה.
@SYS17188
0
0
en-us
Determines vendor/purchase line-discount group
@SYS2174
0
0
he
קובע את קבוצת הנחת השורה של ספק/רכישה
@SYS2174
0
0
en-us
Delivery address
@SYS7924
0
0
he
כתובת משלוח
@SYS7924
0
0
en-us
Address where the items are to be delivered.
@SYS27762
0
0
he
כתובת שאליה על הפריטים להישלח.
@SYS27762
0
0
en-us
Sales tax group for calculation of sales tax on purchase
Tax = Sales tax (VAT)
@SYS27938
0
0
he
קבוצת מע"מ עבור חישוב מע"מ על רכישה
Tax = Sales tax (VAT)
@SYS27938
0
0
en-us
Specify terms of delivery for current purchase.
@SYS13640
0
0
he
ציין תנאי מסירה עבור הרכישה הנוכחית.
@SYS13640
0
0
en-us
Specify delivery mode for current purchase
@SYS12294
0
0
he
ציין מצב מסירה עבור הרכישה הנוכחית
@SYS12294
0
0
en-us
Misc. charges group attached to the purchase
@SYS9643
0
0
he
קבוצת החיובים השונים המצורפת לרכישה
@SYS9643
0
0
en-us
ZIP/postal Code for delivery of the current purchase
@SYS17896
0
0
he
מיקוד עבור מסירת הרכישה הנוכחית
@SYS17896
0
0
en-us
Country/region to be delivered to
@SYS17899
0
0
he
מדינה/אזור שבהם יש לבצע את המסירה
@SYS17899
0
0
en-us
State to deliver to
@SYS27941
0
0
he
מדינה שאליה יש לבצע את המשלוח
@SYS27941
0
0
en-us
Delivery name
@SYS22058
0
0
he
שם משלוח
@SYS22058
0
0
en-us
Name or company name of delivery address.
@SYS17217
0
0
he
שם או שם החברה של כתובת המסירה.
@SYS17217
0
0
en-us
Name
@SYS7399
0
0
he
שם
@SYS7399
0
0
en-us
Language used in item names and for printing external journals
@SYS8305
0
0
he
השפה המשמשת בשמות פריטים ולהדפסת יומנים חיצוניים
@SYS8305
0
0
en-us
Summary update parameters
@SYS57738
0
0
he
פרמטרי עדכון סיכום
@SYS57738
0
0
en-us
Print management
@SYS54502
0
0
he
ניהול הדפסה
@SYS54502
0
0
en-us
Default classification of invoices for the vendor.
@SYS126905
0
0
he
סיווג ברירת המחדל של חשבוניות עבור הספק.
@SYS126905
0
0
en-us
Address
@SYS9362
0
0
he
כתובת
@SYS9362
0
0
en-us
Address selection
@SYS88672
0
0
he
בחירת כתובת
@SYS88672
0
0
en-us
Address Reference
@SYS88679
0
0
he
הפניית כתובת
@SYS88679
0
0
en-us
Administration
@SYS9853
0
0
he
ניהול
@SYS9853
0
0
en-us
Attention
@SYS1593
0
0
he
שים לב
@SYS1593
0
0
en-us
BUS fields Israel
@BPL141
0
0
he
שדות ישראל BUS
@BPL141
0
0
en-us
Contact information
This is the name of a field group or other.
@SYS21663
0
0
he
פרטי קשר
This is the name of a field group or other.
@SYS21663
0
0
en-us
Contracts
@SYS73302
0
0
he
חוזים
@SYS73302
0
0
en-us
Currency
@SYS7572
0
0
he
מטבע
@SYS7572
0
0
en-us
Delivery
@SYS4508
0
0
he
משלוח
@SYS4508
0
0
en-us
Dimensions
@SYS5951
0
0
he
ממדים
@SYS5951
0
0
en-us
Discount
@SYS11829
0
0
he
הנחה
@SYS11829
0
0
en-us
Discount/Misc. charges
@SYS22031
0
0
he
הנחה/חיובים שונים
@SYS22031
0
0
en-us
External reference
@SYS21697
0
0
he
אסמכתא חיצונית
@SYS21697
0
0
en-us
Foreign trade
@SYS27650
0
0
he
סחר חוץ
@SYS27650
0
0
en-us
Header of line update
@SYS62436
0
0
he
כותרת של עדכון שורה
@SYS62436
0
0
en-us
Identification
@SYS5711
0
0
he
זיהוי
@SYS5711
0
0
en-us
Intercompany sales order
Intercompany
@SYS93837
0
0
he
הזמנת מכירה בין-חברתית
Intercompany
@SYS93837
0
0
en-us
Original sales order
Intercompany
@SYS93838
0
0
he
הזמנת מכירה מקורית
Intercompany
@SYS93838
0
0
en-us
Original return order
Intercompany
@SYS120343
0
0
he
הזמנת החזרה מקורית
Intercompany
@SYS120343
0
0
en-us
Inventory
@SYS981
0
0
he
מלאי
@SYS981
0
0
en-us
Vendor invoice declaration
@SYS126906
0
0
he
הצהרת חשבונית ספק
@SYS126906
0
0
en-us
Notification to the central bank
@SYS67156
0
0
he
דוח לבנק המרכזי
@SYS67156
0
0
en-us
Posting
@SYS5943
0
0
he
רישום
@SYS5943
0
0
en-us
Project
@SYS4534
0
0
he
פרוייקט
@SYS4534
0
0
en-us
Purchase table
@SYS1653
0
0
he
טבלת רכישות
@SYS1653
0
0
en-us
Requisitioner
@SYS108788
0
0
he
דורש רכש
@SYS108788
0
0
en-us
Sales tax
Tax = Sales tax
@SYS5878
0
0
he
מע"מ
Tax = Sales tax
@SYS5878
0
0
en-us
Status
For Forms/tutorial_WebServicesDemo
@SYS25587
0
0
he
מצב
For Forms/tutorial_WebServicesDemo
@SYS25587
0
0
en-us
Summary purchase
@SYS24162
0
0
he
רכישת סיכום
@SYS24162
0
0
en-us
Summary update
@SYS57755
0
0
he
עדכון סיכום
@SYS57755
0
0
en-us
Transport
@SYS3843
0
0
he
הובלה
@SYS3843
0
0
en-us
Vendor
@SYS9455
0
0
he
ספק
@SYS9455
0
0
en-us
Category browsing
Web category browsed in, i.e. customer group, currency, etc.
@SYS74258
0
0
he
עיון בקטגוריה
Web category browsed in, i.e. customer group, currency, etc.
@SYS74258
0
0
en-us
Purchase order %1 : Delivery dates are not correct.
@BPL78
0
0
he
הזמנת רכש %1 -: תאריכי אספקה שגויים.
@BPL78
0
0
en-us
Vendor %1 is stopped.
@SYS1138
0
0
he
ספק %1 הופסק.
@SYS1138
0
0
en-us
Cash supplier cannot have payment schedule.
@SYS28733
0
0
he
אין אפשרות ליצור לספק במזומן לוח זמנים לתשלום.
@SYS28733
0
0
en-us
Currency code cannot be changed when order lines have been entered.
@SYS15290
0
0
he
לא ניתן לשנות את קוד המטבע לאחר שהוזנו שורות ההזמנה.
@SYS15290
0
0
en-us
Currency code may not be changed once misc. charges have been entered.
@SYS24528
0
0
he
לא ניתן לשנות את קוד המטבע לאחר שהוזנו חיובים שונים.
@SYS24528
0
0
en-us
You cannot specify a payment schedule together with a fixed due date.
@SYS69828
0
0
he
אין באפשרותך לציין לוח זמנים לתשלום יחד עם תאריך פירעון קבוע.
@SYS69828
0
0
en-us
Update fully invoiced purchase order.
@SYS27044
0
0
he
עדכן הזמנת רכש שחויבה במלואה.
@SYS27044
0
0
en-us
Safety level on the attached intercompany order(s) prevents modification of this order
Intercompany
@SYS106306
0
0
he
רמת הבטיחות בהזמנות הבין-חברתיות המצורפות מונעת שינויים בהזמנה
Intercompany
@SYS106306
0
0
en-us
Clear the selection of the settled vendor transactions before you change the vendor account.
@SYS99930
0
0
he
נקה את הבחירה של תנועות הספק המיוחסות לפני שינוי חשבון הספק.
@SYS99930
0
0
en-us
Clear the selection of the settled vendor transactions before you change the invoice account.
@SYS100000
0
0
he
נקה את הבחירה של תנועות הספק המיוחסות לפני שינוי חשבון החשבונית.
@SYS100000
0
0
en-us
New lines cannot be added because of the setup on the original sales order.
Intercompany
@SYS95179
0
0
he
אין אפשרות להוסיף שורות חדשות עקב הכיוונון שבהזמנת המכירה המקורית.
Intercompany
@SYS95179
0
0
en-us
Currency code cannot be changed on intercompany order when transactions exist
Intercompany
@SYS105402
0
0
he
אין אפשרות לשנות קוד מטבע בהזמנה בין-חברתית כאשר תנועות קיימות
Intercompany
@SYS105402
0
0
en-us
Transfer terms of payment from invoice account?
@SYS19435
0
0
he
האם להעביר את תנאי התשלום מחשבון החשבוניות?
@SYS19435
0
0
en-us
Transfer vendor information?
@SYS22099
0
0
he
האם להעביר מידע אודות הספק?
@SYS22099
0
0
en-us
Update of purchase order %1 canceled
@SYS25974
0
0
he
עדכון הזמנת רכש %1 בוטל
@SYS25974
0
0
en-us
Currency code has been changed. Purchase order lines and misc. charges will be recalculated.
See also @SYS54755
@SYS79467
0
0
he
קוד המטבע השתנה. שורות הזמנות רכש וחיובים שונים יחושבו מחדש.
See also @SYS54755
@SYS79467
0
0
en-us
Update delivery address on purchase lines where address matches the old header address ('Yes') or update all lines ('Yes to all')?
@SYS89799
0
0
he
האם לעדכן כתובת מסירה בשורות רכש שבהן הכתובת תואמת לכתובת הכותרת הישנה ('כן') או לעדכן את כל השורות ('כן לכל')?
@SYS89799
0
0
en-us
Purchase %1 does not exist.
@SYS15741
0
0
he
רכישה %1 אינה קיימת.
@SYS15741
0
0
***Element: DBT
; Microsoft Dynamics AX Table : InventTableModule unloaded
; --------------------------------------------------------------------------------
TABLEVERSION 1
TABLE #InventTableModule
Id 176
PROPERTIES
Name #InventTableModule
Label #@SYS27987
FormRef #InventTable
TitleField1 #ItemId
TitleField2 #ModuleType
ConfigurationKey #LogisticsBasic
SecurityKey #InventTables
CacheLookup #Found
TableGroup #Main
PrimaryIndex #ItemModuleIdx
ClusterIndex #ItemModuleIdx
DeveloperDocumentation #@SYS123848
ENDPROPERTIES
FIELDS
FIELD #ItemId
Id 1
STRING
PROPERTIES
Name #ItemId
HelpText #@SYS20817
Mandatory #Yes
Table #InventTableModule
ExtendedDataType
ARRAY
#ItemId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #ModuleType
Id 2
ENUM
PROPERTIES
Name #ModuleType
HelpText #@SYS10404
Table #InventTableModule
EnumType #ModuleInventPurchSales
ENDPROPERTIES
FIELD #UnitId
Id 3
STRING
PROPERTIES
Name #UnitId
HelpText #@SYS14532
Table #InventTableModule
ExtendedDataType
ARRAY
#UnitID
#
ENDARRAY
ENDPROPERTIES
FIELD #Price
Id 4
REAL
PROPERTIES
Name #Price
HelpText #@SYS25618
Table #InventTableModule
ExtendedDataType
ARRAY
#Price
#
ENDARRAY
ENDPROPERTIES
FIELD #PriceUnit
Id 5
REAL
PROPERTIES
Name #PriceUnit
Table #InventTableModule
ExtendedDataType
ARRAY
#PriceUnit
#
ENDARRAY
ENDPROPERTIES
FIELD #Markup
Id 6
REAL
PROPERTIES
Name #Markup
Table #InventTableModule
ExtendedDataType
ARRAY
#InventPriceMarkup
#
ENDARRAY
ENDPROPERTIES
FIELD #LineDisc
Id 7
STRING
PROPERTIES
Name #LineDisc
HelpText #@SYS7838
Table #InventTableModule
ExtendedDataType
ARRAY
#InventLineDiscCode
#
ENDARRAY
ENDPROPERTIES
FIELD #MultiLineDisc
Id 8
STRING
PROPERTIES
Name #MultiLineDisc
Label #@Sys11440
HelpText #@SYS8307
Table #InventTableModule
ExtendedDataType
ARRAY
#InventMultiLineDiscCode
#
ENDARRAY
ENDPROPERTIES
FIELD #EndDisc
Id 9
ENUM
PROPERTIES
Name #EndDisc
Label #@Sys6465
HelpText #@SYS17091
ConfigurationKey #PriceDisc
Table #InventTableModule
EnumType #NoYes
ENDPROPERTIES
FIELD #DEL_Quantity
Id 10
REAL
PROPERTIES
Name #DEL_Quantity
ConfigurationKey #SysDeletedObjects41
Table #InventTableModule
ExtendedDataType
ARRAY
#QtyMultiples
#
ENDARRAY
ENDPROPERTIES
FIELD #DEL_LowestQty
Id 11
REAL
PROPERTIES
Name #DEL_LowestQty
HelpText #@SYS17329
GroupPrompt #@SYS21995
ConfigurationKey #SysDeletedObjects41
Table #InventTableModule
ExtendedDataType
ARRAY
#QtyLowest
#
ENDARRAY
ENDPROPERTIES
FIELD #DEL_HighestQty
Id 12
REAL
PROPERTIES
Name #DEL_HighestQty
HelpText #@SYS1036
GroupPrompt #@SYS8606
ConfigurationKey #SysDeletedObjects41
Table #InventTableModule
ExtendedDataType
ARRAY
#QtyHighest
#
ENDARRAY
ENDPROPERTIES
FIELD #TaxItemGroupId
Id 13
STRING
PROPERTIES
Name #TaxItemGroupId
HelpText #@SYS17342
Table #InventTableModule
ExtendedDataType
ARRAY
#TaxItemGroup
#
ENDARRAY
ENDPROPERTIES
FIELD #DEL_Blocked
Id 14
ENUM
PROPERTIES
Name #DEL_Blocked
Label #@Sys13688
HelpText #@SYS16899
ConfigurationKey #SysDeletedObjects41
Table #InventTableModule
EnumType #NoYes
ENDPROPERTIES
FIELD #DEL_DeliveryTime
Id 15
INT
PROPERTIES
Name #DEL_DeliveryTime
HelpText #@SYS35
ConfigurationKey #SysDeletedObjects41
Table #InventTableModule
ExtendedDataType
ARRAY
#LeadTimeDelivery
#
ENDARRAY
ENDPROPERTIES
FIELD #DEL_InventLocationId
Id 16
STRING
PROPERTIES
Name #DEL_InventLocationId
HelpText #@SYS3637
ConfigurationKey #SysDeletedObjects41
Table #InventTableModule
ExtendedDataType
ARRAY
#InventLocationId
#
ENDARRAY
ENDPROPERTIES
FIELD #DEL_MandatoryInventLocation
Id 17
ENUM
PROPERTIES
Name #DEL_MandatoryInventLocation
Label #@SYS22408
HelpText #@SYS9327
ConfigurationKey #SysDeletedObjects41
Table #InventTableModule
EnumType #NoYes
ENDPROPERTIES
FIELD #DEL_StandardQty
Id 18
REAL
PROPERTIES
Name #DEL_StandardQty
HelpText #@SYS19609
ConfigurationKey #SysDeletedObjects41
Table #InventTableModule
ExtendedDataType
ARRAY
#QtyStandard
#
ENDARRAY
ENDPROPERTIES
FIELD #MarkupGroupId
Id 19
STRING
PROPERTIES
Name #MarkupGroupId
HelpText #@SYS16610
Table #InventTableModule
ExtendedDataType
ARRAY
#InventMarkupGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #PriceDate
Id 20
DATE
PROPERTIES
Name #PriceDate
HelpText #@SYS7357
Table #InventTableModule
ExtendedDataType
ARRAY
#PriceDate
#
ENDARRAY
ENDPROPERTIES
FIELD #PriceQty
Id 22
REAL
PROPERTIES
Name #PriceQty
HelpText #@SYS25619
Table #InventTableModule
ExtendedDataType
ARRAY
#PriceQty
#
ENDARRAY
ENDPROPERTIES
FIELD #AllocateMarkup
Id 23
ENUM
PROPERTIES
Name #AllocateMarkup
Table #InventTableModule
ExtendedDataType
ARRAY
#PriceAllocateMarkup
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #OverDeliveryPct
Id 24
REAL
PROPERTIES
Name #OverDeliveryPct
Table #InventTableModule
ExtendedDataType
ARRAY
#OverDeliveryPct
#
ENDARRAY
ENDPROPERTIES
FIELD #UnderDeliveryPct
Id 25
REAL
PROPERTIES
Name #UnderDeliveryPct
Table #InventTableModule
ExtendedDataType
ARRAY
#UnderDeliveryPct
#
ENDARRAY
ENDPROPERTIES
FIELD #SuppItemGroupId
Id 26
STRING
PROPERTIES
Name #SuppItemGroupId
Table #InventTableModule
ExtendedDataType
ARRAY
#InventSuppItemGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #DEL_CalendarDays
Id 27
ENUM
PROPERTIES
Name #DEL_CalendarDays
ConfigurationKey #SysDeletedObjects41
Table #InventTableModule
ExtendedDataType
ARRAY
#CalendarDays
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #InterCompanyBlocked
Id 28
ENUM
PROPERTIES
Name #InterCompanyBlocked
Table #InventTableModule
ExtendedDataType
ARRAY
#InterCompanyBlocked
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #BPLAppCharge
Id 20001
ENUM
PROPERTIES
Name #BPLAppCharge
Label #@BPL125
ConfigurationKey #CRSEIsrael
Table #InventTableModule
EnumType #NoYes
ENDPROPERTIES
FIELD #BPLAppChargeAllocate
Id 20002
ENUM
PROPERTIES
Name #BPLAppChargeAllocate
ConfigurationKey #CRSEIsrael
Table #InventTableModule
EnumType #BPLAppChargeAllocate
ENDPROPERTIES
ENDFIELDS
GROUPS
GROUP #AutoReport
PROPERTIES
Name #AutoReport
ENDPROPERTIES
GROUPFIELDS
#ItemId
#ModuleType
#UnitId
#Price
#PriceUnit
#LineDisc
#Markup
ENDGROUPFIELDS
ENDGROUP
GROUP #BPLAllFields
PROPERTIES
Name #BPLAllFields
Label #@BPL141
ENDPROPERTIES
GROUPFIELDS
#BPLAppCharge
#BPLAppChargeAllocate
ENDGROUPFIELDS
ENDGROUP
GROUP #DeliveryPercent
PROPERTIES
Name #DeliveryPercent
Label #@SYS4508
ENDPROPERTIES
GROUPFIELDS
#OverDeliveryPct
#UnderDeliveryPct
ENDGROUPFIELDS
ENDGROUP
GROUP #Discount
PROPERTIES
Name #Discount
Label #@SYS11829
ENDPROPERTIES
GROUPFIELDS
#LineDisc
#MultiLineDisc
#EndDisc
ENDGROUPFIELDS
ENDGROUP
GROUP #Identification
PROPERTIES
Name #Identification
Label #@SYS5711
ENDPROPERTIES
GROUPFIELDS
#ItemId
#ModuleType
ENDGROUPFIELDS
ENDGROUP
GROUP #InterCompany
PROPERTIES
Name #InterCompany
Label #@SYS74106
ENDPROPERTIES
GROUPFIELDS
#InterCompanyBlocked
ENDGROUPFIELDS
ENDGROUP
GROUP #MiscCharges
PROPERTIES
Name #MiscCharges
Label #@SYS8371
ENDPROPERTIES
GROUPFIELDS
#MarkupGroupId
ENDGROUPFIELDS
ENDGROUP
GROUP #Module
PROPERTIES
Name #Module
Label #@SYS9941
ENDPROPERTIES
GROUPFIELDS
ENDGROUPFIELDS
ENDGROUP
GROUP #Prices
PROPERTIES
Name #Prices
Label #@SYS12983
ENDPROPERTIES
GROUPFIELDS
#Price
#PriceUnit
#Markup
#PriceQty
#PriceDate
#AllocateMarkup
ENDGROUPFIELDS
ENDGROUP
GROUP #Quantity
PROPERTIES
Name #Quantity
Label #@SYS14578
ENDPROPERTIES
GROUPFIELDS
#UnitId
ENDGROUPFIELDS
ENDGROUP
GROUP #SalesTax
PROPERTIES
Name #SalesTax
Label #@SYS5878
ENDPROPERTIES
GROUPFIELDS
#TaxItemGroupId
ENDGROUPFIELDS
ENDGROUP
GROUP #Setup
PROPERTIES
Name #Setup
Label #@SYS2186
ENDPROPERTIES
GROUPFIELDS
#UnitId
#MarkupGroupId
#TaxItemGroupId
#OverDeliveryPct
#UnderDeliveryPct
#InterCompanyBlocked
ENDGROUPFIELDS
ENDGROUP
GROUP #SupplementaryItem
PROPERTIES
Name #SupplementaryItem
Label #@SYS58240
ENDPROPERTIES
GROUPFIELDS
#SuppItemGroupId
ENDGROUPFIELDS
ENDGROUP
ENDGROUPS
INDICES
#ItemModuleIdx
Id 1
PROPERTIES
Name #ItemModuleIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#ItemId
#ModuleType
ENDINDEXFIELDS
ENDINDICES
REFERENCES
REFERENCE #InventTableModule
PROPERTIES
Name #InventTableModule
Table #InventTableModule
EntityRelationshipRole #@SYS123849
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #ItemId
RelatedField #ItemId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #ModuleType
RelatedField #ModuleType
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
ENDREFERENCES
DELETEACTIONS
ENDDELETEACTIONS
METHODS
Version: 3
SOURCE #calcSalesPrice
#void calcSalesPrice(InventTable _inventTable, InventAutoSalesPriceMap _basePrice)
#{
# ;
# this.InventAutoSalesPriceMap::calcSalesPrice(_inventTable, _basePrice);
#}
ENDSOURCE
SOURCE #CheckValid
#boolean checkValid()
#{
# if (! this)
# return checkFailed(strfmt("@SYS5700",this.ItemId,this.ModuleType));
#
# return true;
#
#}
#
#
ENDSOURCE
SOURCE #initFromInventItemPriceSim
#void initFromInventItemPriceSim(InventItemPriceSim _inventItemPriceSim)
#{
# PriceConvertFactory priceConvertFactory;
# PriceConvert priceConvert;
# ;
# priceConvertFactory = PriceConvertFactory::newItemPrice(_inventItemPriceSim.ItemId, _inventItemPriceSim.UnitID, _inventItemPriceSim.Price, _inventItemPriceSim.PriceUnit, _inventItemPriceSim.Markup, _inventItemPriceSim.PriceQty, '');
# priceConvertFactory.parmNewUnitId(this.UnitId);
# priceConvertFactory.parmRounding(true);
# priceConvert = priceConvertFactory.priceConvert();
#
# this.Price = priceConvert.parmPrice();
# this.PriceUnit = priceConvert.parmPriceUnit();
# this.Markup = priceConvert.parmMarkup();
# this.PriceQty = priceConvert.parmPriceQty();
# this.PriceDate = _inventItemPriceSim.FromDate;
# this.AllocateMarkup = _inventItemPriceSim.PriceAllocateMarkup;
#}
ENDSOURCE
SOURCE #initTaxItemGroupFromSlsPrchItemGrp
#///
#/// This method will assign the default tax id based on the transacation type: Purchasing or Sales.
#///
#///
#/// InventItemGroup table buffer.
#///
#
#public void initTaxItemGroupFromSlsPrchItemGrp(InventItemGroup _inventItemGroup)
#{
# switch(this.ModuleType)
# {
# case ModuleInventPurchSales::Purch:
#
# if(_inventItemGroup.TaxItemGroupIdPurch)
# {
# this.TaxItemGroupId = _inventItemGroup.TaxItemGroupIdPurch;
# }
# break;
#
# case ModuleInventPurchSales::Sales:
#
# if(_inventItemGroup.TaxItemGroupIdSales)
# {
# this.TaxItemGroupId = _inventItemGroup.TaxItemGroupIdSales;
# }
# break;
# }
#}
#
ENDSOURCE
SOURCE #InitValue
#void initValue()
#{
# this.PriceUnit = 1;
#
# this.UnitId = InventParameters::find().DefaultUnitId;
# this.EndDisc = NoYes::Yes;
#
# super();
#
#}
#
ENDSOURCE
SOURCE #insert
#void insert()
#{
# if (this.Price || this.Markup)
# this.PriceDate= systemdateget();
#
# super();
#}
ENDSOURCE
SOURCE #InventTable
#InventTable inventTable()
#{
# InventTable inventTable;
# ;
#
# if (this.isFormDataSource())
# {
# inventTable = this.joinedTable(inventTable);
# if (inventTable && inventTable.ItemId == this.ItemId)
# {
# return inventTable;
# }
# }
#
# return InventTable::find(this.ItemId);
#}
ENDSOURCE
SOURCE #joinedTable
#public Common joinedTable(Common _buffer)
#{
# Common joinBuffer;
# ;
#
# joinBuffer = this.joinParent();
# do
# {
# if (joinBuffer.TableId == _buffer.TableId)
# {
# return joinBuffer;
# }
# joinBuffer = joinBuffer.joinParent();
# }
# while (joinBuffer);
#
# return null;
#}
ENDSOURCE
SOURCE #Markup
#MarkupAmount markup()
#{
# return this.InventPriceMap::markup();
#}
ENDSOURCE
SOURCE #PcsPrice
#Price pcsPrice()
#{;
# return this.InventPriceMap::pcsPrice();
#}
#
ENDSOURCE
SOURCE #Price
#Price price()
#{
# return this.InventPriceMap::price();
#}
ENDSOURCE
SOURCE #PriceQty
#PriceQty priceQty()
#{
# return this.InventPriceMap::priceQty();
#}
ENDSOURCE
SOURCE #PriceUnit
#PriceUnit priceUnit()
#{
# return this.InventPriceMap::priceUnit();
#}
#
ENDSOURCE
SOURCE #Update
#void update(boolean _updatePriceDate = true)
#{
# boolean updPrice;
# FormRun formRun;
# FormObjectSet formObjSet;
# int i;
# InventTable inventTable;
#
# if (this.orig().Price != this.Price ||
# this.orig().Markup != this.Markup ||
# this.orig().PriceUnit != this.PriceUnit)
# {
# updPrice = true;
#
# if (_updatePriceDate)
# this.PriceDate = systemdateget();
# }
#
# ttsbegin;
#
# super();
#
# if (updPrice)
# {
# if (this.ModuleType != ModuleInventPurchSales::Sales)
# InventTable::updateAutoSalesPrice(this.ItemId, this.PriceDate);
# else
# {
# if (this.isFormDataSource())
# {
# // refresh and reread inventTable datasource if exists in form
# formRun = this.dataSource().formRun();
# for (i=1; i<= formRun.dataSourceCount(); i++)
# {
# if (formRun.dataSource(i).cursor().TableId == tablenum(InventTable))
# {
# formObjSet = formRun.dataSource(i);
# inventTable = formObjSet.cursor();
# break;
# }
# }
# if (!inventTable)
# {
# inventTable = InventTable::find(this.ItemId, true);
# }
# if (inventTable)
# {
# if (inventTable.updateAutoSalesPercent() && formObjSet)
# {
# formObjSet.refresh();
# formObjSet.reread();
# }
# }
# }
# }
# }
#
# ttscommit;
#}
ENDSOURCE
SOURCE #validateField
#boolean validateField(fieldId id)
#{
# boolean ret;
#
# ret = super(id);
#
# switch (fieldExt2Id(id))
# {
# case fieldnum(InventTableModule,UnitId):
# if (this.ModuleType==ModuleInventPurchSales::Invent
# && this.UnitId != this.orig().UnitId
# && !SysRecordTemplate::isTemplateEditFormRecord(this)) // Don't verify for template record.
# {
# if (InventTrans::transactionsExist(this.ItemId))
# return checkFailed(strfmt("@SYS120463",this.ItemId));
#
# if (InventItemPrice::costPricesExistForItem(this.ItemId))
# return checkFailed(strfmt("@SYS126703",this.ItemId));
# }
# break;
# }
#
# return ret;
#}
ENDSOURCE
SOURCE #ValidateWrite
#///
#/// Validate table buffer before it is written.
#///
#///
#/// Returns false if the Item sales tax group for purchase or sales order fields is not populated,
#/// a user requires mandatory item tax group.
#/// Otherwise returns true.
#///
#boolean validateWrite()
#{
# boolean ret;
# ;
#
# ret = super();
#
# if (ret
# && !this.TaxItemGroupId
# && (this.ModuleType == ModuleInventPurchSales::Purch
# || this.ModuleType == ModuleInventPurchSales::Sales)
# && (InventParameters::find().MandatoryItemTaxGroup))
# {
# ret = checkFailed("@SYS113293");
# }
#
# return ret;
#}
ENDSOURCE
SOURCE #exist
#static boolean exist(ItemId itemId,
# ModuleInventPurchSales moduleType)
#{
# return itemId && (select inventTableModule
# index hint ItemModuleIdx
# where inventTableModule.ItemId == itemId &&
# inventTableModule.ModuleType == moduleType
# ).RecId != 0;
#}
ENDSOURCE
SOURCE #find
#static InventTableModule find(ItemId itemId,
# ModuleInventPurchSales moduleType,
# boolean _forUpdate = false)
#{
# InventTableModule inventTableModule;
# ;
#
# if (_forUpdate)
# {
# inventTableModule.selectForUpdate(_forUpdate);
# inventTableModule.selectLocked(_forUpdate);
# }
#
# if (itemId)
# select firstonly inventTableModule
# where inventTableModule.ItemId == itemId &&
# inventTableModule.ModuleType == moduleType;
#
# return inventTableModule;
#}
ENDSOURCE
SOURCE #unitConvert
#static Qty unitConvert(ItemId itemId,
# ModuleInventPurchSales module,
# UnitID unitFrom,
# Qty valueFrom = 1)
#{
# UnitID unitInvent;
# UnitID unitTo;
# ;
#
# unitTo = InventTableModule::find(itemId, module).UnitId;
#
# if (unitFrom != unitTo)
# {
# unitInvent = InventTableModule::find(itemId, ModuleInventPurchSales::Invent).UnitId;
# return InventTable::unitConvert(itemId, unitFrom, unitTo, unitInvent, valueFrom);
# }
#
# return valueFrom;
#}
ENDSOURCE
SOURCE #unitConvertValue
#static real unitConvertValue( ItemId itemId,
# ModuleInventPurchSales module,
# UnitID unitFrom,
# real valueFrom)
#{
# UnitID unitInvent;
# UnitID unitTo;
# ;
#
# unitTo = InventTableModule::find(itemId, module).UnitId;
#
# if (unitFrom != unitTo)
# {
# unitInvent = InventTableModule::find(itemId, ModuleInventPurchSales::Invent).UnitId;
# return InventTable::unitConvertValue(itemId, unitFrom, unitTo, unitInvent, valueFrom);
# }
#
# return valueFrom;
#}
#
ENDSOURCE
ENDMETHODS
ENDTABLE
en-us
Inventory module parameters
@SYS27987
0
0
he
פרמטרים של מודול מלאי
@SYS27987
0
0
en-us
The InventTableModule table contains information about purchase, sales and inventory specific settings for items.
{locked}
@SYS123848
0
0
he
The InventTableModule table contains information about purchase, sales and inventory specific settings for items.
{locked}
@SYS123848
0
0
en-us
Item number that the parameters apply to.
@SYS20817
0
0
he
מספר הפריט שעליו חלים הפרמטרים.
@SYS20817
0
0
en-us
Module that parameters apply to.
@SYS10404
0
0
he
המודול שעליו חלים הפרמטרים.
@SYS10404
0
0
en-us
Unit which the module is run in
@SYS14532
0
0
he
היחידה שבה פועל המודול
@SYS14532
0
0
en-us
Price per the number of units specified in the Price unit field.
@SYS25618
0
0
he
המחיר עבור מספר היחידות המצוין בשדה יחידת המחיר.
@SYS25618
0
0
en-us
Specify item's line discount group in module
@SYS7838
0
0
he
ציין את קבוצת הנחת השורה של הפריט במודול
@SYS7838
0
0
en-us
Multiline discount
@Sys11440
0
0
he
הנחה מרובת שורות
@Sys11440
0
0
en-us
Determines multiline discount of the item for several invoice lines in the module.
@SYS8307
0
0
he
קובע הנחה מרובת שורות של הפריט עבור מספר שורות חשבונית במודול.
@SYS8307
0
0
en-us
Total discount
@Sys6465
0
0
he
הנחה כוללת
@Sys6465
0
0
en-us
Is the item included in the calculation of a combined total discount?
@SYS17091
0
0
he
האם הפריט כלול בחישוב של הנחה כוללת משולבת?
@SYS17091
0
0
en-us
Minimum quantity operated with in the module
@SYS17329
0
0
he
הכמות המינימלית המופעלת במודול
@SYS17329
0
0
en-us
Min. order quantity
Situated computing
@SYS21995
0
0
he
כמות מינימלית להזמנה
Situated computing
@SYS21995
0
0
en-us
Max. quantity allowed for operation in the module
@SYS1036
0
0
he
הכמות המרבית המותרת עבור פעולה במודול
@SYS1036
0
0
en-us
Largest quantity
@SYS8606
0
0
he
הכמות הגדולה ביותר
@SYS8606
0
0
en-us
Module-specific item sales tax group
Tax = Sales tax (VAT)
@SYS17342
0
0
he
קבוצת המע"מ לפריט ספציפי למודול
Tax = Sales tax (VAT)
@SYS17342
0
0
en-us
Stopped
@Sys13688
0
0
he
הופסק
@Sys13688
0
0
en-us
Is the item on hold for transactions?
@SYS16899
0
0
he
האם הפריט בהמתנה עבור תנועות?
@SYS16899
0
0
en-us
Default lead time or lead time in number of days
@SYS35
0
0
he
ברירת מחדל של זמן אספקה או מספר ימים של זמן אספקה
@SYS35
0
0
en-us
Default warehouse for the module
@SYS3637
0
0
he
מחסן ברירת המחדל עבור המודול
@SYS3637
0
0
en-us
Mandatory warehouse
@SYS22408
0
0
he
מחסן חובה
@SYS22408
0
0
en-us
Accept item transactions only for the warehouse of the module.
@SYS9327
0
0
he
קבל תנועות פריט רק עבור המחסן של המודול.
@SYS9327
0
0
en-us
Standard order quantity or series size used in the module
Situated computing
@SYS19609
0
0
he
כמות ההזמנה הרגילה או גודל הסידרה המשמשים במודול
Situated computing
@SYS19609
0
0
en-us
Specify misc. charges group for the item in the module.
@SYS16610
0
0
he
ציין קבוצת חיובים שונים עבור הפריט במודול.
@SYS16610
0
0
en-us
Date when price was last modified.
@SYS7357
0
0
he
התאריך האחרון שבו השתנה המחיר.
@SYS7357
0
0
en-us
Quantity to be used when allocating the specified misc. charges on price per unit. Requires selection of the 'Incl. in unit price' field.
@SYS25619
0
0
he
הכמות לשימוש בעת הקצאת החיובים השונים המצוינים לפי מחיר לכל יחידה. פעולה זו דורשת בחירה של השדה 'כלול במחיר יחידה'.
@SYS25619
0
0
en-us
Charge item
@BPL125
0
0
he
פריטי חיוב
@BPL125
0
0
en-us
BUS fields Israel
@BPL141
0
0
he
שדות ישראל BUS
@BPL141
0
0
en-us
Delivery
@SYS4508
0
0
he
משלוח
@SYS4508
0
0
en-us
Discount
@SYS11829
0
0
he
הנחה
@SYS11829
0
0
en-us
Identification
@SYS5711
0
0
he
זיהוי
@SYS5711
0
0
en-us
Intercompany
Intercompany used in the sense 'intra-group'.
@SYS74106
0
0
he
בין-חברתי
Intercompany used in the sense 'intra-group'.
@SYS74106
0
0
en-us
Misc. charges
@SYS8371
0
0
he
חיובים שונים
@SYS8371
0
0
en-us
Module
@SYS9941
0
0
he
מודול
@SYS9941
0
0
en-us
Prices
@SYS12983
0
0
he
מחירים
@SYS12983
0
0
en-us
Quantity
@SYS14578
0
0
he
כמות
@SYS14578
0
0
en-us
Sales tax
Tax = Sales tax
@SYS5878
0
0
he
מע"מ
Tax = Sales tax
@SYS5878
0
0
en-us
Setup
@SYS2186
0
0
he
כיוונון
@SYS2186
0
0
en-us
Supplementary item
@SYS58240
0
0
he
פריט משלים
@SYS58240
0
0
en-us
Item module settings
{locked}
@SYS123849
0
0
he
Item module settings
{locked}
@SYS123849
0
0
en-us
Item %1 has no parameters for %2.
@SYS5700
0
0
he
לפריט %1 אין פרמטרים עבור %2.
@SYS5700
0
0
en-us
The inventory unit for item %1 cannot be changed because transactions exist. If the transactions cannot be deleted you will need to use a new item number with a new inventory unit.
@SYS120463
0
0
he
אין אפשרות לשנות את יחידת המלאי עבור הפריט %1 מכיוון שקיימות תנועות. אם אין אפשרות למחוק את התנועות תידרש להשתמש במספר פריט חדש עם יחידת מלאי חדשה.
@SYS120463
0
0
en-us
The inventory unit for item %1 cannot be changed because activated cost prices exist. The cost prices can only be deleted by deleting the item.
Error message
@SYS126703
0
0
he
אין אפשרות לשנות את יחידת המלאי עבור הפריט %1 מכיוון שקיימים מחירי עלות פעילים. ניתן למחוק את מחירי העלות רק על-ידי מחיקת הפריט.
Error message
@SYS126703
0
0
en-us
Product tax categories must be assigned to purchases and sales.
@SYS113293
0
0
he
יש להקצות קטגוריות מס מוצר לרכישות ומכירות.
@SYS113293
0
0
***Element: DBT
; Microsoft Dynamics AX Table : MarkupTable unloaded
; --------------------------------------------------------------------------------
TABLEVERSION 1
TABLE #MarkupTable
Id 229
PROPERTIES
Name #MarkupTable
Label #@SYS13015
FormRef #MarkupTable
TitleField1 #ModuleType
TitleField2 #MarkupCode
TableContents #Base + default data
ConfigurationKey #Markup
SecurityKey #BasicTables
CacheLookup #EntireTable
CreateRecIdIndex #Yes
TableGroup #Group
PrimaryIndex #ModuleCodeIdx
ClusterIndex #ModuleCodeIdx
DeveloperDocumentation #@SYS124471
ENDPROPERTIES
FIELDS
FIELD #Txt
Id 1
STRING
PROPERTIES
Name #Txt
Label #@SYS6303
HelpText #@SYS16224
Table #MarkupTable
ExtendedDataType
ARRAY
#TransTxt
#
ENDARRAY
StringSize #60
ENDPROPERTIES
FIELD #CustPosting
Id 2
ENUM
PROPERTIES
Name #CustPosting
Label #@SYS22902
HelpText #@SYS7341
GroupPrompt #@SYS12919
Table #MarkupTable
EnumType #LedgerPostingType
ENDPROPERTIES
FIELD #CustAccount
Id 3
STRING
PROPERTIES
Name #CustAccount
Label #@SYS15996
HelpText #@SYS11884
GroupPrompt #@SYS24500
Table #MarkupTable
ExtendedDataType
ARRAY
#LedgerAccount
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #VendPosting
Id 4
ENUM
PROPERTIES
Name #VendPosting
Label #@SYS22903
HelpText #@SYS1273
GroupPrompt #@SYS12919
Table #MarkupTable
EnumType #LedgerPostingType
ENDPROPERTIES
FIELD #VendAccount
Id 5
STRING
PROPERTIES
Name #VendAccount
Label #@SYS3965
HelpText #@SYS10268
GroupPrompt #@SYS24500
Table #MarkupTable
ExtendedDataType
ARRAY
#LedgerAccount
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #TaxItemGroup
Id 6
STRING
PROPERTIES
Name #TaxItemGroup
Table #MarkupTable
ExtendedDataType
ARRAY
#TaxItemGroup
#
ENDARRAY
ENDPROPERTIES
FIELD #CustType
Id 7
ENUM
PROPERTIES
Name #CustType
Label #@SYS22901
HelpText #@SYS2329
GroupPrompt #@SYS1201
Table #MarkupTable
EnumType #MarkupType
ENDPROPERTIES
FIELD #VendType
Id 8
ENUM
PROPERTIES
Name #VendType
Label #@SYS23988
HelpText #@SYS12730
GroupPrompt #@SYS1201
Table #MarkupTable
EnumType #MarkupType
ENDPROPERTIES
FIELD #ModuleType
Id 9
ENUM
PROPERTIES
Name #ModuleType
AllowEditOnCreate #No
AllowEdit #No
Table #MarkupTable
ExtendedDataType
ARRAY
#MarkupModule
#
ENDARRAY
EnumType #ModuleInventCustVend
ENDPROPERTIES
FIELD #MarkupCode
Id 10
STRING
PROPERTIES
Name #MarkupCode
Mandatory #Yes
AllowEdit #No
Table #MarkupTable
ExtendedDataType
ARRAY
#MarkupCode
#
ENDARRAY
ENDPROPERTIES
FIELD #Intrastat_FI
Id 11
ENUM
PROPERTIES
Name #Intrastat_FI
Table #MarkupTable
ExtendedDataType
ARRAY
#IntrastatMarkup_FI
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #UseInMatching
Id 12
ENUM
PROPERTIES
Name #UseInMatching
Table #MarkupTable
ExtendedDataType
ARRAY
#MarkupUseInMatching
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #BPLChargeItemId
Id 20001
STRING
PROPERTIES
Name #BPLChargeItemId
ConfigurationKey #CRSEIsrael
Table #MarkupTable
ExtendedDataType
ARRAY
#BPLChargeItemId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
ENDFIELDS
GROUPS
GROUP #AutoReport
PROPERTIES
Name #AutoReport
ENDPROPERTIES
GROUPFIELDS
#ModuleType
#MarkupCode
#Txt
#UseInMatching
#TaxItemGroup
#CustType
#CustPosting
#CustAccount
#VendType
#VendPosting
#VendAccount
ENDGROUPFIELDS
ENDGROUP
GROUP #Administration
PROPERTIES
Name #Administration
Label #@SYS9853
ENDPROPERTIES
GROUPFIELDS
#ModuleType
ENDGROUPFIELDS
ENDGROUP
GROUP #BPLAllFields
PROPERTIES
Name #BPLAllFields
Label #@BPL141
ENDPROPERTIES
GROUPFIELDS
#BPLChargeItemId
ENDGROUPFIELDS
ENDGROUP
GROUP #Credit
PROPERTIES
Name #Credit
Label #@sys7084
ENDPROPERTIES
GROUPFIELDS
#VendType
#VendPosting
#VendAccount
ENDGROUPFIELDS
ENDGROUP
GROUP #Debit
PROPERTIES
Name #Debit
Label #@SYS9512
ENDPROPERTIES
GROUPFIELDS
#CustType
#CustPosting
#CustAccount
ENDGROUPFIELDS
ENDGROUP
GROUP #Description
PROPERTIES
Name #Description
Label #@SYS6303
ENDPROPERTIES
GROUPFIELDS
#MarkupCode
#Txt
ENDGROUPFIELDS
ENDGROUP
GROUP #DocumentMatching
PROPERTIES
Name #DocumentMatching
Label #@SYS25194
ENDPROPERTIES
GROUPFIELDS
#UseInMatching
ENDGROUPFIELDS
ENDGROUP
GROUP #FinlandIntrastat
PROPERTIES
Name #FinlandIntrastat
Label #@SYS97262
ENDPROPERTIES
GROUPFIELDS
#Intrastat_FI
ENDGROUPFIELDS
ENDGROUP
GROUP #SalesTax
PROPERTIES
Name #SalesTax
Label #@SYS5878
ENDPROPERTIES
GROUPFIELDS
#TaxItemGroup
ENDGROUPFIELDS
ENDGROUP
ENDGROUPS
INDICES
#ModuleCodeIdx
Id 1
PROPERTIES
Name #ModuleCodeIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#ModuleType
#MarkupCode
ENDINDEXFIELDS
ENDINDICES
REFERENCES
ENDREFERENCES
DELETEACTIONS
#MarkupAutoLine
PROPERTIES
Table #MarkupAutoLine
DeleteAction #Restricted
ENDPROPERTIES
#LanguageTxt
PROPERTIES
Table #LanguageTxt
DeleteAction #Cascade
ENDPROPERTIES
ENDDELETEACTIONS
METHODS
Version: 3
SOURCE #allowEditCurrency
#boolean allowEditCurrency()
#{
# boolean ok = true;
# ;
#
# if (this.isMarkupOfTypeCustVend())
# {
# ok = false;
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #CheckCustAccount
#boolean checkCustAccount()
#{
# boolean ok = true;
# ;
#
# if (this.CustAccount)
# {
# ok = LedgerTable::checkAllowPosting(this.CustAccount);
# }
#
# if (this.CustType != MarkupType::LedgerAccount && (this.CustType != MarkupType::Item || !PurchParameters::find().PostChargeAccount))
# {
# if (this.CustAccount)
# ok = checkFailed("@SYS25165");
# }
# else
# {
# if (this.CustType != MarkupType::Item || !PurchParameters::find().PostChargeAccount)
# if (!this.CustAccount)
# ok = checkFailed("@SYS25989");
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #CheckCustPosting
#boolean checkCustPosting()
#{
# boolean ok = true;
# ;
#
# if (!this.CustPosting)
# if (this.CustType == MarkupType::LedgerAccount)
# ok = checkFailed(strfmt("@SYS26332", "@SYS22902"));
#
# return ok;
#}
ENDSOURCE
SOURCE #CheckCustType
#boolean checkCustType()
#{
# boolean ok = true;
# ;
#
# if (this.ModuleType == ModuleInventCustVend::Cust &&
# this.CustType == MarkupType::Item)
# {
# ok = checkFailed("@SYS16770");
# }
#
# if (this.CustType != MarkupType::LedgerAccount && (this.CustType != MarkupType::Item || !PurchParameters::find().PostChargeAccount))
# {
# if (this.CustPosting)
# ok = checkFailed("@SYS28495");
# }
#
# if (this.CustType == MarkupType::Item && PurchParameters::find().PostChargeAccount)
# {
# if ((this.CustPosting && !this.CustAccount) || (!this.CustPosting && this.CustAccount))
# {
# ok = checkFailed("@SYS78192");
# }
# }
#
# if (! ok)
# this.CustPosting = 0;
#
# return ok;
#}
ENDSOURCE
SOURCE #CheckCustVendPosting
#boolean checkCustVendPosting()
#{
# boolean ok = true;
# ;
#
# if (this.CustType == MarkupType::LedgerAccount &&
# this.VendType == MarkupType::LedgerAccount)
# {
# if (this.CustPosting == this.VendPosting &&
# this.CustAccount == this.VendAccount)
# {
# ok = checkFailed("@SYS24194");
# }
# }
# else
# {
# if (this.CustType == this.VendType)
# ok = checkFailed("@SYS24194");
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #CheckCustVendType
#boolean checkCustVendType()
#{
# boolean ok = true;
# ;
#
# if (this.CustType == this.VendType)
# ok = this.checkCustVendPosting();
#
# return ok;
#}
ENDSOURCE
SOURCE #CheckTaxItemGroup
#boolean checkTaxItemGroup()
#{
# boolean ok = true;
# ;
#
# if (this.VendType == MarkupType::LedgerAccount &&
# this.CustType == MarkupType::Item &&
# this.TaxItemGroup)
# {
# ok = checkFailed("@SYS26238");
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #CheckVendAccount
#boolean checkVendAccount()
#{
# boolean ok = true;
# ;
#
# if (this.VendAccount)
# ok = LedgerTable::checkAllowPosting(this.VendAccount);
#
# if (this.VendType != MarkupType::LedgerAccount)
# {
# if (this.VendAccount)
# ok = checkFailed("@SYS25165");
# }
# else
# {
# if (!this.VendAccount)
# ok = checkFailed("@SYS25989");
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #CheckVendPosting
#boolean checkVendPosting()
#{
# boolean ok = true;
# ;
#
# if (!this.VendPosting)
# if (this.VendType == MarkupType::LedgerAccount)
# ok = checkFailed(strfmt("@SYS26332", "@SYS22903"));
#
# return ok ;
#}
ENDSOURCE
SOURCE #CheckVendType
#boolean checkVendType()
#{
# boolean ok = true;
# ;
#
# if (this.VendType == MarkupType::Item)
# ok = checkFailed("@SYS16770");
#
# if (this.VendType != MarkupType::LedgerAccount)
# if (this.VendPosting)
# ok = checkFailed("@SYS28496");
#
# if (! ok)
# this.VendPosting = 0;
#
# return ok;
#}
ENDSOURCE
SOURCE #editUseInMatching
#///
#/// Edits the UseInMatching table field.
#///
#///
#/// true of the value will be modified; otherwise, false.
#///
#///
#/// New value of the field.
#///
#///
#/// Value of the field.
#///
#//BP Deviation Documented
#edit public MarkupUseInMatching editUseInMatching(boolean _set, MarkupUseInMatching _useInMatching)
#{
# ;
# if(this.isMarkupOfTypeCustVend() && _set)
# {
# this.UseInMatching = _useInMatching;
# }
# return this.useInMatching();
#}
ENDSOURCE
SOURCE #InitValue
#void initValue()
#{
# super();
#
# this.CustType = MarkupType::LedgerAccount;
# this.VendType = MarkupType::LedgerAccount;
# this.UseInMatching = true;
#}
ENDSOURCE
SOURCE #isMarkupOfTypeCustVend
#boolean isMarkupOfTypeCustVend()
#{
# return (this.CustType == MarkupType::CustVend ||
# this.VendType == MarkupType::CustVend);
#}
ENDSOURCE
SOURCE #isMarkupOfTypeItemLedger
#public boolean isMarkupOfTypeItemLedger()
#{
# return ((this.CustType == MarkupType::Item &&
# this.VendType == MarkupType::LedgerAccount) ||
# (this.CustType == MarkupType::LedgerAccount &&
# this.VendType == MarkupType::Item));
#}
ENDSOURCE
SOURCE #MarkupTypeItem
#boolean markupTypeItem()
#{
# return (this.CustType == MarkupType::Item ||
# this.VendType == MarkupType::Item);
#}
ENDSOURCE
SOURCE #useInMatching
#///
#/// Determines whether the MarkupTable record can participate in transaction matching.
#///
#///
#/// true if the current record can participate in transaction matching; otherwise, false.
#///
#///
#/// The determination is based on the MarkupTable UseInMatching field and MarkupType field value of Cust/Vend.
#///
#//BP Deviation Documented
#display public MarkupUseInMatching useInMatching()
#{
# ;
# return this.UseInMatching && this.isMarkupOfTypeCustVend();
#}
ENDSOURCE
SOURCE #validateField
#boolean validateField(fieldId fieldId)
#{
# boolean ok;
# ;
#
# ok = super(fieldId);
#
# switch(fieldId)
# {
# case(fieldnum(MarkupTable, CustAccount)) : ok = this.checkCustAccount();
# break;
# case(fieldnum(MarkupTable, VendAccount)) : ok = this.checkVendAccount();
# break;
# case(fieldnum(MarkupTable, CustType)) : ok = this.checkCustType();
# break;
# case(fieldnum(MarkupTable, VendType)) : ok = this.checkVendType();
# break;
# case(fieldnum(MarkupTable, CustPosting)) : ok = this.checkCustPosting();
# break;
# case(fieldnum(MarkupTable, VendPosting)) : ok = this.checkVendPosting();
# break;
# case(fieldnum(MarkupTable, TaxItemGroup)) : ok = this.checkTaxItemGroup();
# break;
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #validateWrite
#boolean validateWrite()
#{
# boolean ok = true;
# ;
#
# ok = super();
#
# if (!this.checkCustAccount() ||
# !this.checkVendAccount() ||
# !this.checkCustVendType() ||
# !this.checkCustType() ||
# !this.checkVendType() ||
# !this.checkCustVendPosting() ||
# !this.checkCustPosting() ||
# !this.checkVendPosting())
# {
# ok = false;
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #checkExist
#static boolean checkExist(ModuleInventCustVend module,
# MarkupCode markupCode)
#{
# if (markupCode && !MarkupTable::exist(module, markupCode))
# return checkFailed(strfmt(MarkupTable::txtNotExist(),markupCode));
#
# return true;
#}
ENDSOURCE
SOURCE #exist
#static boolean exist(ModuleInventCustVend module,
# MarkupCode markupCode)
#{
# if (markupCode)
# {
# return (select firstonly RecId from markupTable
# index hint ModuleCodeIdx
# where markupTable.ModuleType == module &&
# markupTable.MarkupCode == markupCode
# ).RecId != 0;
# }
#
# return false;
#}
ENDSOURCE
SOURCE #find
#static MarkupTable find(MarkupModule markupModule,
# MarkupCode markupCode,
# boolean _forUpdate = false)
#{
# MarkupTable markupTable;
# ;
#
# if (markupCode)
# {
# markupTable.selectForUpdate(_forUpdate);
#
# select firstonly markupTable
# index hint ModuleCodeIdx
# where markupTable.ModuleType == markupModule &&
# markupTable.MarkupCode == markupCode;
# }
#
# return markupTable;
#}
ENDSOURCE
SOURCE #findRecId
#static MarkupTable findRecId(recId _recId,
# boolean update = false)
#{
# MarkupTable markupTable;
# ;
#
# if (_recId)
# {
# markupTable.selectForUpdate(update);
#
# select firstonly markupTable
# where markupTable.RecId == _recId;
# }
#
# return markupTable;
#}
ENDSOURCE
SOURCE #lookupMarkupAllocationCode
#client static void lookupMarkupAllocationCode(FormStringControl ctrl,
# MarkupCode markupCode)
#{
# Args args;
# Object formRun;
# ;
#
# args = new Args();
# args.name(formstr(MarkupAllocationCodeLookup));
#
# formRun = classfactory.formRunClass(args);
# formRun.init();
#
# ctrl.performFormLookup(formRun);
#}
ENDSOURCE
SOURCE #txtNotExist
#static TxtNotExist txtNotExist()
#{
# return "@SYS3641";
#}
ENDSOURCE
ENDMETHODS
ENDTABLE
en-us
Misc. charges codes
@SYS13015
0
0
he
קודים של חיובים שונים
@SYS13015
0
0
en-us
The MarkupTable table contains markup filter setup.
{locked}
@SYS124471
0
0
he
The MarkupTable table contains markup filter setup.
{locked}
@SYS124471
0
0
en-us
Description
@SYS6303
0
0
he
תיאור
@SYS6303
0
0
en-us
Description of the misc. charges
@SYS16224
0
0
he
תיאור החיובים השונים
@SYS16224
0
0
en-us
Debit posting
@SYS22902
0
0
he
רישום חיוב
@SYS22902
0
0
en-us
Specify posting of debit transactions.
@SYS7341
0
0
he
ציין רישום של תנועות חיוב.
@SYS7341
0
0
en-us
Posting
da: Kontering
@SYS12919
0
0
he
רישום
da: Kontering
@SYS12919
0
0
en-us
Debit account
@SYS15996
0
0
he
חשבון חיוב
@SYS15996
0
0
en-us
Journal line amount to be debited to specified account.
@SYS11884
0
0
he
סכום שורת היומן שיש לחייב לחשבון שצוין.
@SYS11884
0
0
en-us
Account
@SYS24500
0
0
he
חשבון
@SYS24500
0
0
en-us
Credit posting
@SYS22903
0
0
he
רישום זיכוי
@SYS22903
0
0
en-us
Specify posting of credit transactions.
@SYS1273
0
0
he
ציין רישום של תנועות זיכוי.
@SYS1273
0
0
en-us
Credit account
@SYS3965
0
0
he
חשבון זיכוי
@SYS3965
0
0
en-us
Journal line amount to be credited to specified account
@SYS10268
0
0
he
סכום שורת היומן שיש לזכות לחשבון שצוין
@SYS10268
0
0
en-us
Debit type
@SYS22901
0
0
he
סוג חיוב
@SYS22901
0
0
en-us
Specify debit type.
@SYS2329
0
0
he
ציין סוג חיוב.
@SYS2329
0
0
en-us
Type
@SYS1201
0
0
he
סוג
@SYS1201
0
0
en-us
Credit type
@SYS23988
0
0
he
סוג זיכוי
@SYS23988
0
0
en-us
Specify credit type.
@SYS12730
0
0
he
ציין סוג זיכוי.
@SYS12730
0
0
en-us
Administration
@SYS9853
0
0
he
ניהול
@SYS9853
0
0
en-us
BUS fields Israel
@BPL141
0
0
he
שדות ישראל BUS
@BPL141
0
0
en-us
Credit
@sys7084
0
0
he
זיכוי
@sys7084
0
0
en-us
Debit
@SYS9512
0
0
he
חיוב
@SYS9512
0
0
en-us
Accounts payable
@SYS25194
0
0
he
חשבונות זכאים
@SYS25194
0
0
en-us
Finnish intrastat
@SYS97262
0
0
he
סטטיסטיקה פנימית בפינלנד
@SYS97262
0
0
en-us
Sales tax
Tax = Sales tax
@SYS5878
0
0
he
מע"מ
Tax = Sales tax
@SYS5878
0
0
en-us
Do not specify account number.
@SYS25165
0
0
he
אין לציין מספר חשבון.
@SYS25165
0
0
en-us
Account number must be specified.
@SYS25989
0
0
he
יש לציין מספר חשבון.
@SYS25989
0
0
en-us
Field %1 must be filled in.
@SYS26332
0
0
he
יש למלא את שדה %1.
@SYS26332
0
0
en-us
Misc. charges on item cannot be used.
@SYS16770
0
0
he
לא ניתן להשתמש בחיובים השונים על פריט.
@SYS16770
0
0
en-us
Postings to customer account cannot be made.
@SYS28495
0
0
he
אין אפשרות לבצע רישומים לחשבון לקוח.
@SYS28495
0
0
en-us
Debit posting and account should both be blank or filled out.
@SYS78192
0
0
he
על רישום החיוב וחשבון החיוב להיות שניהם ריקים או מלאים.
@SYS78192
0
0
en-us
Illegal posting combination
@SYS24194
0
0
he
צירוף רישום לא חוקי
@SYS24194
0
0
en-us
Sales tax code is not allowed with debit type = item.
Tax = Sales tax (VAT)
@SYS26238
0
0
he
קוד מע"מ אינו אפשרי עם סוג חיוב = פריט.
Tax = Sales tax (VAT)
@SYS26238
0
0
en-us
Postings to vendor account cannot be made.
@SYS28496
0
0
he
אין אפשרות לבצע רישומים לחשבון ספק.
@SYS28496
0
0
en-us
Misc. charges %1 does not exist.
@SYS3641
0
0
he
%1 של חיובים שונים אינו קיים.
@SYS3641
0
0
***Element: DBT
; Microsoft Dynamics AX Table : MarkupTrans unloaded
; --------------------------------------------------------------------------------
TABLEVERSION 1
TABLE #MarkupTrans
Id 230
PROPERTIES
Name #MarkupTrans
Label #@SYS13468
FormRef #MarkupTrans
TitleField1 #MarkupCode
TitleField2 #Voucher
ConfigurationKey #Markup
SecurityKey #BasicTables
CacheLookup #NotInTTS
CreateRecIdIndex #Yes
TableGroup #Transaction
PrimaryIndex #TableRecIdIdx
ClusterIndex #TableRecIdIdx
DeveloperDocumentation #@SYS124472
ENDPROPERTIES
FIELDS
FIELD #TransTableId
Id 1
INT
PROPERTIES
Name #TransTableId
AllowEditOnCreate #No
AllowEdit #No
Table #MarkupTrans
ExtendedDataType
ARRAY
#MarkupTransRefTableId
#
ENDARRAY
ENDPROPERTIES
FIELD #TransRecId
Id 2
INT64
PROPERTIES
Name #TransRecId
AllowEditOnCreate #No
AllowEdit #No
Table #MarkupTrans
ExtendedDataType
ARRAY
#MarkupTransRefRecId
#
ENDARRAY
ENDPROPERTIES
FIELD #LineNum
Id 3
REAL
PROPERTIES
Name #LineNum
AllowEditOnCreate #No
AllowEdit #No
Table #MarkupTrans
ExtendedDataType
ARRAY
#LineNum
#
ENDARRAY
ENDPROPERTIES
FIELD #MarkupCode
Id 4
STRING
PROPERTIES
Name #MarkupCode
Mandatory #Yes
Table #MarkupTrans
ExtendedDataType
ARRAY
#MarkupCode
#
ENDARRAY
ENDPROPERTIES
FIELD #CurrencyCode
Id 5
STRING
PROPERTIES
Name #CurrencyCode
HelpText #@SYS20784
Mandatory #Yes
Table #MarkupTrans
ExtendedDataType
ARRAY
#CurrencyCode
#
ENDARRAY
StringSize #3
ENDPROPERTIES
FIELD #Value
Id 6
REAL
PROPERTIES
Name #Value
Table #MarkupTrans
ExtendedDataType
ARRAY
#MarkupValue
#
ENDARRAY
ENDPROPERTIES
FIELD #TaxAmount
Id 7
REAL
PROPERTIES
Name #TaxAmount
Table #MarkupTrans
ExtendedDataType
ARRAY
#TaxAmountCur
#
ENDARRAY
ENDPROPERTIES
FIELD #Posted
Id 8
REAL
PROPERTIES
Name #Posted
HelpText #@SYS9733
AllowEditOnCreate #No
AllowEdit #No
Table #MarkupTrans
ExtendedDataType
ARRAY
#AmountCur
#
ENDARRAY
ENDPROPERTIES
FIELD #Voucher
Id 9
STRING
PROPERTIES
Name #Voucher
HelpText #@SYS7290
AllowEditOnCreate #No
AllowEdit #No
Table #MarkupTrans
ExtendedDataType
ARRAY
#Voucher
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #TransDate
Id 10
DATE
PROPERTIES
Name #TransDate
HelpText #@SYS3961
AllowEditOnCreate #No
AllowEdit #No
Table #MarkupTrans
ExtendedDataType
ARRAY
#TransDate
#
ENDARRAY
ENDPROPERTIES
FIELD #Txt
Id 11
STRING
PROPERTIES
Name #Txt
HelpText #@SYS16224
Table #MarkupTrans
ExtendedDataType
ARRAY
#TransTxt
#
ENDARRAY
StringSize #60
ENDPROPERTIES
FIELD #TaxGroup
Id 12
STRING
PROPERTIES
Name #TaxGroup
Table #MarkupTrans
ExtendedDataType
ARRAY
#TaxGroup
#
ENDARRAY
ENDPROPERTIES
FIELD #TaxItemGroup
Id 13
STRING
PROPERTIES
Name #TaxItemGroup
Table #MarkupTrans
ExtendedDataType
ARRAY
#TaxItemGroup
#
ENDARRAY
ENDPROPERTIES
FIELD #MarkupCategory
Id 14
ENUM
PROPERTIES
Name #MarkupCategory
Table #MarkupTrans
ExtendedDataType
ARRAY
#MarkupCategoryType
#
ENDARRAY
EnumType #MarkupCategory
ENDPROPERTIES
FIELD #TaxAutogenerated
Id 15
ENUM
PROPERTIES
Name #TaxAutogenerated
AllowEditOnCreate #No
AllowEdit #No
Table #MarkupTrans
ExtendedDataType
ARRAY
#TaxAutoGenerated
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #TaxWriteCode
Id 16
STRING
PROPERTIES
Name #TaxWriteCode
AllowEditOnCreate #No
AllowEdit #No
Table #MarkupTrans
ExtendedDataType
ARRAY
#TaxWriteCode
#
ENDARRAY
ENDPROPERTIES
FIELD #ModuleCategory
Id 17
ENUM
PROPERTIES
Name #ModuleCategory
Table #MarkupTrans
ExtendedDataType
ARRAY
#MarkupModuleCategory
#
ENDARRAY
EnumType #HeadingLine
ENDPROPERTIES
FIELD #OrigRecId
Id 18
INT64
PROPERTIES
Name #OrigRecId
AllowEditOnCreate #No
AllowEdit #No
Table #MarkupTrans
ExtendedDataType
ARRAY
#MarkupTransOrigRefRecId
#
ENDARRAY
ENDPROPERTIES
FIELD #OrigTableId
Id 19
INT
PROPERTIES
Name #OrigTableId
AllowEditOnCreate #No
AllowEdit #No
Table #MarkupTrans
ExtendedDataType
ARRAY
#MarkupTransOrigRefTableId
#
ENDARRAY
ENDPROPERTIES
FIELD #ModuleType
Id 20
ENUM
PROPERTIES
Name #ModuleType
AllowEditOnCreate #No
AllowEdit #No
Table #MarkupTrans
ExtendedDataType
ARRAY
#MarkupModule
#
ENDARRAY
EnumType #ModuleInventCustVend
ENDPROPERTIES
FIELD #Keep
Id 22
ENUM
PROPERTIES
Name #Keep
Table #MarkupTrans
ExtendedDataType
ARRAY
#MarkupKeep
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #CalculatedAmount
Id 23
REAL
PROPERTIES
Name #CalculatedAmount
Label #@SYS69023
HelpText #@SYS69024
AllowEditOnCreate #No
AllowEdit #No
Table #MarkupTrans
ExtendedDataType
ARRAY
#AmountCur
#
ENDARRAY
ENDPROPERTIES
FIELD #InterCompanyRefRecId
Id 24
INT64
PROPERTIES
Name #InterCompanyRefRecId
AllowEditOnCreate #No
AllowEdit #No
Table #MarkupTrans
ExtendedDataType
ARRAY
#RefRecId
#
ENDARRAY
ENDPROPERTIES
FIELD #InterCompanyMarkupValue
Id 25
REAL
PROPERTIES
Name #InterCompanyMarkupValue
AllowEditOnCreate #No
AllowEdit #No
Table #MarkupTrans
ExtendedDataType
ARRAY
#InterCompanyMarkupValue
#
ENDARRAY
ENDPROPERTIES
FIELD #DocumentStatus
Id 26
ENUM
PROPERTIES
Name #DocumentStatus
AllowEditOnCreate #No
AllowEdit #No
Table #MarkupTrans
EnumType #DocumentStatus
ENDPROPERTIES
FIELD #InterCompanyMarkupUseValue
Id 27
ENUM
PROPERTIES
Name #InterCompanyMarkupUseValue
AllowEditOnCreate #No
AllowEdit #No
Table #MarkupTrans
ExtendedDataType
ARRAY
#InterCompanyMarkupUseValue
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #InterCompanyInvoiceId
Id 28
STRING
PROPERTIES
Name #InterCompanyInvoiceId
AllowEditOnCreate #No
AllowEdit #No
Table #MarkupTrans
ExtendedDataType
ARRAY
#InterCompanyInvoiceId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #InterCompanySkipUpdate
Id 29
ENUM
PROPERTIES
Name #InterCompanySkipUpdate
SaveContents #No
AllowEditOnCreate #No
AllowEdit #No
Visible #No
Table #MarkupTrans
ExtendedDataType
ARRAY
#TradeSkipUpdate
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #InterCompanyCompanyId
Id 34
STRING
PROPERTIES
Name #InterCompanyCompanyId
AllowEditOnCreate #No
AllowEdit #No
Table #MarkupTrans
ExtendedDataType
ARRAY
#InterCompanyCompanyId
#
ENDARRAY
StringSize #4
ENDPROPERTIES
FIELD #BPLImpFolderId
Id 20001
STRING
PROPERTIES
Name #BPLImpFolderId
AllowEditOnCreate #No
AllowEdit #No
Table #MarkupTrans
ExtendedDataType
ARRAY
#BPLImpFolderId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #BPLAllocationDate
Id 20002
DATE
PROPERTIES
Name #BPLAllocationDate
AllowEditOnCreate #No
AllowEdit #No
Table #MarkupTrans
ExtendedDataType
ARRAY
#BPLAllocationDate
#
ENDARRAY
ENDPROPERTIES
ENDFIELDS
GROUPS
GROUP #AutoReport
PROPERTIES
Name #AutoReport
ENDPROPERTIES
GROUPFIELDS
#LineNum
#MarkupCode
#CurrencyCode
#Value
#TaxAmount
#Voucher
#Txt
#TaxGroup
#TaxItemGroup
ENDGROUPFIELDS
ENDGROUP
GROUP #Administration
PROPERTIES
Name #Administration
Label #@SYS9853
ENDPROPERTIES
GROUPFIELDS
#TransTableId
#TransRecId
#TaxAutogenerated
#ModuleCategory
#LineNum
#OrigRecId
#OrigTableId
#ModuleType
#Keep
#DocumentStatus
ENDGROUPFIELDS
ENDGROUP
GROUP #BPLAllFields
PROPERTIES
Name #BPLAllFields
Label #@BPL141
ENDPROPERTIES
GROUPFIELDS
#BPLImpFolderId
#BPLAllocationDate
ENDGROUPFIELDS
ENDGROUP
GROUP #BPLImpFolder
PROPERTIES
Name #BPLImpFolder
Label #@BPL94
ENDPROPERTIES
GROUPFIELDS
#BPLImpFolderId
#BPLAllocationDate
ENDGROUPFIELDS
ENDGROUP
GROUP #BPLPruchaseOrder
PROPERTIES
Name #BPLPruchaseOrder
Label #@SYS15812
ENDPROPERTIES
GROUPFIELDS
#BPLPurchId
#BPLItemId
#BPLItemName
ENDGROUPFIELDS
ENDGROUP
GROUP #InterCompany
PROPERTIES
Name #InterCompany
Label #@SYS74106
ENDPROPERTIES
GROUPFIELDS
#InterCompanyCompanyId
#InterCompanyInvoiceId
ENDGROUPFIELDS
ENDGROUP
GROUP #InterCompanyInfo
PROPERTIES
Name #InterCompanyInfo
Label #@SYS112324
ENDPROPERTIES
GROUPFIELDS
#InterCompanyRefRecId
#InterCompanyMarkupValue
#InterCompanyMarkupUseValue
ENDGROUPFIELDS
ENDGROUP
GROUP #Ledger
PROPERTIES
Name #Ledger
Label #@SYS13356
ENDPROPERTIES
GROUPFIELDS
#Voucher
#TransDate
#Posted
ENDGROUPFIELDS
ENDGROUP
GROUP #MiscCharges
PROPERTIES
Name #MiscCharges
Label #@SYS8371
ENDPROPERTIES
GROUPFIELDS
#ModuleType
#MarkupCode
#Txt
#CurrencyCode
#Value
#MarkupCategory
#BPLChargeItemId
ENDGROUPFIELDS
ENDGROUP
GROUP #SalesTax
PROPERTIES
Name #SalesTax
Label #@SYS5878
ENDPROPERTIES
GROUPFIELDS
#TaxGroup
#TaxAmount
#TaxItemGroup
#TaxWriteCode
ENDGROUPFIELDS
ENDGROUP
GROUP #SalesTaxGroup
PROPERTIES
Name #SalesTaxGroup
Label #@SYS68899
ENDPROPERTIES
GROUPFIELDS
#TaxGroup
#TaxItemGroup
ENDGROUPFIELDS
ENDGROUP
GROUP #Value
PROPERTIES
Name #Value
Label #@SYS11762
ENDPROPERTIES
GROUPFIELDS
#CalculatedAmount
ENDGROUPFIELDS
ENDGROUP
ENDGROUPS
INDICES
#TableRecIdIdx
Id 1
PROPERTIES
Name #TableRecIdIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#TransRecId
#TransTableId
#LineNum
ENDINDEXFIELDS
#InterCompanyRefIdx
Id 2
PROPERTIES
Name #InterCompanyRefIdx
ENDPROPERTIES
INDEXFIELDS
#InterCompanyRefRecId
ENDINDEXFIELDS
#OrigTableRecIdIdx
Id 3
PROPERTIES
Name #OrigTableRecIdIdx
ENDPROPERTIES
INDEXFIELDS
#OrigTableId
#OrigRecId
ENDINDEXFIELDS
ENDINDICES
REFERENCES
REFERENCE #Common
PROPERTIES
Name #Common
Table #Common
Validate #No
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransTableId
RelatedField #TableId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransRecId
RelatedField #RecId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #CommonInterCompany
PROPERTIES
Name #CommonInterCompany
Table #Common
Validate #No
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #TableId
RelatedField #TableId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #InterCompanyRefRecId
RelatedField #RecId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #CommonOrig
PROPERTIES
Name #CommonOrig
Table #Common
Validate #No
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #OrigTableId
RelatedField #TableId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #OrigRecId
RelatedField #RecId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #CustInvoiceJour
PROPERTIES
Name #CustInvoiceJour
Table #CustInvoiceJour
Validate #No
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransTableId
RelatedField #TableId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransRecId
RelatedField #RecId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #CustInvoiceTable
PROPERTIES
Name #CustInvoiceTable
Table #CustInvoiceTable
Validate #No
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransTableId
RelatedField #TableId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransRecId
RelatedField #RecId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #CustInvoiceTrans
PROPERTIES
Name #CustInvoiceTrans
Table #CustInvoiceTrans
Validate #No
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransTableId
RelatedField #TableId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransRecId
RelatedField #RecId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #MarkupTable
PROPERTIES
Name #MarkupTable
Table #MarkupTable
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #MarkupCode
RelatedField #MarkupCode
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #ModuleType
RelatedField #ModuleType
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #PurchLine
PROPERTIES
Name #PurchLine
Table #PurchLine
Validate #No
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransTableId
RelatedField #TableId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransRecId
RelatedField #RecId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #PurchLineOrig
PROPERTIES
Name #PurchLineOrig
Table #PurchLine
Validate #No
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #OrigTableId
RelatedField #TableId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #OrigRecId
RelatedField #RecId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #PurchParmLine
PROPERTIES
Name #PurchParmLine
Table #PurchParmLine
Validate #No
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransTableId
RelatedField #TableId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransRecId
RelatedField #RecId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #PurchParmSubTable
PROPERTIES
Name #PurchParmSubTable
Table #PurchParmSubTable
Validate #No
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransTableId
RelatedField #TableId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransRecId
RelatedField #RecId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #PurchParmTable
PROPERTIES
Name #PurchParmTable
Table #PurchParmTable
Validate #No
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransTableId
RelatedField #TableId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransRecId
RelatedField #RecId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #PurchReqLine
PROPERTIES
Name #PurchReqLine
Table #PurchReqLine
Validate #No
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransTableId
RelatedField #TableId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransRecId
RelatedField #RecId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #PurchTable
PROPERTIES
Name #PurchTable
Table #PurchTable
Validate #No
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransTableId
RelatedField #TableId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransRecId
RelatedField #RecId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #PurchTableOrig
PROPERTIES
Name #PurchTableOrig
Table #PurchTable
Validate #No
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #OrigTableId
RelatedField #TableId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #OrigRecId
RelatedField #RecId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #SalesLine
PROPERTIES
Name #SalesLine
Table #SalesLine
Validate #No
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransTableId
RelatedField #TableId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransRecId
RelatedField #RecId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #SalesLineOrig
PROPERTIES
Name #SalesLineOrig
Table #SalesLine
Validate #No
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #OrigTableId
RelatedField #TableId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #OrigRecId
RelatedField #RecId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #SalesQuotationLine
PROPERTIES
Name #SalesQuotationLine
Table #SalesQuotationLine
Validate #No
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransTableId
RelatedField #TableId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransRecId
RelatedField #RecId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #SalesQuotationTable
PROPERTIES
Name #SalesQuotationTable
Table #SalesQuotationTable
Validate #No
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransTableId
RelatedField #TableId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransRecId
RelatedField #RecId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #SalesTable
PROPERTIES
Name #SalesTable
Table #SalesTable
Validate #No
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransTableId
RelatedField #TableId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransRecId
RelatedField #RecId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #SalesTableOrig
PROPERTIES
Name #SalesTableOrig
Table #SalesTable
Validate #No
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #OrigTableId
RelatedField #TableId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #OrigRecId
RelatedField #RecId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #VendInvoiceInfoLine
PROPERTIES
Name #VendInvoiceInfoLine
Table #VendInvoiceInfoLine
Validate #No
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransTableId
RelatedField #TableId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransRecId
RelatedField #RecId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #VendInvoiceInfoSubTable
PROPERTIES
Name #VendInvoiceInfoSubTable
Table #VendInvoiceInfoSubTable
Validate #No
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransRecId
RelatedField #RecId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransTableId
RelatedField #TableId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #VendInvoiceInfoTable
PROPERTIES
Name #VendInvoiceInfoTable
Table #VendInvoiceInfoTable
Validate #No
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransTableId
RelatedField #TableId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransRecId
RelatedField #RecId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #VendReqJour
PROPERTIES
Name #VendReqJour
Table #VendReqJour
Validate #No
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransTableId
RelatedField #TableId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransRecId
RelatedField #RecId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #VendReqTrans
PROPERTIES
Name #VendReqTrans
Table #VendReqTrans
Validate #No
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransTableId
RelatedField #TableId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #TransRecId
RelatedField #RecId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
ENDREFERENCES
DELETEACTIONS
ENDDELETEACTIONS
METHODS
Version: 3
SOURCE #BPLChargeItemId
#// Israel-Localisation-Prodware-ImportFolder
#Display BPLChargeItemId BPLChargeItemId()
#{
# return this.markupTable().BPLChargeItemId;
#}
#
ENDSOURCE
SOURCE #BPLItemId
#// Israel-Localisation-Prodware-ImportFolder-Begin
#display ItemId BPLItemId()
#{
# PurchLine purchLine;
#
# if (this.TransTableId == tablenum(PurchLine))
# purchLine = PurchLine::findRecId(this.TransRecId);
# return purchLine.ItemId;
#}
#
ENDSOURCE
SOURCE #BPLItemName
#// Israel-Localisation-Prodware-ImportFolder
#Display ItemNameDisplay BPLItemName()
#{
# PurchLine purchLine;
#
# if (this.TransTableId == tablenum(PurchLine))
# purchLine = PurchLine::findRecId(this.TransRecId);
# return purchLine.itemName();
#}
#
ENDSOURCE
SOURCE #BPLPurchId
#// Israel-Localisation-Prodware-ImportFolder
#display PurchId BPLPurchId()
#{
# PurchLine purchLine;
#
# if (this.TransTableId == tablenum(PurchLine))
# purchLine = PurchLine::findRecId(this.TransRecId);
# return purchLine.PurchId;
#}
#
ENDSOURCE
SOURCE #checkCurrencyCode
#boolean checkCurrencyCode()
#{
# CurrencyCodeMap parent;
# ;
#
# switch (this.TransTableId)
# {
# case tablenum(PurchParmSubTable):
# parent = PurchParmSubTable::findRecId(this.TransRecId).purchParmTable();
# break;
#
# default:
# parent = this.parentRecord();
# break;
#
# }
# return parent.CurrencyCode == this.CurrencyCode;
#}
#
#
ENDSOURCE
SOURCE #checkMarkupCategory
#boolean checkMarkupCategory()
#{
# boolean ok = true;
# PurchTable purchTable;
# PurchLine purchLine;
# SalesTable salesTable;
# SalesLine salesLine;
# ;
#
# if (this.TransTableId == tablenum(SalesTable) ||
# this.TransTableId == tablenum(PurchTable) ||
# this.TransTableId == tablenum(CustInvoiceTable) ||
# this.TransTableId == tablenum(PurchParmTable) ||
# this.TransTableId == tablenum(PurchParmSubTable))
# {
# if (this.MarkupCategory == MarkupCategory::Pcs)
# {
# ok = checkFailed("@SYS28725");
# }
# }
#
# if (this.MarkupCategory == MarkupCategory::InterCompanyPercent)
# {
# switch(this.TransTableId)
# {
# case(tablenum(PurchLine)):
# purchLine = PurchLine::findRecId(this.TransRecId);
# purchTable = purchLine.purchTable();
# if (!purchTable.isInterCompanyOrder()
# || (purchTable.isInterCompanyOrder() && !purchTable.InterCompanyOriginalSalesId))
# {
# ok = checkFailed("@SYS98799");
# }
# break;
# case(tablenum(SalesLine)):
# salesLine = SalesLine::findRecId(this.TransRecId);
# salesTable = salesLine.salesTable();
# if (!salesTable.isInterCompanyOrder()
# || (salesTable.isInterCompanyOrder() && !salesTable.InterCompanyOriginalSalesId))
# {
# ok = checkFailed("@SYS98799");
# }
# break;
# default:
# ok = checkFailed("@SYS98798");
# break;
# }
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #CheckMarkupCode
#boolean checkMarkupCode()
#{
# boolean ok = true;
# boolean itemMarkupAllowed = false;
# MarkupTable markupTable;
# ;
#
# if (! MarkupTable::exist(this.ModuleType, this.MarkupCode))
# ok = checkFailed(strfmt("@SYS3641", this.MarkupCode));
#
# if ((this.TransTableId == tablenum(PurchTable) ||
# this.TransTableId == tablenum(PurchLine) ||
# this.TransTableId == tablenum(PurchParmTable) ||
# this.TransTableId == tablenum(PurchParmSubTable) ||
# this.TransTableId == tablenum(PurchParmLine) ||
# this.TransTableId == tablenum(PurchRFQCaseTable) ||
# this.TransTableId == tablenum(PurchRFQCaseLine) ||
# this.TransTableId == tablenum(PurchRFQTable) ||
# this.TransTableId == tablenum(PurchRFQLine) ||
# this.TransTableId == tablenum(PurchReqLine) ||
# this.TransTableId == tablenum(VendReqTrans) ||
# this.TransTableId == tablenum(VendInvoiceJour)))
# {
# itemMarkupAllowed = true;
# }
#
# if (this.ModuleCategory == HeadingLine::Linie)
# {
# if (this.TransTableId == tablenum(MarkupTable))
# {
# itemMarkupAllowed = true;
# }
# }
#
# if (!itemMarkupAllowed)
# {
# markupTable = this.markupTable();
# if (markupTable.CustType == MarkupType::Item ||
# markupTable.VendType == MarkupType::Item)
# {
# ok = checkFailed("@SYS16770");
# }
# }
#
# return ok;
#}
#
ENDSOURCE
SOURCE #checkMarkupCodeAdjustment
#boolean checkMarkupCodeAdjustment()
#{
# boolean ok = true;
#
# if (this.markupTable().CustType != MarkupType::Item)
# ok = checkFailed("@SYS12360");
#
# if (this.markupTable().VendType != MarkupType::LedgerAccount)
# ok = checkFailed("@SYS1759");
#
# return ok;
#
#}
ENDSOURCE
SOURCE #checkTaxCombination
#boolean checkTaxCombination()
#{;
# if (this.TaxGroup && this.TaxItemGroup && (!this.taxCombinationAllowed() || !this.checkCurrencyCode()))
# return checkFailed("@SYS22772");
#
# return true;
#}
ENDSOURCE
SOURCE #connectedFrom
#///
#/// Calculates a displayable value that indicates how a MarkupTrans record is connected from another MarkupTrans record.
#///
#///
#/// A displayable value indicates the source of the connection.
#///
#//BP Deviation Documented
#display server MarkupConnectedFrom connectedFrom()
#{
# Set nums = this.connectedFromSet();
# SetEnumerator numsEnum;
# ;
# if(!hasFieldAccess(tablenum(PurchParmTable), fieldnum(PurchParmTable, Num), AccessType::View) ||
# !hasFieldAccess(tablenum(VendInvoiceInfoTable), fieldnum(VendInvoiceInfoTable, Num), AccessType::View))
# error("@SYS57330");
# switch(nums.elements())
# {
# case 0:
# return '';
# case 1:
# numsEnum = nums.getEnumerator();
# numsEnum.moveNext();
# return strlen(numsEnum.current()) == 0 ? "@SYS119279" : numsEnum.current();
# }
# return '*';
#}
ENDSOURCE
SOURCE #connectedFromSet
#///
#/// Calculates identifiers for a MarkupTrans record that is connected from another MarkupTrans record.
#///
#///
#/// A set of document numbers.
#///
#public server Set connectedFromSet()
#{
# Set nums = new Set(Types::String);
#
# PurchParmTable purchParmTable;
# PurchParmSubTable purchParmSubTable;
# PurchParmLine purchParmLine;
#
# VendInvoiceInfoTable vendInvoiceInfoTable;
# VendInvoiceInfoSubTable vendInvoiceInfoSubTable;
# VendInvoiceInfoLine vendInvoiceInfoLine;
#
# MarkupTrans fromTrans;
#
# void addNum(RefRecId _recId, Num _num)
# {
# ;
# if(_recId)
# {
# nums.add(_num);
# }
# }
# ;
# while select fromTrans
# where this.TableId == fromTrans.OrigTableId && this.RecId == fromTrans.OrigRecId
# {
# switch(fromTrans.TransTableId)
# {
# case tablenum(PurchParmTable):
# select firstonly RecId, Num from purchParmTable
# where purchParmTable.RecId == fromTrans.TransRecId &&
# purchParmTable.ParmJobStatus == ParmJobStatus::Waiting;
# addNum(purchParmTable.RecId, purchParmTable.Num);
# break;
# case tablenum(PurchParmSubTable):
# select firstonly RecId, Num from purchParmTable
# where purchParmTable.ParmJobStatus == ParmJobStatus::Waiting
# exists join purchParmSubTable
# where purchParmSubTable.RecId == fromTrans.TransRecId &&
# purchParmSubTable.ParmId == purchParmTable.ParmId &&
# purchParmSubTable.TableRefId == purchParmTable.TableRefId;
# addNum(purchParmTable.RecId, purchParmTable.Num);
# break;
# case tablenum(PurchParmLine):
# select firstonly RecId, Num from purchParmTable
# where purchParmTable.ParmJobStatus == ParmJobStatus::Waiting
# exists join purchParmLine
# where purchParmLine.RecId == fromTrans.TransRecId &&
# purchParmLine.ParmId == purchParmTable.ParmId &&
# purchParmLine.TableRefId == purchParmTable.TableRefId;
# addNum(purchParmTable.RecId, purchParmTable.Num);
# break;
# case tablenum(VendInvoiceInfoTable):
# select firstonly RecId, Num from vendInvoiceInfoTable
# where vendInvoiceInfoTable.RecId == fromTrans.TransRecId;
# addNum(vendInvoiceInfoTable.RecId, vendInvoiceInfoTable.Num);
# break;
# case tablenum(VendInvoiceInfoSubTable):
# select firstonly RecId, Num from vendInvoiceInfoTable
# exists join vendInvoiceInfoSubTable
# where vendInvoiceInfoSubTable.RecId == fromTrans.TransRecId &&
# vendInvoiceInfoSubTable.TableRefId == vendInvoiceInfoTable.TableRefId;
# addNum(vendInvoiceInfoTable.RecId, vendInvoiceInfoTable.Num);
# break;
# case tablenum(VendInvoiceInfoLine):
# select firstonly RecId, Num from vendInvoiceInfoTable
# exists join vendInvoiceInfoLine
# where vendInvoiceInfoLine.RecId == fromTrans.TransRecId &&
# vendInvoiceInfoLine.TableRefId == vendInvoiceInfoTable.TableRefId;
# addNum(vendInvoiceInfoTable.RecId, vendInvoiceInfoTable.Num);
# break;
# }
# }
# return nums;
#}
ENDSOURCE
SOURCE #connectedTo
#///
#/// Calculates a displayable value indicates how a MarkupTrans record is connected to another MarkupTrans record.
#///
#///
#/// A displayable value indicates the destination of the connection.
#///
#//BP Deviation Documented
#display MarkupConnectedTo connectedTo()
#{
# MarkupTrans toTrans;
# str connected = '';
# ;
# if(this.OrigTableId == this.TableId)
# {
# toTrans = this.findOrig();
# if(toTrans)
# {
# switch(toTrans.TransTableId)
# {
# case tablenum(PurchTable):
# if(!hasFieldAccess(tablenum(PurchTable), fieldnum(PurchTable, PurchId),AccessType::View))
# error("@SYS57330");
# connected = (select firstonly PurchId from purchTable where purchTable.RecId == toTrans.TransRecId).PurchId;
# break;
# case tablenum(PurchLine):
# if(!hasFieldAccess(tablenum(PurchLine), fieldnum(PurchLine, PurchId),AccessType::View))
# error("@SYS57330");
# connected = (select firstonly PurchId from purchLine where purchLine.RecId == toTrans.TransRecId).PurchId;
# break;
# }
# }
# }
# return connected;
#}
ENDSOURCE
SOURCE #convertCurrencyCode
#client server
#void convertCurrencyCode(CurrencyCode currencyCode,
# TransDate exchRateDate = systemdateget())
#{
# if (this.isMarkupOfTypeCustVend())
# {
# if (this.MarkupCategory != MarkupCategory::Percent)
# this.Value = Currency::curAmount2CurAmount(this.Value, this.CurrencyCode, currencyCode,exchRateDate);
#
# this.CurrencyCode = currencyCode;
# }
#}
ENDSOURCE
SOURCE #delete
#public void delete()
#{
# InterCompanyMarkup interCompanyMarkup;
#;
# try
# {
# ttsbegin;
# if (!this.InterCompanySkipUpdate
# && this.InterCompanyRefRecId)
# {
# interCompanyMarkup = InterCompanyMarkup::construct(InterCompanyMarkupAction::Delete,this);
# interCompanyMarkup.run();
# }
#
# super();
#
# ttscommit;
# }
# catch(Exception::Error)
# {
# ttsabort;
# throw error("@SYS93835");
# }
#}
#
ENDSOURCE
SOURCE #EditingAllowed
#/*
# AOSRunMode::Called
#*/
#boolean editingAllowed()
#{
# boolean editing = true;
# ;
#
# if (this.Voucher)
# editing = false;
# if (this.Voucher
# || this.InterCompanyInvoiceId)
#
# editing = false;
#
# if (editing)
# {
# editing = this.interCompanyCreateAllowed();
# }
#
# return editing;
#}
#
ENDSOURCE
SOURCE #excludeFromUpdate
#/**
# Returns true if the markup should be excluded when doing
# totals calculations for Packing slip and Picking list updates
#**/
#boolean excludeFromUpdate(DocumentStatus _documentStatus)
#{
# boolean ret = false;
#
# if (this.Keep)
# return ret;
#
# switch (_documentStatus)
# {
# case DocumentStatus::PickingList:
# ret = (this.DocumentStatus == DocumentStatus::PickingList || this.DocumentStatus == DocumentStatus::PackingSlip);
# break;
#
# case DocumentStatus::PackingSlip:
# ret = this.DocumentStatus == DocumentStatus::PackingSlip;
# break;
#
# default:
# ret = false;
# }
#
# return ret;
#}
ENDSOURCE
SOURCE #findOrig
#///
#/// Finds the original MarkupTrans for the current MarkupTrans.
#///
#///
#/// true if the record will be updates; otherwise, false.
#///
#///
#/// A MarkupTrans record.
#///
#MarkupTrans findOrig(boolean update = false)
#{
# MarkupTrans origMarkupTrans;
# ;
# if(this.OrigTableId && this.OrigRecId)
# {
# origMarkupTrans.selectForUpdate(update);
# select firstonly origMarkupTrans
# where origMarkupTrans.TableId == this.OrigTableId &&
# origMarkupTrans.RecId == this.OrigRecId;
# }
# return origMarkupTrans;
#}
ENDSOURCE
SOURCE #initFromCaller
#void initFromCaller(tableId callerTableId, Common callerRecord)
#{
# switch(callerTableId)
# {
# case tablenum(SalesTable) : this.initFromSalesTable (callerRecord);
# break;
# case tablenum(SalesLine) : this.initFromSalesLine (callerRecord);
# break;
# case tablenum(SalesQuotationTable) : this.initFromSalesQuotationTable (callerRecord);
# break;
# case tablenum(SalesQuotationLine) : this.initFromSalesQuotationLine (callerRecord);
# break;
# case tablenum(PurchTable) : this.initFromPurchTable (callerRecord);
# break;
# case tablenum(PurchLine) : this.initFromPurchLine (callerRecord);
# break;
# case tablenum(PurchParmLine) : this.initFromPurchParmLine (callerRecord);
# break;
# case tablenum(PurchParmTable) : this.initFromPurchParmTable (callerRecord);
# break;
# case tablenum(PurchParmSubTable) : this.initFromPurchParmSubTable (callerRecord);
# break;
# case tablenum(PurchRFQCaseTable) : this.initFromPurchRFQCaseTable (callerRecord);
# break;
# case tablenum(PurchRFQCaseLine) : this.initFromPurchRFQCaseLine (callerRecord);
# break;
# case tablenum(PurchRFQTable) : this.initFromPurchRFQTable (callerRecord);
# break;
# case tablenum(PurchRFQLine) : this.initFromPurchRFQLine (callerRecord);
# break;
# case tablenum(PurchReqLine) : this.initFromPurchReqLine (callerRecord);
# break;
# case tablenum(VendReqTrans) : this.initFromVendReqTrans (callerRecord);
# break;
# case tablenum(VendInvoiceInfoTable) : this.initFromVendInvoiceInfoTable(callerRecord);
# break;
# case tablenum(VendInvoiceInfoSubTable): this.initFromVendInvoiceInfoSubTable(callerRecord);
# break;
# case tablenum(VendInvoiceInfoLine) : this.initFromVendInvoiceInfoLine (callerRecord);
# break;
# case tablenum(VendInvoiceJour) : this.initFromVendInvoiceJour (callerRecord);
# break;
# case tablenum(VendInvoiceTrans) : this.initFromVendInvoiceTrans (callerRecord);
# break;
# case tablenum(CustInvoiceTable) : this.initFromCustInvoiceTable (callerRecord);
# break;
# case tablenum(SalesBasket) : this.initFromSalesBasket (callerRecord);
# break;
# case tablenum(SalesBasketLine) : this.initFromSalesBasketLine (callerRecord);
# break;
# }
#}
#
ENDSOURCE
SOURCE #initFromCustInvoiceTable
#void initFromCustInvoiceTable(CustInvoiceTable custInvoiceTable)
#{
# this.ModuleType = ModuleInventCustVend::Cust;
# this.TransTableId = custInvoiceTable.TableId;
# this.TransRecId = custInvoiceTable.RecId;
# this.CurrencyCode = custInvoiceTable.CurrencyCode;
# this.TaxGroup = this.TaxGroup ? this.TaxGroup : custInvoiceTable.TaxGroup;
# if (!this.taxCombinationAllowed())
# this.TaxItemGroup = '';
#}
ENDSOURCE
SOURCE #InitFromMarkupAutoLine
#void initFromMarkupAutoLine(MarkupAutoLine markupAutoLine)
#{
# this.ModuleType = markupAutoLine.ModuleType;
# this.ModuleCategory = markupAutoLine.ModuleCategory;
# this.MarkupCode = markupAutoLine.MarkupCode;
# this.Txt = markupAutoLine.Txt;
# this.Value = markupAutoLine.Value;
# this.MarkupCategory = markupAutoLine.MarkupCategory;
# this.CurrencyCode = markupAutoLine.MarkupCurrencyCode;
# this.TaxGroup = this.TaxGroup ? this.TaxGroup : markupAutoLine.TaxGroup;
# this.TaxItemGroup = this.TaxItemGroup ? this.TaxItemGroup : markupAutoLine.TaxItemGroup;
# if (!this.taxCombinationAllowed())
# this.TaxItemGroup = '';
# this.Keep = markupAutoLine.Keep;
#}
#
ENDSOURCE
SOURCE #InitFromMarkupTable
#void initFromMarkupTable(MarkupTable markupTable)
#{
# this.ModuleType = markupTable.ModuleType;
# this.MarkupCode = markupTable.MarkupCode;
# this.Txt = markupTable.Txt;
# this.TaxItemGroup = markupTable.TaxItemGroup;
# if (!this.taxCombinationAllowed())
# this.TaxItemGroup = '';
#}
ENDSOURCE
SOURCE #InitFromMarkupTrans
#void initFromMarkupTrans(MarkupTrans source)
#{
# this.ModuleType = source.ModuleType;
# this.MarkupCategory = source.MarkupCategory;
# this.LineNum = source.LineNum;
# this.Txt = source.Txt;
# this.MarkupCode = source.MarkupCode;
# this.CurrencyCode = source.CurrencyCode;
# this.TaxGroup = this.TaxGroup ? this.TaxGroup : source.TaxGroup;
# this.TaxItemGroup = this.TaxItemGroup ? this.TaxItemGroup : source.TaxItemGroup;
# if (!this.taxCombinationAllowed())
# this.TaxItemGroup = '';
# this.Keep = source.Keep;
#}
#
ENDSOURCE
SOURCE #InitFromPurchLine
#void initFromPurchLine(PurchLine purchLine)
#{
# this.ModuleType = ModuleInventCustVend::Vend;
# this.TransTableId = purchLine.TableId;
# this.TransRecId = purchLine.RecId;
# this.CurrencyCode = purchLine.CurrencyCode;
# this.TaxGroup = this.TaxGroup ? this.TaxGroup : purchLine.TaxGroup;
# if (!this.taxCombinationAllowed())
# this.TaxItemGroup = '';
# if (purchLine.PurchaseType == PurchaseType::Subscription)
# this.Keep = NoYes::Yes;
#}
#
ENDSOURCE
SOURCE #initFromPurchParmLine
#///
#/// Initializes a MarkupTrans table record from an associated PurchParmLine table record.
#///
#///
#/// A PurchParmLine table record.
#///
#public void initFromPurchParmLine(PurchParmLine _purchParmLine)
#{
# ;
# this.ModuleType = ModuleInventCustVend::Vend;
# this.TransTableId = _purchParmLine.TableId;
# this.TransRecId = _purchParmLine.RecId;
# this.CurrencyCode = _purchParmLine.CurrencyCode;
# this.TaxGroup = this.TaxGroup ? this.TaxGroup : PurchLine::findRecId(_purchParmLine.PurchLineRecId).TaxGroup;
# if (!this.taxCombinationAllowed())
# this.TaxItemGroup = '';
#}
ENDSOURCE
SOURCE #initFromPurchParmSubTable
#///
#/// Initializes a MarkupTrans table record from an associated PurchParmSubTable table record.
#///
#///
#/// A PurchParmSubTable table record.
#///
#public void initFromPurchParmSubTable(PurchParmSubTable _purchParmSubTable)
#{
# PurchParmTable purchParmTable = PurchParmTable::find(_purchParmSubTable.ParmId, _purchParmSubTable.TableRefId);
# ;
# this.ModuleType = ModuleInventCustVend::Vend;
# this.TransTableId = _purchParmSubTable.TableId;
# this.TransRecId = _purchParmSubTable.RecId;
# this.CurrencyCode = purchParmTable.CurrencyCode;
# this.TaxGroup = this.TaxGroup ? this.TaxGroup : PurchTable::find(_purchParmSubTable.OrigPurchId).TaxGroup;
# if (!this.taxCombinationAllowed())
# this.TaxItemGroup = '';
#}
ENDSOURCE
SOURCE #initFromPurchParmTable
#///
#/// Initializes a MarkupTrans table record from an associated PurchParmTable table record.
#///
#///
#/// A PurchParmTable table record.
#///
#public void initFromPurchParmTable(PurchParmTable _purchParmTable)
#{
# ;
# this.ModuleType = ModuleInventCustVend::Vend;
# this.TransTableId = _purchParmTable.TableId;
# this.TransRecId = _purchParmTable.RecId;
# this.CurrencyCode = _purchParmTable.CurrencyCode;
# this.TaxGroup = this.TaxGroup ? this.TaxGroup : PurchTable::find(_purchParmTable.PurchId).TaxGroup;
# if (!this.taxCombinationAllowed())
# this.TaxItemGroup = '';
#}
ENDSOURCE
SOURCE #initFromPurchReqLine
#void initFromPurchReqLine(PurchReqLine _purchReqLine)
#{
# this.ModuleType = ModuleInventCustVend::Vend;
# this.TransTableId = _purchReqLine.TableId;
# this.TransRecId = _purchReqLine.RecId;
# this.CurrencyCode = _purchReqLine.CurrencyCode;
# this.TaxGroup = this.TaxGroup ? this.TaxGroup : _purchReqLine.TaxGroup;
#
# if (!this.taxCombinationAllowed())
# {
# this.TaxItemGroup = '';
# }
#}
ENDSOURCE
SOURCE #initFromPurchRFQCaseLine
#void initFromPurchRFQCaseLine(PurchRFQCaseLine purchRFQCaseLine)
#{
# this.ModuleType = ModuleInventCustVend::Vend;
# this.TransTableId = purchRFQCaseLine.TableId;
# this.TransRecId = purchRFQCaseLine.RecId;
# this.CurrencyCode = purchRFQCaseLine.CurrencyCode;
# if (!this.taxCombinationAllowed())
# this.TaxItemGroup = '';
#}
ENDSOURCE
SOURCE #initFromPurchRFQCaseTable
#void initFromPurchRFQCaseTable(PurchRFQCaseTable purchRFQCaseTable)
#{
# this.ModuleType = ModuleInventCustVend::Vend;
# this.TransTableId = purchRFQCaseTable.TableId;
# this.TransRecId = purchRFQCaseTable.RecId;
# this.CurrencyCode = purchRFQCaseTable.CurrencyCode;
# if (!this.taxCombinationAllowed())
# this.TaxItemGroup = '';
#}
#
ENDSOURCE
SOURCE #initFromPurchRFQLine
#void initFromPurchRFQLine(PurchRFQLine purchRFQLine)
#{
# this.ModuleType = ModuleInventCustVend::Vend;
# this.TransTableId = purchRFQLine.TableId;
# this.TransRecId = purchRFQLine.RecId;
# this.CurrencyCode = purchRFQLine.CurrencyCode;
# this.TaxGroup = this.TaxGroup ? this.TaxGroup : purchRFQLine.TaxGroup;
# if (!this.taxCombinationAllowed())
# this.TaxItemGroup = '';
#}
ENDSOURCE
SOURCE #initFromPurchRFQTable
#void initFromPurchRFQTable(PurchRFQTable purchRFQTable)
#{
# this.ModuleType = ModuleInventCustVend::Vend;
# this.TransTableId = purchRFQTable.TableId;
# this.TransRecId = purchRFQTable.RecId;
# this.CurrencyCode = purchRFQTable.CurrencyCode;
# this.TaxGroup = this.TaxGroup ? this.TaxGroup : purchRFQTable.TaxGroup;
# if (!this.taxCombinationAllowed())
# this.TaxItemGroup = '';
#}
ENDSOURCE
SOURCE #InitFromPurchTable
#void initFromPurchTable(PurchTable purchTable)
#{
# this.ModuleType = ModuleInventCustVend::Vend;
# this.TransTableId = purchTable.TableId;
# this.TransRecId = purchTable.RecId;
# this.CurrencyCode = purchTable.CurrencyCode;
# this.TaxGroup = this.TaxGroup ? this.TaxGroup : purchTable.TaxGroup;
# if (!this.taxCombinationAllowed())
# this.TaxItemGroup = '';
# if (purchTable.PurchaseType == PurchaseType::Subscription)
# this.Keep = NoYes::Yes;
#}
#
ENDSOURCE
SOURCE #initFromSalesBasket
#void initFromSalesBasket(SalesBasket salesBasket)
#{
# this.ModuleType = ModuleInventCustVend::Cust;
# this.TransTableId = salesBasket.TableId;
# this.TransRecId = salesBasket.RecId;
# this.CurrencyCode = salesBasket.CurrencyCode;
# this.TaxGroup = this.TaxGroup ? this.TaxGroup : salesBasket.taxGroup();
# if (!this.taxCombinationAllowed())
# this.TaxItemGroup = '';
#
#}
#
ENDSOURCE
SOURCE #initFromSalesBasketLine
#void initFromSalesBasketLine(SalesBasketLine salesBasketLine)
#{
# this.ModuleType = ModuleInventCustVend::Cust;
# this.TransTableId = salesBasketLine.TableId;
# this.TransRecId = salesBasketLine.RecId;
# this.CurrencyCode = salesBasketLine.CurrencyCode;
# this.TaxGroup = this.TaxGroup ? this.TaxGroup : salesBasketLine.TaxGroup;
# if (!this.taxCombinationAllowed())
# this.TaxItemGroup = '';
#}
ENDSOURCE
SOURCE #InitFromSalesLine
#void initFromSalesLine(SalesLine salesLine)
#{
# this.ModuleType = ModuleInventCustVend::Cust;
# this.TransTableId = salesLine.TableId;
# this.TransRecId = salesLine.RecId;
# this.CurrencyCode = salesLine.CurrencyCode;
# this.TaxGroup = this.TaxGroup ? this.TaxGroup : salesLine.TaxGroup;
# if (!this.taxCombinationAllowed())
# this.TaxItemGroup = '';
# if (salesLine.SalesType == SalesType::Subscription)
# this.Keep = NoYes::Yes;
#
#}
#
ENDSOURCE
SOURCE #initFromSalesQuotationLine
#void initFromSalesQuotationLine(SalesQuotationLine salesQuotationLine)
#{
# this.ModuleType = ModuleInventCustVend::Cust;
# this.TransTableId = salesQuotationLine.TableId;
# this.TransRecId = salesQuotationLine.RecId;
# this.CurrencyCode = salesQuotationLine.CurrencyCode;
# this.TaxGroup = this.TaxGroup ? this.TaxGroup : salesQuotationLine.TaxGroup;
# if (!this.taxCombinationAllowed())
# this.TaxItemGroup = '';
#}
#
ENDSOURCE
SOURCE #initFromSalesQuotationTable
#void initFromSalesQuotationTable(SalesQuotationTable salesQuotationTable)
#{
# this.ModuleType = ModuleInventCustVend::Cust;
# this.TransTableId = salesQuotationTable.TableId;
# this.TransRecId = salesQuotationTable.RecId;
# this.CurrencyCode = salesQuotationTable.CurrencyCode;
# this.TaxGroup = this.TaxGroup ? this.TaxGroup : salesQuotationTable.TaxGroup;
# if (!this.taxCombinationAllowed())
# this.TaxItemGroup = '';
#}
#
ENDSOURCE
SOURCE #InitFromSalesTable
#void initFromSalesTable(SalesTable salesTable)
#{
# this.ModuleType = ModuleInventCustVend::Cust;
# this.TransTableId = salesTable.TableId;
# this.TransRecId = salesTable.RecId;
# this.CurrencyCode = salesTable.CurrencyCode;
# this.TaxGroup = this.TaxGroup ? this.TaxGroup : salesTable.TaxGroup;
# if (!this.taxCombinationAllowed())
# this.TaxItemGroup = '';
# if (salesTable.SalesType == SalesType::Subscription)
# this.Keep = NoYes::Yes;
#}
#
ENDSOURCE
SOURCE #initFromVendInvoiceInfoLine
#///
#/// Initializes a MarkupTrans table record from an associated VendInvoiceInfoLine table record.
#///
#///
#/// A VendInvoiceInfoLine table record.
#///
#public void initFromVendInvoiceInfoLine(VendInvoiceInfoLine _vendInvoiceInfoLine)
#{
# ;
# this.ModuleType = ModuleInventCustVend::Vend;
# this.TransTableId = _vendInvoiceInfoLine.TableId;
# this.TransRecId = _vendInvoiceInfoLine.RecId;
# this.CurrencyCode = _vendInvoiceInfoLine.CurrencyCode;
# if (!this.taxCombinationAllowed())
# this.TaxItemGroup = '';
#}
ENDSOURCE
SOURCE #initFromVendInvoiceInfoSubTable
#///
#/// Initializes a MarkupTrans table record from an associated VendInvoiceInfoSubTable table record.
#///
#///
#/// A VendInvoiceInfoSubTable table record.
#///
#public void initFromVendInvoiceInfoSubTable(VendInvoiceInfoSubTable _vendInvoiceInfoSubTable)
#{
# VendInvoiceInfoTable vendInvoiceInfoTable = VendInvoiceInfoTable::find(_vendInvoiceInfoSubTable.TableRefId);
# ;
# this.ModuleType = ModuleInventCustVend::Vend;
# this.TransTableId = _vendInvoiceInfoSubTable.TableId;
# this.TransRecId = _vendInvoiceInfoSubTable.RecId;
# this.CurrencyCode = vendInvoiceInfoTable.CurrencyCode;
# if (!this.taxCombinationAllowed())
# this.TaxItemGroup = '';
#}
ENDSOURCE
SOURCE #initFromVendInvoiceInfoTable
#///
#/// Initializes a MarkupTrans table record from an associated VendInvoiceInfoTable table record.
#///
#///
#/// A VendInvoiceInfoTable table record.
#///
#public void initFromVendInvoiceInfoTable(VendInvoiceInfoTable _vendInvoiceInfoTable)
#{
# ;
# this.ModuleType = ModuleInventCustVend::Vend;
# this.TransTableId = _vendInvoiceInfoTable.TableId;
# this.TransRecId = _vendInvoiceInfoTable.RecId;
# this.CurrencyCode = _vendInvoiceInfoTable.CurrencyCode;
# if (!this.taxCombinationAllowed())
# this.TaxItemGroup = '';
#}
ENDSOURCE
SOURCE #InitFromVendInvoiceJour
#void initFromVendInvoiceJour(VendInvoiceJour vendInvoiceJour)
#{
# this.ModuleType = ModuleInventCustVend::Vend;
# this.TransTableId = vendInvoiceJour.TableId;
# this.TransRecId = vendInvoiceJour.RecId;
# this.CurrencyCode = vendInvoiceJour.CurrencyCode;
# this.TaxGroup = this.TaxGroup ? this.TaxGroup : vendInvoiceJour.TaxGroup;
# if (!this.taxCombinationAllowed())
# this.TaxItemGroup = '';
#}
#
ENDSOURCE
SOURCE #InitFromVendInvoiceTrans
#void initFromVendInvoiceTrans(VendInvoiceTrans vendInvoiceTrans)
#{
# this.ModuleType = ModuleInventCustVend::Vend;
# this.TransTableId = vendInvoiceTrans.TableId;
# this.TransRecId = vendInvoiceTrans.RecId;
# this.CurrencyCode = vendInvoiceTrans.CurrencyCode;
# this.TaxGroup = this.TaxGroup ? this.TaxGroup : vendInvoiceTrans.TaxGroup;
# this.TaxItemGroup = this.TaxItemGroup ? this.TaxItemGroup : vendInvoiceTrans.TaxItemGroup;
# if (!this.taxCombinationAllowed())
# this.TaxItemGroup = '';
#}
#
ENDSOURCE
SOURCE #initFromVendReqTrans
#void initFromVendReqTrans(VendReqTrans _vendReqTrans)
#{
# this.ModuleType = ModuleInventCustVend::Vend;
# this.TransTableId = _vendReqTrans.TableId;
# this.TransRecId = _vendReqTrans.RecId;
# this.CurrencyCode = _vendReqTrans.CurrencyCode;
#
# if (!this.taxCombinationAllowed())
# {
# this.TaxItemGroup = '';
# }
#}
ENDSOURCE
SOURCE #initModuleType
#ModuleInventCustVend initModuleType(tableId callerTableId)
#{
# switch(callerTableId)
# {
# case tablenum(SalesTable) :
# case tablenum(SalesLine) :
# case tablenum(CustInvoiceTable) :
# case tablenum(SalesBasket) :
# case tablenum(SalesQuotationTable) :
# case tablenum(SalesQuotationLine) :
# case tablenum(SalesBasketLine) : return ModuleInventCustVend::Cust;
#
# case tablenum(PurchTable) :
# case tablenum(PurchLine) :
# case tablenum(PurchRFQCaseTable) :
# case tablenum(PurchRFQCaseLine) :
# case tablenum(PurchRFQTable) :
# case tablenum(PurchRFQLine) :
# case tablenum(PurchReqLine) :
# case tablenum(VendReqTrans) :
# case tablenum(PurchParmTable) :
# case tablenum(PurchParmSubTable) :
# case tablenum(PurchParmLine) :
# case tablenum(VendInvoiceInfoTable) :
# case tablenum(VendInvoiceInfoSubTable):
# case tablenum(VendInvoiceInfoLine) :
# case tablenum(VendInvoiceJour) :
# case tablenum(VendInvoiceTrans) : return ModuleInventCustVend::Vend;
# }
#
# return ModuleInventCustVend::Invent;
#}
#
ENDSOURCE
SOURCE #InitValue
#void initValue()
#{
# super();
#
# this.CurrencyCode = CompanyInfo::standardCurrency();
# this.LineNum = MarkupTrans::lastLineNum(this.TransTableId, this.TransRecId) + 1;
#}
ENDSOURCE
SOURCE #insert
#public void insert()
#{
# InterCompanyMarkup interCompanyMarkup;
#;
# try
# {
# ttsbegin;
#
# super();
#
# if (!this.InterCompanySkipUpdate)
# {
# interCompanyMarkup = InterCompanyMarkup::construct(InterCompanyMarkupAction::Calc,this);
# interCompanyMarkup.run(true);
# this = interCompanyMarkup.parmMarkupTrans();
# this.InterCompanySkipUpdate = false;
# this.doUpdate();
# }
#
# ttscommit;
# }
# catch(Exception::Error)
# {
# ttsabort;
# throw error("@SYS93835");
# }
#}
#
ENDSOURCE
SOURCE #interCompanyCreateAllowed
#/*
# AOSRunMode::Called
#*/
#boolean interCompanyCreateAllowed()
#{
# boolean create = true;
# PurchTable purchTable;
# PurchLine purchLine;
# SalesTable salesTable;
# SalesLine salesLine;
# ;
# switch(this.TransTableId)
# {
# case(tablenum(PurchTable)):
# purchTable = this.parentRecord();
# if (purchTable.InterCompanyOrder
# && purchTable.InterCompanySalesId
# && purchTable.interCompanyEndpointActionPolicy())
# {
# create = purchTable.interCompanyEndpointActionPolicy().EditPrice;
# }
# break;
#
# case(tablenum(PurchLine)):
# purchLine = this.parentRecord();
# if (purchLine.purchTable().InterCompanyOrder
# && purchLine.InterCompanyInventTransId
# && purchLine.purchTable().interCompanyEndpointActionPolicy())
# {
# create = purchLine.purchTable().interCompanyEndpointActionPolicy().EditPrice;
# }
# break;
#
# case(tablenum(SalesTable)):
# salesTable = this.parentRecord();
# if (salesTable.InterCompanyOrder
# && salesTable.InterCompanyPurchId
# && salesTable.interCompanyEndpointActionPolicy()
# )
# {
# create = salesTable.interCompanyEndpointActionPolicy().EditPrice;
# }
# break;
#
# case(tablenum(SalesLine)):
# salesLine = this.parentRecord();
# if (salesLine.salesTable().InterCompanyOrder
# && salesLine.InterCompanyInventTransId
# && salesLine.salesTable().interCompanyEndpointActionPolicy())
# {
# create = salesLine.salesTable().interCompanyEndpointActionPolicy().EditPrice;
# }
# break;
# }
# return create;
#}
#
ENDSOURCE
SOURCE #inventMovement
#public InventMovement inventMovement()
#{
# InventMovement inventMovement;
#
# CustQuotationTrans custQuotationTrans;
# CustConfirmTrans custConfirmTrans;
# CustInvoiceTrans custInvoiceTrans;
# VendPurchOrderTrans vendPurchOrderTrans;
# VendInvoiceTrans vendInvoiceTrans;
# ;
# inventMovement = InventMovement::constructNoThrow(this.parentRecord());
#
# if (inventMovement)
# return inventMovement;
#
# switch (this.TransTableId)
# {
# case tablenum(CustQuotationTrans) :
# custQuotationTrans = this.parentRecord();
# inventMovement = InventMovement::constructNoThrow(custQuotationTrans.salesLine());
# break;
# case tablenum(CustConfirmTrans) :
# custConfirmTrans = this.parentRecord();
# inventMovement = InventMovement::constructNoThrow(custConfirmTrans.salesLine());
# break;
# case tablenum(CustInvoiceTrans) :
# custInvoiceTrans = this.parentRecord();
# inventMovement = InventMovement::constructNoThrow(custInvoiceTrans.salesLine());
# break;
# case tablenum(VendPurchOrderTrans) :
# vendPurchOrderTrans = this.parentRecord();
# inventMovement = InventMovement::constructNoThrow(vendPurchOrderTrans.purchLine());
# break;
# case tablenum(VendInvoiceTrans) :
# vendInvoiceTrans = this.parentRecord();
# inventMovement = InventMovement::constructNoThrow(vendInvoiceTrans.purchLine());
# break;
# }
#
# return inventMovement;
#}
ENDSOURCE
SOURCE #isInclTax
#///
#/// Determines whether taxes are included in the miscellaneous charge.
#///
#///
#/// The MarkupTrans to test.
#///
#///
#/// Returns true if the miscellaneous charge markup cateogry is not percent or intercompany percent.
#///
#///
#/// A miscellaneous charge with a category of percent or intercompany percent never includes tax in the miscellaneous charge.
#///
#public boolean isInclTax(MarkupTrans _markupTrans)
#{
# ;
#
# if(Markup::isPercentageMarkup(_markupTrans))
# {
# return false;
# }
#
# return true;
#
#}
ENDSOURCE
SOURCE #isMarkupOfTypeCustVend
#boolean isMarkupOfTypeCustVend()
#{
# return this.markupTable().isMarkupOfTypeCustVend();
#}
ENDSOURCE
SOURCE #isMarkupSalesRelated
#boolean isMarkupSalesRelated()
#{;
# switch (this.TransTableId)
# {
# case tablenum(SalesTable) :
# case tablenum(SalesLine) :
# case tablenum(CustInvoiceTable) :
# case tablenum(CustQuotationJour) :
# case tablenum(CustQuotationTrans) :
# case tablenum(CustConfirmJour) :
# case tablenum(CustConfirmTrans) :
# case tablenum(CustInvoiceJour) :
# case tablenum(CustInvoiceTrans) :
# case tablenum(SalesBasket) :
# case tablenum(SalesBasketLine) :
# case tablenum(SalesQuotationTable) :
# case tablenum(SalesQuotationLine) :
# return true;
#
# case tablenum(PurchTable) :
# case tablenum(PurchLine) :
# case tablenum(PurchParmTable) :
# case tablenum(PurchParmSubTable) :
# case tablenum(PurchParmLine) :
# case tablenum(PurchRFQCaseTable) :
# case tablenum(PurchRFQCaseLine) :
# case tablenum(PurchRFQTable) :
# case tablenum(PurchRFQLine) :
# case tablenum(PurchReqLine) :
# case tablenum(VendReqTrans) :
# case tablenum(VendPurchOrderJour) :
# case tablenum(VendPurchOrderTrans) :
# case tablenum(VendInvoiceJour) :
# case tablenum(VendInvoiceTrans) :
# return false;
# }
#
# throw error(strfmt("@SYS23396", funcname()));
#}
#
ENDSOURCE
SOURCE #ledgerAccountAmount
#AmountCur ledgerAccountAmount(AmountCur _amountCur)
#{
# AmountCur ledgerAccountAmount;
#
# if (this.markupTable().CustType == MarkupType::LedgerAccount)
# {
# ledgerAccountAmount += _amountCur;
# }
#
# if (this.markupTable().VendType == MarkupType::LedgerAccount)
# {
# ledgerAccountAmount -= _amountCur;
# }
#
# return ledgerAccountAmount;
#}
ENDSOURCE
SOURCE #MarkupTable
#MarkupTable markupTable(boolean _forUpdate = false)
#{
# MarkupTable markupTable;
# ;
# if (this.DataAreaId != curext()
# && (select dataArea where dataArea.Id == this.DataAreaId && dataArea.IsVirtual == false).RecId)
# {
# changecompany(this.DataAreaId)
# {
# markupTable = MarkupTable::find(this.ModuleType, this.MarkupCode, _forUpdate);
# }
# }
# else
# markupTable = MarkupTable::find(this.ModuleType, this.MarkupCode, _forUpdate);
#
# return markupTable;
#}
ENDSOURCE
SOURCE #MarkupTypeItem
#boolean markupTypeItem()
#{
# return this.markupTable().markupTypeItem();
#}
ENDSOURCE
SOURCE #modifiedField
#public void modifiedField(fieldId _fieldId)
#{
# super(_fieldId);
#
# switch (_fieldId)
# {
# case fieldnum(MarkupTrans, MarkupCode):
# this.initFromMarkupTable(this.markupTable());
# break;
# }
#}
ENDSOURCE
SOURCE #parentCurrencyCode
#///
#/// Returns the currency code for the parent record related to the misc charges transaction.
#///
#///
#/// The currency code for the parent record.
#///
#public CurrencyCode parentCurrencyCode()
#{
# DictTable dictTable;
# fieldId fieldId;
# Common parentRecord;
# ;
# dictTable = new DictTable(this.TransTableId);
#
# fieldId = dictTable.fieldName2Id(new DictType(extendedtypenum(CurrencyCode)).name());
#
# if (fieldId)
# {
# parentRecord = this.parentRecord();
# return parentRecord.(fieldId);
# }
# else
# {
# return this.CurrencyCode;
# }
#}
#
ENDSOURCE
SOURCE #parentRecord
#public Common parentRecord()
#{
# switch (this.TransTableId)
# {
# case tablenum(SalesTable) :
# return SalesTable::findRecId(this.TransRecId);
# case tablenum(SalesLine) :
# return SalesLine::findRecId(this.TransRecId);
# case tablenum(CustInvoiceTable) :
# return CustInvoiceTable::findRecId(this.TransRecId);
# case tablenum(CustQuotationJour) :
# return CustQuotationJour::findRecId(this.TransRecId);
# case tablenum(CustQuotationTrans) :
# return CustQuotationTrans::findRecId(this.TransRecId);
# case tablenum(CustConfirmJour) :
# return CustConfirmJour::findRecId(this.TransRecId);
# case tablenum(CustConfirmTrans) :
# return CustConfirmTrans::findRecId(this.TransRecId);
# case tablenum(CustInvoiceJour) :
# return CustInvoiceJour::findRecId(this.TransRecId);
# case tablenum(CustInvoiceTrans) :
# return CustInvoiceTrans::findRecId(this.TransRecId);
# case tablenum(SalesBasket) :
# return SalesBasket::findRecId(this.TransRecId);
# case tablenum(SalesBasketLine) :
# return SalesBasketLine::findRecId(this.TransRecId);
# case tablenum(PurchTable) :
# return PurchTable::findRecId(this.TransRecId);
# case tablenum(PurchLine) :
# return PurchLine::findRecId(this.TransRecId);
# case tablenum(PurchReqLine) :
# return PurchReqLine::findRecId(this.TransRecId);
# case tablenum(VendReqTrans) :
# return VendReqTrans::findRecId(this.TransRecId);
# case tablenum(VendPurchOrderJour) :
# return VendPurchOrderJour::findRecId(this.TransRecId);
# case tablenum(VendPurchOrderTrans) :
# return VendPurchOrderTrans::findRecId(this.TransRecId);
# case tablenum(VendInvoiceJour) :
# return VendInvoiceJour::findRecId(this.TransRecId);
# case tablenum(VendInvoiceTrans) :
# return VendInvoiceTrans::findRecId(this.TransRecId);
# case tablenum(PurchParmTable) :
# return PurchParmTable::findRecId(this.TransRecId);
# case tablenum(PurchParmSubTable) :
# return PurchParmSubTable::findRecId(this.TransRecId);
# case tablenum(PurchParmLine) :
# return PurchParmLine::findRecId(this.TransRecId);
# case tablenum(SalesQuotationTable) :
# return SalesQuotationTable::findRec(this.TransRecId);
# case tablenum(SalesQuotationLine) :
# return SalesQuotationLine::findRecId(this.TransRecId);
# case tablenum(PurchRFQCaseTable) :
# return PurchRFQCaseTable::findRecId(this.TransRecId);
# case tablenum(PurchRFQCaseLine) :
# return PurchRFQCaseLine::findRecId(this.TransRecId);
# case tablenum(PurchRFQTable) :
# return PurchRFQTable::findRecId(this.TransRecId);
# case tablenum(PurchRFQLine) :
# return PurchRFQLine::findRecId(this.TransRecId);
#
# }
# return null;
#}
#
ENDSOURCE
SOURCE #signedValue
#AmountCur signedValue(AmountCur _amountCur)
#{
# AmountCur signedValue;
#
# if (this.isMarkupSalesRelated())
# {
# if (this.markupTable().CustType == MarkupType::CustVend)
# {
# signedValue = _amountCur;
# }
# else
# {
# signedValue = -_amountCur;
# }
# }
# else
# {
# if (this.markupTable().VendType == MarkupType::CustVend)
# {
# signedValue = _amountCur;
# }
# else
# {
# signedValue = -_amountCur;
# }
# }
#
# return signedValue;
#}
ENDSOURCE
SOURCE #taxCombinationAllowed
#boolean taxCombinationAllowed()
#{
# MarkupTable markupTable;
# ;
#
# if (!this.TaxGroup || !this.TaxItemGroup)
# return true;
#
# markupTable = this.markupTable();
#
# if (markupTable.CustType == MarkupType::CustVend || markupTable.VendType == MarkupType::CustVend)
# return true;
#
# return !Tax::potentialSalesTax(this.TaxGroup, this.TaxItemGroup, systemdateget(), this.taxModuleType());
#}
#
ENDSOURCE
SOURCE #taxModuleType
#public TaxModuleType taxModuleType()
#{
# TaxModuleType taxModuleType;
#
# switch (this.ModuleType)
# {
# case ModuleInventCustVend::Cust:
# taxModuleType = TaxModuleType::Sales;
# break;
# case ModuleInventCustVend::Vend:
# taxModuleType = TaxModuleType::Purch;
# break;
# default:
# throw error(Error::wrongUseOfFunction(funcname()));
# }
#
# return taxModuleType;
#}
ENDSOURCE
SOURCE #update
#public void update()
#{
# InterCompanyMarkup interCompanyMarkup;
#;
# try
# {
# ttsbegin;
#
# if (!this.InterCompanySkipUpdate)
# {
# interCompanyMarkup = InterCompanyMarkup::construct(InterCompanyMarkupAction::Calc,this);
# interCompanyMarkup.run();
# this = interCompanyMarkup.parmMarkupTrans();
# }
# this.InterCompanySkipUpdate = false;
# super();
#
# ttscommit;
# }
# catch(Exception::Error)
# {
# ttsabort;
# throw error("@SYS93835");
# }
#}
#
ENDSOURCE
SOURCE #UseInMatching
#///
#/// Indicates whether the MarkupTrans record can participate in transaction matching.
#///
#///
#/// true if the current record can participate in transaction matching; otherwise, false.
#///
#//BP Deviation Documented
#public display MarkupUseInMatching useInMatching()
#{
# return this.markupTable().UseInMatching;
#}
ENDSOURCE
SOURCE #validateField
#boolean validateField(fieldId fieldId)
#{
# boolean ok = true;
# ;
#
# ok = super(fieldId);
#
# switch(fieldId)
# {
# case(fieldnum(MarkupTrans, MarkupCode)) : ok = this.checkMarkupCode();
# break;
# case(fieldnum(MarkupTrans, MarkupCategory)) : ok = this.checkMarkupCategory();
# break;
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #ValidateWrite
#boolean validateWrite()
#{
# boolean ok = true;
# ;
#
# ok = super();
#
# if (! this.checkMarkupCode())
# ok = false;
#
# if (!this.checkMarkupCategory())
# ok = false;
#
# if (!this.checkTaxCombination())
# ok = false;
#
# return ok;
#}
ENDSOURCE
SOURCE #BPLfindRecId
#// Israel-Localisation-Prodware-ImportFolder
#static MarkupTrans BPLfindRecId(RecId _recId,
# boolean update = false)
#{
# MarkupTrans markupTrans;
# ;
#
# if (_recId)
# {
# markupTrans.selectForUpdate(update);
#
# select firstonly markupTrans
# where markupTrans.RecId == _recId;
# }
#
# return markupTrans;
#}
ENDSOURCE
SOURCE #checkMarkupTrans
#///
#/// Validates a MarkupTrans record for selection or posting.
#///
#///
#/// The TableId of the table to which the MarkupTrans are associated.
#///
#///
#/// The RecId of the table to which the MarkupTrans are associated.
#///
#///
#/// true if only a warning should be issued; otherwise, false.
#///
#///
#/// true if no errors were detected; otherwise, false.
#///
#///
#/// The _warningOnly parameter determines how the method behaves. The method will always return true if
#/// only warnings are requested. Typically, warnings are issued when MarkupTrans are selected, errors are issued
#/// before MarkupTrans are posted, i.e. you may select a MarkupTrans record but you may not post it if these checks fail.
#///
#public server static boolean checkMarkupTrans(tableId _tableId, RecId _recId, boolean _warningOnly = true)
#{
# boolean ok = true;
# MarkupTrans markupTrans;
# ;
# while select markupTrans
# where markupTrans.TransRecId == _recId && markupTrans.TransTableId == _tableId
# {
# if(markupTrans.Value)
# {
# if (markupTrans.markupTypeItem())
# {
# if(_warningOnly)
# warning("@SYS25724");
# else
# ok = checkFailed("@SYS25724");
# break;
# }
# }
# else
# {
# if(_warningOnly)
# warning("@SYS100830");
# }
# }
# return ok;
#}
#
ENDSOURCE
SOURCE #checkMarkupTransOnHeader
#///
#/// Validates a MarkupTrans record for posting associated with a header record.
#///
#///
#/// The TableId of the table to which the MarkupTrans are associated.
#///
#///
#/// The RecId of the table to which the MarkupTrans are associated.
#///
#///
#/// true if only a warning should be issued; otherwise, false.
#///
#///
#/// true if no errors were detected; otherwise, false.
#///
#///
#/// The _warningOnly parameter is currently ignored.
#///
#public server static boolean checkMarkupTransOnHeader(tableId _tableId, RecId _recId, boolean _warningOnly = true)
#{
# MarkupTrans markupTrans;
# ;
# while select markupTrans
# where markupTrans.TransRecId == _recId && markupTrans.TransTableId == _tableId
# {
# if(markupTrans.Value && markupTrans.markupTypeItem())
# {
# error("@SYS115806");
# return false;
# }
# }
# return true;
#}
#
ENDSOURCE
SOURCE #currencyCodeExtendedTypeId
#static extendedTypeId currencyCodeExtendedTypeId(Common _common)
#{
# DictTable dictTable;
# DictField dictField;
# fieldId fieldId;
# extendedTypeId extendedTypeId;
# ;
# dictTable = new DictTable(_common.TableId);
#
# fieldId = dictTable.fieldName2Id(new DictType(extendedtypenum(CurrencyCode)).name());
#
# if (fieldId)
# dictField = dictTable.fieldObject(fieldId);
# else
# dictField = new DictField(tablenum(MarkupTrans),fieldnum(MarkupTrans,CurrencyCode));
#
# extendedTypeId = dictField.typeId();
#
# return extendedTypeId;
#}
#
ENDSOURCE
SOURCE #exist
#static boolean exist(tableId tableId,
# recId recId)
#{
# if (tableId && recId)
# {
# return (select firstonly RecId from markupTrans
# index hint TableRecIdIdx
# where markupTrans.TransTableId == tableId &&
# markupTrans.TransRecId == recId
# ).RecId != 0;
# }
#
# return false;
#}
#
ENDSOURCE
SOURCE #existDifferentCurrency
#server static boolean existDifferentCurrency(tableId tableId, recId recId, CurrencyCode currencyCode)
#{
# MarkupTrans markupTrans;
#
# if (tableId && recId)
# {
# while select markupTrans
# index hint TableRecIdIdx
# where markupTrans.TransTableId == tableId &&
# markupTrans.TransRecId == recId &&
# markupTrans.CurrencyCode != currencyCode
# {
# if (markupTrans.isMarkupOfTypeCustVend())
# {
# return true;
# }
# }
# }
#
# return false;
#}
ENDSOURCE
SOURCE #existOrig
#///
#/// Determines if this MarkupTrans table record is associated with an original document.
#///
#///
#/// Table ID of the original document.
#///
#///
#/// Record ID of the original document.
#///
#///
#/// true if an original document is associated with this MarkupTrans table record; otherwise, false.
#///
#public static boolean existOrig(tableId _origTableId, RecId _origRecId)
#{
# ;
# return _origTableId && _origRecId &&
# (select firstonly RecId from markupTrans
# where markupTrans.OrigTableId == _origTableId &&
# markupTrans.OrigRecId == _origRecId).RecId;
#}
ENDSOURCE
SOURCE #findValue
#static MarkupTrans findValue(tableId _tableId,
# recId _recId,
# boolean update = false)
#{
# MarkupTrans markupTrans;
# ;
#
# markupTrans.selectForUpdate(update);
#
# if (_tableId && _recId)
# {
# select firstonly markupTrans
# where markupTrans.TransTableId == _tableId &&
# markupTrans.TransRecId == _recId;
# }
#
# return markupTrans;
#}
ENDSOURCE
SOURCE #lastLineNum
#static LineNum lastLineNum(tableId transTableId,
# recId transRecId)
#{
# return (select maxof(LineNum) from markupTrans
# index hint TableRecIdIdx
# where markupTrans.TransTableId == transTableId &&
# markupTrans.TransRecId == transRecId).LineNum;
#}
ENDSOURCE
SOURCE #markupAllowed
#static boolean markupAllowed(Common _common)
#{
# boolean markupAllowed = true;
# SalesTable salesTable;
# SalesLine salesLine;
# SalesQuotationTable salesQuotationTable;
# SalesQuotationLine salesQuotationLine;
#
# switch (_common.TableId)
# {
# case tablenum(SalesTable):
# salesTable = _common;
# markupAllowed = salesTable.markupAllowed();
# break;
#
# case tablenum(SalesLine):
# salesLine = _common;
# markupAllowed = salesLine.markupAllowed();
# break;
#
# case tablenum(SalesQuotationTable):
# salesQuotationTable = _common;
# markupAllowed = salesQuotationTable.markupAllowed();
# break;
#
# case tablenum(SalesQuotationLine):
# salesQuotationLine = _common;
# markupAllowed = salesQuotationLine.markupAllowed();
# break;
#
# case tablenum(PurchParmTable):
# case tablenum(PurchParmSubTable):
# case tablenum(PurchParmLine):
# markupAllowed = _common.markupAllowed();
# break;
# }
#
# return markupAllowed;
#}
ENDSOURCE
SOURCE #updateCallerDatasource
#static void updateCallerDatasource(Common common)
#{
# Object dataSource;
# ;
#
# switch(common.TableId)
# {
# case tablenum(CustInvoiceTable) :
# case tablenum(SalesTable) :
# case tablenum(SalesLine) :
# if (common.isFormDataSource())
# {
# dataSource = common.dataSource();
# if (dataSource)
# {
# if (formDataSourceHasMethod(dataSource, identifierstr(setTouched)))
# {
# dataSource.setTouched();
# }
#
# if (formDataSourceHasMethod(dataSource, identifierstr(checkCreditLimit)))
# {
# dataSource.checkCreditLimit();
# }
# }
# }
# break;
# }
#}
#
ENDSOURCE
SOURCE #viewCacheMarkupTrans
#static RecordViewCache viewCacheMarkupTrans(Common _source, boolean _forUpdate)
#{
# MarkupTrans markupTrans;
# ;
#
# markupTrans.selectForUpdate(_forUpdate);
#
# select nofetch markupTrans
# where markupTrans.TransTableId == _source.TableId &&
# markupTrans.TransRecId == _source.RecId;
#
#
# return new RecordViewCache(markupTrans);
#}
#
#
ENDSOURCE
ENDMETHODS
ENDTABLE
en-us
Misc. charges transactions
@SYS13468
0
0
he
תנועות חיובים שונים
@SYS13468
0
0
en-us
The MarkupTrans table contains markup transactions.
{locked}
@SYS124472
0
0
he
The MarkupTrans table contains markup transactions.
{locked}
@SYS124472
0
0
en-us
Currency to be used for invoicing
@SYS20784
0
0
he
המטבע שישמש להפקת חשבונית
@SYS20784
0
0
en-us
Debited amount in the general ledger module
@SYS9733
0
0
he
הסכום שחויב במודול הספר הראשי
@SYS9733
0
0
en-us
Voucher number employed
@SYS7290
0
0
he
מספר שובר בשימוש
@SYS7290
0
0
en-us
Posting date used
@SYS3961
0
0
he
תאריך רישום בשימוש
@SYS3961
0
0
en-us
Description of the misc. charges
@SYS16224
0
0
he
תיאור החיובים השונים
@SYS16224
0
0
en-us
Calculated value
@SYS69023
0
0
he
ערך מחושב
@SYS69023
0
0
en-us
Calculated value of the misc. charges
@SYS69024
0
0
he
ערך מחושב של חיובים שונים
@SYS69024
0
0
en-us
Administration
@SYS9853
0
0
he
ניהול
@SYS9853
0
0
en-us
BUS fields Israel
@BPL141
0
0
he
שדות ישראל BUS
@BPL141
0
0
en-us
Import portfolio
@BPL94
0
0
he
תיק יבוא
@BPL94
0
0
en-us
Purchase order
@SYS15812
0
0
he
הזמנת רכש
@SYS15812
0
0
en-us
Intercompany
Intercompany used in the sense 'intra-group'.
@SYS74106
0
0
he
בין-חברתי
Intercompany used in the sense 'intra-group'.
@SYS74106
0
0
en-us
Intercompany information
@SYS112324
0
0
he
מידע בין-חברתי
@SYS112324
0
0
en-us
Ledger
@SYS13356
0
0
he
ספר ראשי
@SYS13356
0
0
en-us
Misc. charges
@SYS8371
0
0
he
חיובים שונים
@SYS8371
0
0
en-us
Sales tax
Tax = Sales tax
@SYS5878
0
0
he
מע"מ
Tax = Sales tax
@SYS5878
0
0
en-us
Sales tax group
@SYS68899
0
0
he
קבוצת מע"מ
@SYS68899
0
0
en-us
Value
When it is used for amount.
@SYS11762
0
0
he
ערך
When it is used for amount.
@SYS11762
0
0
en-us
Misc. charges per unit are not allowed.
@SYS28725
0
0
he
חיובים שונים ליחידה אינם מותרים.
@SYS28725
0
0
en-us
You can select Intercompany percent only on an intercompany order line that originates from an original sales order line.
Intercompany
@SYS98799
0
0
he
באפשרותך לבחור ב'אחוז בין חברתי' רק בשורת הזמנה בין-חברתית שנוצרה משורת הזמנת מכירה מקורית.
Intercompany
@SYS98799
0
0
en-us
Intercompany percent is allowed only on intercompany sales/purchase order lines.
Intercompany
@SYS98798
0
0
he
אחוז בין-חברתי מותר רק בשורות של הזמנות מכירה/רכש בין-חברתיות.
Intercompany
@SYS98798
0
0
en-us
Misc. charges %1 does not exist.
@SYS3641
0
0
he
%1 של חיובים שונים אינו קיים.
@SYS3641
0
0
en-us
Misc. charges on item cannot be used.
@SYS16770
0
0
he
לא ניתן להשתמש בחיובים השונים על פריט.
@SYS16770
0
0
en-us
Misc. charges must be debited to the item
@SYS12360
0
0
he
יש לחייב את החיובים השונים לפריט
@SYS12360
0
0
en-us
Misc. charges must be credited to an account.
@SYS1759
0
0
he
יש לזכות את החיובים השונים בחשבון.
@SYS1759
0
0
en-us
Sales tax cannot be calculated.
Tax = Sales tax (VAT)
@SYS22772
0
0
he
לא ניתן לחשב את המע"מ.
Tax = Sales tax (VAT)
@SYS22772
0
0
en-us
Insufficient rights
@SYS57330
0
0
he
זכויות לא מספיקות
@SYS57330
0
0
en-us
New
MiscChgs: Value used to indicate that a PO Misc Chg is connected to a new invoice, i.e. one without an invoice number assigned yet.
@SYS119279
0
0
he
חדש
MiscChgs: Value used to indicate that a PO Misc Chg is connected to a new invoice, i.e. one without an invoice number assigned yet.
@SYS119279
0
0
en-us
Operation canceled
Intercompany
@SYS93835
0
0
he
הפעולה בוטלה
Intercompany
@SYS93835
0
0
en-us
Function %1 has been called with the wrong table.
@SYS23396
0
0
he
פונקציה %1 נקראה באמצעות טבלה שגויה.
@SYS23396
0
0
en-us
Misc. charges have not been allocated.
@SYS25724
0
0
he
לא הוקצו חיובים שונים.
@SYS25724
0
0
en-us
A miscellaneous charge of zero value has not been allocated and is disregarded in the posting.
@SYS100830
0
0
he
חיוב שונות בערך אפס לא הוקצה והמערכת תתעלם ממנו ברישום.
@SYS100830
0
0
en-us
Misc. charges that are of the type Item have not been allocated.
MiscChgs: Error messsage when a PO Header has item MarkupTrans not yet redistributed to the PO's lines.
@SYS115806
0
0
he
חיובים שונים שהם מסוג 'פריט' לא הוקצו.
MiscChgs: Error messsage when a PO Header has item MarkupTrans not yet redistributed to the PO's lines.
@SYS115806
0
0
***Element: DBT
; Microsoft Dynamics AX Table : PurchParameters unloaded
; --------------------------------------------------------------------------------
TABLEVERSION 1
TABLE #PurchParameters
Id 341
PROPERTIES
Name #PurchParameters
Label #@SYS22420
FormRef #vendparameters
TableContents #Base + default data
ConfigurationKey #LogisticsBasic
SecurityKey #VendTables
MaxAccessMode #Edit
CacheLookup #Found
CreateRecIdIndex #Yes
TableGroup #Parameter
PrimaryIndex #Key
ClusterIndex #Key
ModifiedDateTime #Yes
DEL_modifiedTime #Yes
ModifiedBy #Yes
DeveloperDocumentation #@SYS124477
ENDPROPERTIES
FIELDS
FIELD #DEL_PrintIntracomVAT
Id 2
ENUM
PROPERTIES
Name #DEL_PrintIntracomVAT
Visible #No
ConfigurationKey #SysDeletedObjects40
Table #PurchParameters
ExtendedDataType
ARRAY
#NoYesId
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #DeleteLine
Id 3
ENUM
PROPERTIES
Name #DeleteLine
Label #@SYS23128
HelpText #@SYS10421
Table #PurchParameters
EnumType #NoYes
ENDPROPERTIES
FIELD #DeleteHeading
Id 4
ENUM
PROPERTIES
Name #DeleteHeading
Label #@SYS7285
HelpText #@SYS3090
Table #PurchParameters
EnumType #NoYes
ENDPROPERTIES
FIELD #DEL_CreditError
Id 5
ENUM
PROPERTIES
Name #DEL_CreditError
ConfigurationKey #SysDeletedObjects41
Table #PurchParameters
ExtendedDataType
ARRAY
#VendCreditError
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #PromptQty
Id 6
ENUM
PROPERTIES
Name #PromptQty
Label #@SYS103129
HelpText #@SYS103130
Table #PurchParameters
EnumType #NoYes
ENDPROPERTIES
FIELD #OverDelivery
Id 8
ENUM
PROPERTIES
Name #OverDelivery
Table #PurchParameters
ExtendedDataType
ARRAY
#PurchOverDelivery
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #SubDelivery
Id 9
ENUM
PROPERTIES
Name #SubDelivery
Table #PurchParameters
ExtendedDataType
ARRAY
#PurchUnderDelivery
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #Disc
Id 10
ENUM
PROPERTIES
Name #Disc
Table #PurchParameters
ExtendedDataType
ARRAY
#PurchLineMultiLn
#
ENDARRAY
EnumType #LineMultiLn
ENDPROPERTIES
FIELD #MarkupHeading
Id 11
ENUM
PROPERTIES
Name #MarkupHeading
Table #PurchParameters
ExtendedDataType
ARRAY
#MarkupHeading
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #MarkupLine
Id 12
ENUM
PROPERTIES
Name #MarkupLine
Table #PurchParameters
ExtendedDataType
ARRAY
#MarkupLine
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #Delivery2Invoice
Id 13
STRING
PROPERTIES
Name #Delivery2Invoice
Table #PurchParameters
ExtendedDataType
ARRAY
#Delivery2Invoice
#
ENDARRAY
ENDPROPERTIES
FIELD #DocumentDate
Id 15
ENUM
PROPERTIES
Name #DocumentDate
Label #@SYS5924
HelpText #@SYS10850
Table #PurchParameters
EnumType #NoYes
ENDPROPERTIES
FIELD #cancelPurch
Id 18
ENUM
PROPERTIES
Name #cancelPurch
Label #@SYS25642
HelpText #@SYS23369
Table #PurchParameters
EnumType #NoYes
ENDPROPERTIES
FIELD #PromptTransfer
Id 20
ENUM
PROPERTIES
Name #PromptTransfer
Label #@SYS25478
HelpText #@SYS25479
Table #PurchParameters
EnumType #NoYes
ENDPROPERTIES
FIELD #PurchaseType
Id 23
ENUM
PROPERTIES
Name #PurchaseType
HelpText #@SYS25803
Table #PurchParameters
EnumType #PurchaseType
ENDPROPERTIES
FIELD #PostPackingSlip
Id 25
ENUM
PROPERTIES
Name #PostPackingSlip
Table #PurchParameters
ExtendedDataType
ARRAY
#PurchPostPackingSlip
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #AccesLevelInvoiced
Id 26
ENUM
PROPERTIES
Name #AccesLevelInvoiced
Table #PurchParameters
EnumType #SalesPurchAccesLevel
ENDPROPERTIES
FIELD #ReturnActionDefault
Id 27
STRING
PROPERTIES
Name #ReturnActionDefault
Label #@SYS29122
ConfigurationKey #ReturnItem
Table #PurchParameters
ExtendedDataType
ARRAY
#PurchReturnActionId
#
ENDARRAY
ENDPROPERTIES
FIELD #Key
Id 28
INT
PROPERTIES
Name #Key
AllowEditOnCreate #No
AllowEdit #No
Visible #No
Table #PurchParameters
ExtendedDataType
ARRAY
#ParametersKey
#
ENDARRAY
ENDPROPERTIES
FIELD #PurchPoolId
Id 31
STRING
PROPERTIES
Name #PurchPoolId
Label #@SYS23446
HelpText #@SYS54136
Table #PurchParameters
ExtendedDataType
ARRAY
#PurchPoolId
#
ENDARRAY
ENDPROPERTIES
FIELD #SettleVoucher
Id 33
ENUM
PROPERTIES
Name #SettleVoucher
Label #@SYS54360
HelpText #@SYS54359
Table #PurchParameters
ExtendedDataType
ARRAY
#PurchSettlementType
#
ENDARRAY
EnumType #SettlementType
ENDPROPERTIES
FIELD #SummaryErrorTolerance
Id 38
ENUM
PROPERTIES
Name #SummaryErrorTolerance
Label #@SYS57797
HelpText #@SYS62159
Table #PurchParameters
EnumType #ErrorTolerance
ENDPROPERTIES
FIELD #SummaryUpdateBy
Id 39
ENUM
PROPERTIES
Name #SummaryUpdateBy
Label #@SYS57798
HelpText #@SYS68938
Table #PurchParameters
EnumType #AccountOrder
ENDPROPERTIES
FIELD #PostChargeAccount
Id 43
ENUM
PROPERTIES
Name #PostChargeAccount
Label #@SYS78185
HelpText #@SYS78186
Table #PurchParameters
EnumType #NoYes
ENDPROPERTIES
FIELD #SplitDeliveryPurchaseOrder
Id 44
ENUM
PROPERTIES
Name #SplitDeliveryPurchaseOrder
Label #@SYS15812
Table #PurchParameters
ExtendedDataType
ARRAY
#TradeSplitDeliveryAddress
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #BPLWMSJournalNameId
Id 20001
STRING
PROPERTIES
Name #BPLWMSJournalNameId
ConfigurationKey #CRSEIsrael
Table #PurchParameters
ExtendedDataType
ARRAY
#WMSJournalNameId
#
ENDARRAY
ENDPROPERTIES
ENDFIELDS
GROUPS
GROUP #AutoReport
PROPERTIES
Name #AutoReport
ENDPROPERTIES
GROUPFIELDS
#PostPackingSlip
#PostChargeAccount
#PromptTransfer
#PurchaseType
ENDGROUPFIELDS
ENDGROUP
GROUP #BPLJournalDefaultValues
PROPERTIES
Name #BPLJournalDefaultValues
Label #@BPL46
ENDPROPERTIES
GROUPFIELDS
#BPLWMSJournalNameId
ENDGROUPFIELDS
ENDGROUP
GROUP #CashflowForecast
PROPERTIES
Name #CashflowForecast
Label #@SYS5727
ENDPROPERTIES
GROUPFIELDS
#Delivery2Invoice
ENDGROUPFIELDS
ENDGROUP
GROUP #CreditNote
PROPERTIES
Name #CreditNote
Label #@SYS8125
ENDPROPERTIES
GROUPFIELDS
#ReturnActionDefault
ENDGROUPFIELDS
ENDGROUP
GROUP #DefaultValues
PROPERTIES
Name #DefaultValues
Label #@SYS21682
ENDPROPERTIES
GROUPFIELDS
#PurchaseType
#ReturnActionDefault
#PurchPoolId
ENDGROUPFIELDS
ENDGROUP
GROUP #Invoice
PROPERTIES
Name #Invoice
Label #@SYS12128
ENDPROPERTIES
GROUPFIELDS
#DeleteLine
#DeleteHeading
#DocumentDate
#SettleVoucher
#PostChargeAccount
ENDGROUPFIELDS
ENDGROUP
GROUP #InvoiceLayout
PROPERTIES
Name #InvoiceLayout
Label #@SYS57781
ENDPROPERTIES
GROUPFIELDS
ENDGROUPFIELDS
ENDGROUP
GROUP #PackingSlip
PROPERTIES
Name #PackingSlip
Label #@SYS11549
ENDPROPERTIES
GROUPFIELDS
#PostPackingSlip
ENDGROUPFIELDS
ENDGROUP
GROUP #PaperFormat
PROPERTIES
Name #PaperFormat
Label #@SYS15512
ENDPROPERTIES
GROUPFIELDS
ENDGROUPFIELDS
ENDGROUP
GROUP #Posting
PROPERTIES
Name #Posting
Label #@SYS5943
ENDPROPERTIES
GROUPFIELDS
#SubDelivery
#OverDelivery
#AccesLevelInvoiced
ENDGROUPFIELDS
ENDGROUP
GROUP #Prices
PROPERTIES
Name #Prices
Label #@SYS12983
ENDPROPERTIES
GROUPFIELDS
#Disc
#MarkupHeading
#MarkupLine
ENDGROUPFIELDS
ENDGROUP
GROUP #PrintGroup
PROPERTIES
Name #PrintGroup
Label #@SYS920
ENDPROPERTIES
GROUPFIELDS
#DEL_PrintIntracomVAT
ENDGROUPFIELDS
ENDGROUP
GROUP #PurchaseOrderLayout
PROPERTIES
Name #PurchaseOrderLayout
Label #@SYS62372
ENDPROPERTIES
GROUPFIELDS
ENDGROUPFIELDS
ENDGROUP
GROUP #PurchaseParameters
PROPERTIES
Name #PurchaseParameters
Label #@SYS22420
ENDPROPERTIES
GROUPFIELDS
#PurchaseType
#DeleteLine
#DeleteHeading
#OverDelivery
#SubDelivery
#DocumentDate
#AccesLevelInvoiced
#PromptTransfer
#cancelPurch
#PromptQty
#PurchPoolId
#SettleVoucher
ENDGROUPFIELDS
ENDGROUP
GROUP #SplitDeliveryInformation
PROPERTIES
Name #SplitDeliveryInformation
Label #@SYS78278
ENDPROPERTIES
GROUPFIELDS
#SplitDeliveryPurchaseOrder
ENDGROUPFIELDS
ENDGROUP
GROUP #SummaryUpdate
PROPERTIES
Name #SummaryUpdate
Label #@SYS57755
ENDPROPERTIES
GROUPFIELDS
#SummaryUpdateBy
#SummaryErrorTolerance
ENDGROUPFIELDS
ENDGROUP
ENDGROUPS
INDICES
#Key
Id 1
PROPERTIES
Name #Key
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#Key
ENDINDEXFIELDS
ENDINDICES
REFERENCES
ENDREFERENCES
DELETEACTIONS
ENDDELETEACTIONS
METHODS
Version: 3
SOURCE #delete
#void delete()
#{
# throw error("@SYS23721");
#}
ENDSOURCE
SOURCE #initValue
#public void initValue()
#{
# super();
#
# this.PromptQty = NoYes::Yes;
#}
ENDSOURCE
SOURCE #Update
#void update()
#{
# super();
# flush PurchParameters;
#}
ENDSOURCE
SOURCE #allowedNumSeqGroup
#static container allowedNumSeqGroup()
#{
# return [PurchParameters::numRefPurchPackingSlipId().DataTypeId,
# PurchParameters::numRefPurchInvoiceId().DataTypeId,
# PurchParameters::numRefPurchCreditNoteId().DataTypeId,
# PurchParameters::numRefPurchPackingSlipVoucher().DataTypeId,
# PurchParameters::numRefPurchInvoiceVoucher().DataTypeId,
# PurchParameters::numRefPurchCreditNoteVoucher().DataTypeId ];
#}
ENDSOURCE
SOURCE #BPLnumRefImpFolderId
#// Israel-Localisation-Prodware-ImportFolder-Begin
#static client server NumberSequenceReference BPLnumRefImpFolderId()
#{
# return NumberSeqReference::findReference(typeId2ExtendedTypeId(typeid(BPLImpFolderId)));
#}
ENDSOURCE
SOURCE #createNumberSeqGroupRef
#static void createNumberSeqGroupRef(NumberSequenceGroup numberSequenceGroup)
#{;
# NumberSequenceGroupRef::createNumberSeqGroupRef(PurchParameters::allowedNumSeqGroup(), numberSequenceGroup.NumberSequenceGroupId);
#}
ENDSOURCE
SOURCE #exist
#static boolean exist()
#{
# return (select firstonly RecId from purchParameters).RecId != 0;
#}
ENDSOURCE
SOURCE #find
#static client server PurchParameters find(boolean _forupdate = false)
#{
# PurchParameters parameter;
# ;
# // Race conditions can occur during upgrade, when the parameter record is created.
# try
# {
# if (_forupdate)
# parameter.selectForUpdate(_forupdate);
#
# select firstonly parameter
# index Key
# where parameter.Key == 0;
#
# if (!parameter && !parameter.isTmp())
# {
# Company::createParameter(parameter);
# NumberSeqReference::construct(PurchParameters::numberSeqModule()).load();
# PurchSummaryParameters::initiateAll();
# PurchTable2LineParameters::initiate();
# PrintMgmt::createDefaultData(PrintMgmtHierarchyType::Purch);
# }
# }
# catch (Exception::DuplicateKeyException,parameter)
# {
# retry;
# }
# return parameter;
#}
#
ENDSOURCE
SOURCE #nameAndOrDescription
#static ItemFreeTxt nameAndOrDescription(InventTable _inventTable, LanguageId _languageId, InventDimId _inventDimId)
#{
# ItemName itemName;
# ItemFreeTxt itemTxt;
# ;
# itemName = _inventTable.ItemName;
# itemTxt = _inventTable.txt(_languageId, InventDim::find(_inventDimId));
#
# if (itemTxt)
# {
# if (VendFormletterParameters::find().ItemNameAndTxt2Description)
# {
# return itemName + '\n' + itemTxt;
# }
#
# return itemTxt;
# }
# return itemName;
#}
ENDSOURCE
SOURCE #numberSeqModule
#static client server NumberSeqModule numberSeqModule()
#{
# return NumberSeqReference_PurchaseOrder::numberSeqModule();
#}
ENDSOURCE
SOURCE #numberSeqReference
#static client server NumberSeqReference numberSeqReference()
#{
# return NumberSeqReference::construct(PurchParameters::numberSeqModule());
#}
ENDSOURCE
SOURCE #numRefPurchaseOrderId
#static client server NumberSequenceReference numRefPurchaseOrderId()
#{
# return NumberSeqReference::findReference(typeId2ExtendedTypeId(typeid(PurchaseOrderId)));
#}
ENDSOURCE
SOURCE #numRefPurchCreditNoteId
#static client server NumberSequenceReference numRefPurchCreditNoteId()
#{
# return NumberSeqReference::findReference(typeId2ExtendedTypeId(typeid(PurchInternalCreditNoteId)));
#}
ENDSOURCE
SOURCE #numRefPurchCreditNoteVoucher
#static client server NumberSequenceReference numRefPurchCreditNoteVoucher()
#{
# return NumberSeqReference::findReference(typeId2ExtendedTypeId(typeid(PurchCreditNoteVoucher)));
#}
ENDSOURCE
SOURCE #numRefPurchId
#static client server NumberSequenceReference numRefPurchId()
#{
# return NumberSeqReference::findReference(typeId2ExtendedTypeId(typeid(PurchId)));
#}
ENDSOURCE
SOURCE #numRefPurchInternalRFQId
#static client server NumberSequenceReference numRefPurchInternalRFQId()
#{
# return NumberSeqReference::findReference(typeId2ExtendedTypeId(typeid(PurchInternalRFQId)));
#}
ENDSOURCE
SOURCE #numRefPurchInvoiceId
#static client server NumberSequenceReference numRefPurchInvoiceId()
#{
# return NumberSeqReference::findReference(typeId2ExtendedTypeId(typeid(PurchInternalInvoiceId)));
#}
ENDSOURCE
SOURCE #numRefPurchInvoiceVoucher
#static client server NumberSequenceReference numRefPurchInvoiceVoucher()
#{
# return NumberSeqReference::findReference(typeId2ExtendedTypeId(typeid(PurchInvoiceVoucher)));
#}
ENDSOURCE
SOURCE #numRefPurchMarkupVoucher
#static client server NumberSequenceReference numRefPurchMarkupVoucher()
#{
# return NumberSeqReference::findReference(typeId2ExtendedTypeId(typeid(PurchMarkupVoucher)));
#}
ENDSOURCE
SOURCE #numRefPurchPackingSlipId
#static client server NumberSequenceReference numRefPurchPackingSlipId()
#{
# return NumberSeqReference::findReference(typeId2ExtendedTypeId(typeid(PurchInternalPackingSlipId)));
#}
ENDSOURCE
SOURCE #numRefPurchPackingSlipVoucher
#static client server NumberSequenceReference numRefPurchPackingSlipVoucher()
#{
# return NumberSeqReference::findReference(typeId2ExtendedTypeId(typeid(PurchPackingSlipVoucher)));
#}
ENDSOURCE
SOURCE #numRefPurchReqId
#static client server NumberSequenceReference numRefPurchReqId()
#{;
# return NumberSeqReference::findReference(typeId2ExtendedTypeId(typeid(PurchReqId)));
#}
ENDSOURCE
SOURCE #numRefPurchRFQCaseId
#static client server NumberSequenceReference numRefPurchRFQCaseId()
#{
# return NumberSeqReference::findReference(typeId2ExtendedTypeId(typeid(PurchRFQCaseId)));
#}
ENDSOURCE
SOURCE #numRefPurchRFQId
#static client server NumberSequenceReference numRefPurchRFQId()
#{
# return NumberSeqReference::findReference(typeId2ExtendedTypeId(typeid(PurchRFQId)));
#}
ENDSOURCE
SOURCE #numRefReceiptsListId
#static client server NumberSequenceReference numRefReceiptsListId()
#{
# return NumberSeqReference::findReference(typeId2ExtendedTypeId(typeid(ReceiptsListId)));
#}
ENDSOURCE
ENDMETHODS
ENDTABLE
en-us
Purchase parameters
@SYS22420
0
0
he
פרמטרי רכישה
@SYS22420
0
0
en-us
The PurchParamerts table contains setup data utilized by the purchase order module.
{locked}
@SYS124477
0
0
he
The PurchParamerts table contains setup data utilized by the purchase order module.
{locked}
@SYS124477
0
0
en-us
Delete purchase order line invoiced in total
@SYS23128
0
0
he
מחק שורת הזמנת רכש שחויבה בסכום כולל
@SYS23128
0
0
en-us
Delete purchase lines automatically after complete invoice update?
@SYS10421
0
0
he
האם למחוק שורות רכישה אוטומטית לאחר השלמת עדכון החשבונית?
@SYS10421
0
0
en-us
Delete purchase order after invoicing
@SYS7285
0
0
he
מחק הזמנת רכש לאחר הפקת חשבונית
@SYS7285
0
0
en-us
Delete purchase order automatically after complete invoice update?
@SYS3090
0
0
he
האם למחוק אוטומטית את הזמנת הרכש לאחר השלמת עדכון החשבונית?
@SYS3090
0
0
en-us
Prompt quantity field value when posting documents
@SYS103129
0
0
he
בקש ערך שדה כמות בעת רישום מסמכים
@SYS103129
0
0
en-us
Recommend a value for quantity field when posting documents
@SYS103130
0
0
he
המלץ על ערך עבור שדה כמות בעת רישום מסמכים
@SYS103130
0
0
en-us
Use document date for vendor
@SYS5924
0
0
he
השתמש בתאריך מסמך עבור ספק
@SYS5924
0
0
en-us
Use invoice document date when entering vendor and sales tax?
@SYS10850
0
0
he
האם להשתמש בתאריך המסמך של החשבונית בעת הזנת ספק ומע"מ?
@SYS10850
0
0
en-us
Mark purchase as voided
@SYS25642
0
0
he
סמן כרכישה שתוקפה בוטל
@SYS25642
0
0
en-us
When a purchase is deleted, it is marked as voided.
@SYS23369
0
0
he
בעת מחיקת רכישה, היא מסומנת כרכישה שבוטל תוקפה.
@SYS23369
0
0
en-us
Prompt when specifying vendor and invoice account
@SYS25478
0
0
he
הצג בקשה בעת ציון ספק וחשבון חשבוניות
@SYS25478
0
0
en-us
Prompt for transfer of vendor and invoice information?
@SYS25479
0
0
he
האם לבקש להעביר פרטי ספק ופרטי חשבונית?
@SYS25479
0
0
en-us
Type that an order must be created with automatically.
@SYS25803
0
0
he
הסוג שבאמצעותו יש ליצור הזמנה באופן אוטומטי.
@SYS25803
0
0
en-us
Return action default
@SYS29122
0
0
he
ברירת מחדל לפעולה חוזרת
@SYS29122
0
0
en-us
Purchase pool
@SYS23446
0
0
he
מאגר רכישות
@SYS23446
0
0
en-us
Specify default value for purchase order pool
@SYS54136
0
0
he
ציין ערך ברירת מחדל עבור מאגר הזמנות רכש
@SYS54136
0
0
en-us
Settlement type for credit notes
@SYS54360
0
0
he
סוג ייחוס עבור תעודות זיכוי
@SYS54360
0
0
en-us
Specify which settlement is made, when a credit note is created
@SYS54359
0
0
he
ציין איזה ייחוס מבוצע, בעת יצירת תעודת זיכוי
@SYS54359
0
0
en-us
Order error tolerance
@SYS57797
0
0
he
מרווח טעויות להזמנה
@SYS57797
0
0
en-us
How should the application respond in case of discrepancy between the purchases to be summary updated?
@SYS62159
0
0
he
כיצד על היישום להגיב במקרה של אי התאמה בין הרכישות שיש לעדכן הסיכום שלהן?
@SYS62159
0
0
en-us
Default values for summary update
@SYS57798
0
0
he
ערכי ברירת מחדל עבוד עדכון סיכום
@SYS57798
0
0
en-us
Default value of summary updates when several orders are to be posted at the same time.
@SYS68938
0
0
he
ערך ברירת מחדל של עדכוני סיכום כאשר יש לרשום מספר הזמנות בו-זמנית.
@SYS68938
0
0
en-us
Post to charge account in ledger
@SYS78185
0
0
he
רשום בחשבון חיוב בספר ראשי
@SYS78185
0
0
en-us
Post to charge account in ledger?
@SYS78186
0
0
he
האם לרשום בחשבון חיוב בספר ראשי?
@SYS78186
0
0
en-us
Purchase order
@SYS15812
0
0
he
הזמנת רכש
@SYS15812
0
0
en-us
Journal default values
@BPL46
0
0
he
יומנים ברירת מחדל
@BPL46
0
0
en-us
Cash flow forecast
@SYS5727
0
0
he
תחזית תזרים מזומנים
@SYS5727
0
0
en-us
Credit note
@SYS8125
0
0
he
תעודת זיכוי
@SYS8125
0
0
en-us
Default values
@SYS21682
0
0
he
ערכי ברירת מחדל
@SYS21682
0
0
en-us
Invoice
An invoice, not to invoice
@SYS12128
0
0
he
חשבונית
An invoice, not to invoice
@SYS12128
0
0
en-us
Invoice layout
@SYS57781
0
0
he
פריסת חשבונית
@SYS57781
0
0
en-us
Packing slip
@SYS11549
0
0
he
תעודת משלוח
@SYS11549
0
0
en-us
Paper format
@SYS15512
0
0
he
תבנית נייר
@SYS15512
0
0
en-us
Posting
@SYS5943
0
0
he
רישום
@SYS5943
0
0
en-us
Prices
@SYS12983
0
0
he
מחירים
@SYS12983
0
0
en-us
Print
@SYS920
0
0
he
הדפס
@SYS920
0
0
en-us
Purchase order layout
@SYS62372
0
0
he
פריסת הזמנת רכש
@SYS62372
0
0
en-us
Split based on delivery information
@SYS78278
0
0
he
פצל בהתבסס על פרטי מסירה
@SYS78278
0
0
en-us
Summary update
@SYS57755
0
0
he
עדכון סיכום
@SYS57755
0
0
en-us
Cannot delete transaction.
@SYS23721
0
0
he
לא ניתן למחוק את התנועה.
@SYS23721
0
0
***Element: DBT
; Microsoft Dynamics AX Table : PurchLine unloaded
; --------------------------------------------------------------------------------
TABLEVERSION 1
TABLE #PurchLine
Id 340
PROPERTIES
Name #PurchLine
Label #@SYS9664
TitleField1 #PurchId
TitleField2 #ItemId
ConfigurationKey #LogisticsBasic
SecurityKey #VendTables
CacheLookup #NotInTTS
CreateRecIdIndex #Yes
TableGroup #WorksheetLine
PrimaryIndex #TransIdIdx
ClusterIndex #PurchLineIdx
CreatedDateTime #Yes
DeveloperDocumentation #@SYS124476
ENDPROPERTIES
FIELDS
FIELD #PurchId
Id 1
STRING
PROPERTIES
Name #PurchId
HelpText #@SYS13121
Mandatory #Yes
AllowEditOnCreate #No
AllowEdit #No
Table #PurchLine
ExtendedDataType
ARRAY
#PurchIdBase
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #LineNum
Id 2
REAL
PROPERTIES
Name #LineNum
HelpText #@SYS4691
AllowEditOnCreate #No
AllowEdit #No
Table #PurchLine
ExtendedDataType
ARRAY
#LineNum
#
ENDARRAY
ENDPROPERTIES
FIELD #ItemId
Id 3
STRING
PROPERTIES
Name #ItemId
HelpText #@SYS2882
Mandatory #Yes
Table #PurchLine
ExtendedDataType
ARRAY
#ItemIdSmall
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #PurchStatus
Id 4
ENUM
PROPERTIES
Name #PurchStatus
Label #@SYS7161
HelpText #@SYS6391
AllowEditOnCreate #No
AllowEdit #No
Table #PurchLine
EnumType #PurchStatus
ENDPROPERTIES
FIELD #ShippingDateRequested
Id 5
DATE
PROPERTIES
Name #ShippingDateRequested
Visible #No
Table #PurchLine
ExtendedDataType
ARRAY
#SalesShippingDateRequested
#
ENDARRAY
ENDPROPERTIES
FIELD #LedgerAccount
Id 6
STRING
PROPERTIES
Name #LedgerAccount
HelpText #@SYS7102
Table #PurchLine
ExtendedDataType
ARRAY
#PurchLedgerAccount
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #DeliveryDate
Id 7
DATE
PROPERTIES
Name #DeliveryDate
HelpText #@SYS3828
Table #PurchLine
ExtendedDataType
ARRAY
#PurchLineDlvDate
#
ENDARRAY
ENDPROPERTIES
FIELD #Name
Id 8
STRING
PROPERTIES
Name #Name
HelpText #@SYS2102
Table #PurchLine
ExtendedDataType
ARRAY
#ItemFreeTxt
#
ENDARRAY
StringSize #1000
ENDPROPERTIES
FIELD #TaxGroup
Id 9
STRING
PROPERTIES
Name #TaxGroup
HelpText #@SYS21920
Table #PurchLine
ExtendedDataType
ARRAY
#TaxGroup
#
ENDARRAY
ENDPROPERTIES
FIELD #QtyOrdered
Id 10
REAL
PROPERTIES
Name #QtyOrdered
HelpText #@SYS8090
Table #PurchLine
ExtendedDataType
ARRAY
#InventQty
#
ENDARRAY
ENDPROPERTIES
FIELD #PurchReceivedNow
Id 11
REAL
PROPERTIES
Name #PurchReceivedNow
Label #@SYS1743
HelpText #@SYS69028
Table #PurchLine
ExtendedDataType
ARRAY
#PurchQty
#
ENDARRAY
ENDPROPERTIES
FIELD #RemainPurchPhysical
Id 12
REAL
PROPERTIES
Name #RemainPurchPhysical
Label #@SYS22556
HelpText #@SYS27457
AllowEditOnCreate #No
AllowEdit #No
Table #PurchLine
ExtendedDataType
ARRAY
#PurchQty
#
ENDARRAY
ENDPROPERTIES
FIELD #RemainPurchFinancial
Id 13
REAL
PROPERTIES
Name #RemainPurchFinancial
Label #@SYS22380
HelpText #@SYS27459
AllowEditOnCreate #No
AllowEdit #No
Table #PurchLine
ExtendedDataType
ARRAY
#PurchQty
#
ENDARRAY
ENDPROPERTIES
FIELD #PriceUnit
Id 14
REAL
PROPERTIES
Name #PriceUnit
HelpText #@SYS3472
Table #PurchLine
ExtendedDataType
ARRAY
#PriceUnit
#
ENDARRAY
ENDPROPERTIES
FIELD #PurchPrice
Id 15
REAL
PROPERTIES
Name #PurchPrice
Label #@SYS11770
HelpText #@SYS5369
Table #PurchLine
ExtendedDataType
ARRAY
#PurchPrice
#
ENDARRAY
ENDPROPERTIES
FIELD #CurrencyCode
Id 16
STRING
PROPERTIES
Name #CurrencyCode
HelpText #@SYS6734
Mandatory #Yes
Table #PurchLine
ExtendedDataType
ARRAY
#VendCurrencyCode
#
ENDARRAY
StringSize #3
ENDPROPERTIES
FIELD #LinePercent
Id 17
REAL
PROPERTIES
Name #LinePercent
Table #PurchLine
ExtendedDataType
ARRAY
#PurchLinePercent
#
ENDARRAY
ENDPROPERTIES
FIELD #LineDisc
Id 18
REAL
PROPERTIES
Name #LineDisc
Table #PurchLine
ExtendedDataType
ARRAY
#PurchLineDisc
#
ENDARRAY
ENDPROPERTIES
FIELD #LineAmount
Id 19
REAL
PROPERTIES
Name #LineAmount
Table #PurchLine
ExtendedDataType
ARRAY
#PurchLineAmount
#
ENDARRAY
ENDPROPERTIES
FIELD #ExternalItemId
Id 20
STRING
PROPERTIES
Name #ExternalItemId
Table #PurchLine
ExtendedDataType
ARRAY
#PurchExternalItemId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #PurchUnit
Id 21
STRING
PROPERTIES
Name #PurchUnit
Table #PurchLine
ExtendedDataType
ARRAY
#PurchUnit
#
ENDARRAY
ENDPROPERTIES
FIELD #Dimension
Id 22
STRING
PROPERTIES
Name #Dimension
Table #PurchLine
ExtendedDataType
ARRAY
#Dimension
#
ENDARRAY
ENDPROPERTIES
FIELD #ConfirmedDlv
Id 23
DATE
PROPERTIES
Name #ConfirmedDlv
Label #@SYS8985
HelpText #@SYS931
Table #PurchLine
ExtendedDataType
ARRAY
#PurchLineDlvDate
#
ENDARRAY
ENDPROPERTIES
FIELD #AddressRefRecId
Id 24
INT64
PROPERTIES
Name #AddressRefRecId
AllowEditOnCreate #No
AllowEdit #No
Visible #No
Table #PurchLine
ExtendedDataType
ARRAY
#AddressRefRecId
#
ENDARRAY
ENDPROPERTIES
FIELD #InventTransId
Id 25
STRING
PROPERTIES
Name #InventTransId
AllowEditOnCreate #No
AllowEdit #No
Table #PurchLine
ExtendedDataType
ARRAY
#InventTransId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #VendGroup
Id 26
STRING
PROPERTIES
Name #VendGroup
Label #@SYS3815
HelpText #@SYS9253
Mandatory #Yes
AllowEditOnCreate #No
AllowEdit #No
Table #PurchLine
ExtendedDataType
ARRAY
#VendGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #VendAccount
Id 27
STRING
PROPERTIES
Name #VendAccount
Mandatory #Yes
Table #PurchLine
ExtendedDataType
ARRAY
#VendAccount
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #AddressRefTableId
Id 28
INT
PROPERTIES
Name #AddressRefTableId
AllowEditOnCreate #No
AllowEdit #No
Visible #No
Table #PurchLine
ExtendedDataType
ARRAY
#AddressRefTableId
#
ENDARRAY
ENDPROPERTIES
FIELD #PurchQty
Id 29
REAL
PROPERTIES
Name #PurchQty
Table #PurchLine
ExtendedDataType
ARRAY
#PurchOrderedQty
#
ENDARRAY
ENDPROPERTIES
FIELD #PurchMarkup
Id 30
REAL
PROPERTIES
Name #PurchMarkup
HelpText #@SYS16914
Table #PurchLine
ExtendedDataType
ARRAY
#PurchMarkup
#
ENDARRAY
ENDPROPERTIES
FIELD #InventReceivedNow
Id 31
REAL
PROPERTIES
Name #InventReceivedNow
Label #@SYS1743
HelpText #@SYS12421
Table #PurchLine
ExtendedDataType
ARRAY
#InventQty
#
ENDARRAY
ENDPROPERTIES
FIELD #MultiLnDisc
Id 32
REAL
PROPERTIES
Name #MultiLnDisc
Table #PurchLine
ExtendedDataType
ARRAY
#PurchMultiLnDisc
#
ENDARRAY
ENDPROPERTIES
FIELD #MultiLnPercent
Id 33
REAL
PROPERTIES
Name #MultiLnPercent
Table #PurchLine
ExtendedDataType
ARRAY
#PurchMultiLnPercent
#
ENDARRAY
ENDPROPERTIES
FIELD #PurchaseType
Id 34
ENUM
PROPERTIES
Name #PurchaseType
Label #@SYS1201
HelpText #@SYS17049
AllowEditOnCreate #No
AllowEdit #No
Table #PurchLine
EnumType #PurchaseType
ENDPROPERTIES
FIELD #CovRef
Id 35
ENUM
PROPERTIES
Name #CovRef
HelpText #@SYS17021
AllowEditOnCreate #No
AllowEdit #No
Table #PurchLine
EnumType #PurchCovRef
ENDPROPERTIES
FIELD #RemainInventPhysical
Id 36
REAL
PROPERTIES
Name #RemainInventPhysical
Label #@SYS22556
HelpText #@SYS11699
AllowEditOnCreate #No
AllowEdit #No
Table #PurchLine
ExtendedDataType
ARRAY
#InventQty
#
ENDARRAY
ENDPROPERTIES
FIELD #TaxItemGroup
Id 37
STRING
PROPERTIES
Name #TaxItemGroup
Table #PurchLine
ExtendedDataType
ARRAY
#TaxItemGroup
#
ENDARRAY
ENDPROPERTIES
FIELD #TransactionCode
Id 38
STRING
PROPERTIES
Name #TransactionCode
Table #PurchLine
ExtendedDataType
ARRAY
#IntrastatTransactionCodeId
#
ENDARRAY
ENDPROPERTIES
FIELD #ShippingDateConfirmed
Id 39
DATE
PROPERTIES
Name #ShippingDateConfirmed
Visible #No
Table #PurchLine
ExtendedDataType
ARRAY
#SalesShippingDateConfirmed
#
ENDARRAY
ENDPROPERTIES
FIELD #CountyOrigDest
Id 40
STRING
PROPERTIES
Name #CountyOrigDest
Table #PurchLine
AnalysisVisibility #Low
ExtendedDataType
ARRAY
#AddressCountyOrigDest
#
ENDARRAY
ENDPROPERTIES
FIELD #DEL_DlvState
Id 41
STRING
PROPERTIES
Name #DEL_DlvState
ConfigurationKey #SysDeletedObjects40
Table #PurchLine
ExtendedDataType
ARRAY
#DEL_IntrastatDlvStat
#
ENDARRAY
ENDPROPERTIES
FIELD #TaxAutogenerated
Id 43
ENUM
PROPERTIES
Name #TaxAutogenerated
Table #PurchLine
ExtendedDataType
ARRAY
#TaxAutoGenerated
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #UnderDeliveryPct
Id 44
REAL
PROPERTIES
Name #UnderDeliveryPct
Table #PurchLine
ExtendedDataType
ARRAY
#PurchUnderDeliveryPct
#
ENDARRAY
ENDPROPERTIES
FIELD #OverDeliveryPct
Id 45
REAL
PROPERTIES
Name #OverDeliveryPct
Table #PurchLine
ExtendedDataType
ARRAY
#PurchOverDeliveryPct
#
ENDARRAY
ENDPROPERTIES
FIELD #Tax1099Box
Id 46
STRING
PROPERTIES
Name #Tax1099Box
Table #PurchLine
ExtendedDataType
ARRAY
#Tax1099Box
#
ENDARRAY
ENDPROPERTIES
FIELD #Tax1099Amount
Id 47
REAL
PROPERTIES
Name #Tax1099Amount
Table #PurchLine
ExtendedDataType
ARRAY
#Tax1099Amount
#
ENDARRAY
ENDPROPERTIES
FIELD #BarCode
Id 48
STRING
PROPERTIES
Name #BarCode
Table #PurchLine
ExtendedDataType
ARRAY
#PurchBarCode
#
ENDARRAY
StringSize #80
ENDPROPERTIES
FIELD #BarCodeType
Id 49
STRING
PROPERTIES
Name #BarCodeType
Table #PurchLine
ExtendedDataType
ARRAY
#BarcodeSetupId
#
ENDARRAY
ENDPROPERTIES
FIELD #InventRefId
Id 50
STRING
PROPERTIES
Name #InventRefId
Table #PurchLine
ExtendedDataType
ARRAY
#InventRefId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #InventRefTransId
Id 51
STRING
PROPERTIES
Name #InventRefTransId
Table #PurchLine
ExtendedDataType
ARRAY
#InventRefTransId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #ItemRefType
Id 52
ENUM
PROPERTIES
Name #ItemRefType
Table #PurchLine
EnumType #InventRefType
ENDPROPERTIES
FIELD #ProjTransId
Id 53
STRING
PROPERTIES
Name #ProjTransId
AllowEditOnCreate #No
AllowEdit #No
Table #PurchLine
ExtendedDataType
ARRAY
#ProjItemTransId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #Blocked
Id 54
ENUM
PROPERTIES
Name #Blocked
Table #PurchLine
ExtendedDataType
ARRAY
#LineStopped
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #Complete
Id 55
ENUM
PROPERTIES
Name #Complete
Table #PurchLine
ExtendedDataType
ARRAY
#LineComplete
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #ReqPlanIdSched
Id 56
STRING
PROPERTIES
Name #ReqPlanIdSched
AllowEdit #No
Table #PurchLine
ExtendedDataType
ARRAY
#ReqPlanIdSched
#
ENDARRAY
ENDPROPERTIES
FIELD #ReqPOId
Id 57
STRING
PROPERTIES
Name #ReqPOId
AllowEdit #No
Table #PurchLine
ExtendedDataType
ARRAY
#ReqPOId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #ItemRouteId
Id 58
STRING
PROPERTIES
Name #ItemRouteId
Table #PurchLine
ExtendedDataType
ARRAY
#ItemRouteId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #ItemBOMId
Id 59
STRING
PROPERTIES
Name #ItemBOMId
Table #PurchLine
ExtendedDataType
ARRAY
#ItemBOMId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #LineHeader
Id 60
STRING
PROPERTIES
Name #LineHeader
Table #PurchLine
ExtendedDataType
ARRAY
#LineHeader
#
ENDARRAY
StringSize #80
ENDPROPERTIES
FIELD #Scrap
Id 61
ENUM
PROPERTIES
Name #Scrap
Label #@SYS24894
HelpText #@SYS29137
Table #PurchLine
EnumType #NoYes
ENDPROPERTIES
FIELD #ReturnActionId
Id 62
STRING
PROPERTIES
Name #ReturnActionId
Table #PurchLine
ExtendedDataType
ARRAY
#PurchReturnActionId
#
ENDARRAY
ENDPROPERTIES
FIELD #InterCompanyOrigin
Id 63
ENUM
PROPERTIES
Name #InterCompanyOrigin
AllowEditOnCreate #No
AllowEdit #No
Visible #No
Table #PurchLine
EnumType #InterCompanyOrigin
ENDPROPERTIES
FIELD #ProjCategoryId
Id 64
STRING
PROPERTIES
Name #ProjCategoryId
Table #PurchLine
ExtendedDataType
ARRAY
#ProjCategoryId
#
ENDARRAY
ENDPROPERTIES
FIELD #ProjId
Id 65
STRING
PROPERTIES
Name #ProjId
Table #PurchLine
ExtendedDataType
ARRAY
#ProjId
#
ENDARRAY
ENDPROPERTIES
FIELD #InventDimId
Id 66
STRING
PROPERTIES
Name #InventDimId
AllowEditOnCreate #No
AllowEdit #No
Visible #No
Table #PurchLine
ExtendedDataType
ARRAY
#InventDimId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #Transport
Id 67
STRING
PROPERTIES
Name #Transport
Table #PurchLine
ExtendedDataType
ARRAY
#IntrastatTransport
#
ENDARRAY
ENDPROPERTIES
FIELD #StatProcId
Id 68
STRING
PROPERTIES
Name #StatProcId
Table #PurchLine
ExtendedDataType
ARRAY
#IntrastatProcId
#
ENDARRAY
ENDPROPERTIES
FIELD #Port
Id 69
STRING
PROPERTIES
Name #Port
Table #PurchLine
ExtendedDataType
ARRAY
#IntrastatPortId
#
ENDARRAY
ENDPROPERTIES
FIELD #AssetId
Id 70
STRING
PROPERTIES
Name #AssetId
Table #PurchLine
ExtendedDataType
ARRAY
#AssetIdOpen
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #AssetTransTypePurch
Id 71
ENUM
PROPERTIES
Name #AssetTransTypePurch
Table #PurchLine
ExtendedDataType
ARRAY
#AssetTransTypePurchEDT
#
ENDARRAY
EnumType #AssetTransTypePurch
ENDPROPERTIES
FIELD #AssetBookId
Id 72
STRING
PROPERTIES
Name #AssetBookId
Table #PurchLine
ExtendedDataType
ARRAY
#AssetBookIdPurchSalesInvent
#
ENDARRAY
ENDPROPERTIES
FIELD #ProjLinePropertyId
Id 73
STRING
PROPERTIES
Name #ProjLinePropertyId
Table #PurchLine
ExtendedDataType
ARRAY
#ProjLinePropertyId
#
ENDARRAY
ENDPROPERTIES
FIELD #ProjTaxItemGroupId
Id 74
STRING
PROPERTIES
Name #ProjTaxItemGroupId
HelpText #@SYS67873
Table #PurchLine
ExtendedDataType
ARRAY
#ProjTaxItemGroup
#
ENDARRAY
ENDPROPERTIES
FIELD #ProjTaxGroupId
Id 75
STRING
PROPERTIES
Name #ProjTaxGroupId
HelpText #@SYS67872
Table #PurchLine
ExtendedDataType
ARRAY
#ProjTaxGroup
#
ENDARRAY
ENDPROPERTIES
FIELD #ProjSalesPrice
Id 76
REAL
PROPERTIES
Name #ProjSalesPrice
Table #PurchLine
ExtendedDataType
ARRAY
#ProjSalesPriceCost
#
ENDARRAY
ENDPROPERTIES
FIELD #ProjSalesCurrencyId
Id 77
STRING
PROPERTIES
Name #ProjSalesCurrencyId
Label #@SYS56480
HelpText #@SYS20788
Table #PurchLine
ExtendedDataType
ARRAY
#CurrencyCode
#
ENDARRAY
StringSize #3
ENDPROPERTIES
FIELD #InterCompanyInventTransId
Id 79
STRING
PROPERTIES
Name #InterCompanyInventTransId
ConfigurationKey #TradeInterCompany
Table #PurchLine
ExtendedDataType
ARRAY
#InventRefTransId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #ProjSalesUnitId
Id 80
STRING
PROPERTIES
Name #ProjSalesUnitId
Table #PurchLine
ExtendedDataType
ARRAY
#UnitID
#
ENDARRAY
ENDPROPERTIES
FIELD #DeliveryAddress
Id 81
STRING
PROPERTIES
Name #DeliveryAddress
Label #@SYS7924
HelpText #@SYS27762
AllowEditOnCreate #No
AllowEdit #No
ConfigurationKey #TradeMultiShipTo
Table #PurchLine
ExtendedDataType
ARRAY
#Addressing
#
ENDARRAY
StringSize #250
ENDPROPERTIES
FIELD #DeliveryName
Id 82
STRING
PROPERTIES
Name #DeliveryName
Label #@SYS22058
HelpText #@SYS17217
GroupPrompt #@SYS7399
ConfigurationKey #TradeMultiShipTo
Table #PurchLine
ExtendedDataType
ARRAY
#Name
#
ENDARRAY
StringSize #60
ENDPROPERTIES
FIELD #DeliveryStreet
Id 83
STRING
PROPERTIES
Name #DeliveryStreet
ConfigurationKey #TradeMultiShipTo
Table #PurchLine
ExtendedDataType
ARRAY
#AddressStreet
#
ENDARRAY
StringSize #250
ENDPROPERTIES
FIELD #DeliveryZipCode
Id 84
STRING
PROPERTIES
Name #DeliveryZipCode
HelpText #@SYS17884
ConfigurationKey #TradeMultiShipTo
Table #PurchLine
ExtendedDataType
ARRAY
#AddressZipCodeId
#
ENDARRAY
ENDPROPERTIES
FIELD #DeliveryCity
Id 85
STRING
PROPERTIES
Name #DeliveryCity
ConfigurationKey #TradeMultiShipTo
Table #PurchLine
ExtendedDataType
ARRAY
#AddressCity
#
ENDARRAY
StringSize #60
ENDPROPERTIES
FIELD #DeliveryCounty
Id 86
STRING
PROPERTIES
Name #DeliveryCounty
HelpText #@SYS17885
ConfigurationKey #TradeMultiShipTo
Table #PurchLine
ExtendedDataType
ARRAY
#AddressCountyId
#
ENDARRAY
ENDPROPERTIES
FIELD #DeliveryState
Id 87
STRING
PROPERTIES
Name #DeliveryState
HelpText #@SYS27941
ConfigurationKey #TradeMultiShipTo
Table #PurchLine
ExtendedDataType
ARRAY
#AddressStateId
#
ENDARRAY
ENDPROPERTIES
FIELD #DeliveryCountryRegionId
Id 88
STRING
PROPERTIES
Name #DeliveryCountryRegionId
HelpText #@SYS17886
ConfigurationKey #TradeMultiShipTo
Table #PurchLine
ExtendedDataType
ARRAY
#AddressCountryRegionId
#
ENDARRAY
ENDPROPERTIES
FIELD #DeliveryType
Id 89
ENUM
PROPERTIES
Name #DeliveryType
AllowEdit #No
Table #PurchLine
ExtendedDataType
ARRAY
#TradeLineDlvTypeId
#
ENDARRAY
EnumType #TradeLineDlvType
ENDPROPERTIES
FIELD #CustomerRef
Id 90
STRING
PROPERTIES
Name #CustomerRef
Table #PurchLine
ExtendedDataType
ARRAY
#CustRefLine
#
ENDARRAY
StringSize #60
ENDPROPERTIES
FIELD #CustPurchaseOrderFormNum
Id 91
STRING
PROPERTIES
Name #CustPurchaseOrderFormNum
Table #PurchLine
ExtendedDataType
ARRAY
#CustPurchaseOrder
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #SkipUpdate
Id 92
ENUM
PROPERTIES
Name #SkipUpdate
SaveContents #No
Visible #No
Table #PurchLine
EnumType #InterCompanySkipUpdate
ENDPROPERTIES
FIELD #DEL_RefDlvZipCode
Id 93
INT64
PROPERTIES
Name #DEL_RefDlvZipCode
AllowEditOnCreate #No
AllowEdit #No
ConfigurationKey #SysDeletedObjects40
Table #PurchLine
ExtendedDataType
ARRAY
#RefRecId
#
ENDARRAY
ENDPROPERTIES
FIELD #BlanketRefTransId
Id 94
STRING
PROPERTIES
Name #BlanketRefTransId
AllowEditOnCreate #No
AllowEdit #No
Table #PurchLine
ExtendedDataType
ARRAY
#PurchBlanketRefTransId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #StatTriangularDeal
Id 95
ENUM
PROPERTIES
Name #StatTriangularDeal
AllowEdit #No
Table #PurchLine
ExtendedDataType
ARRAY
#IntrastatTriangularDeal
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #Tax1099State
Id 96
STRING
PROPERTIES
Name #Tax1099State
Table #PurchLine
ExtendedDataType
ARRAY
#Tax1099State
#
ENDARRAY
ENDPROPERTIES
FIELD #Tax1099StateAmount
Id 97
REAL
PROPERTIES
Name #Tax1099StateAmount
Table #PurchLine
ExtendedDataType
ARRAY
#Tax1099StateAmount
#
ENDARRAY
ENDPROPERTIES
FIELD #ItemTagging
Id 98
ENUM
PROPERTIES
Name #ItemTagging
Table #PurchLine
ExtendedDataType
ARRAY
#RFIDItemTagging
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #CaseTagging
Id 99
ENUM
PROPERTIES
Name #CaseTagging
Table #PurchLine
ExtendedDataType
ARRAY
#RFIDCaseTagging
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #PalletTagging
Id 100
ENUM
PROPERTIES
Name #PalletTagging
Table #PurchLine
ExtendedDataType
ARRAY
#RFIDPalletTagging
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #DEL_InterCompanyReturnActionId
Id 101
STRING
PROPERTIES
Name #DEL_InterCompanyReturnActionId
AllowEditOnCreate #No
AllowEdit #No
Visible #No
ConfigurationKey #SysDeletedObjects41
Table #PurchLine
ExtendedDataType
ARRAY
#SalesReturnActionId
#
ENDARRAY
ENDPROPERTIES
FIELD #DEL_InterCompanyReturnActionTxt
Id 102
STRING
PROPERTIES
Name #DEL_InterCompanyReturnActionTxt
AllowEditOnCreate #No
AllowEdit #No
Visible #No
ConfigurationKey #SysDeletedObjects41
Table #PurchLine
ExtendedDataType
ARRAY
#Description
#
ENDARRAY
StringSize #60
ENDPROPERTIES
FIELD #DEL_CorrectiveReason
Id 103
STRING
PROPERTIES
Name #DEL_CorrectiveReason
Visible #No
ConfigurationKey #SysDeletedObjects40
Table #PurchLine
ExtendedDataType
ARRAY
#DEL_CustVendCorrectiveReason_ES
#
ENDARRAY
StringSize #(Memo)
ENDPROPERTIES
FIELD #RemainInventFinancial
Id 105
REAL
PROPERTIES
Name #RemainInventFinancial
Label #@SYS22380
HelpText #@SYS27459
AllowEditOnCreate #No
Table #PurchLine
ExtendedDataType
ARRAY
#InventQty
#
ENDARRAY
ENDPROPERTIES
FIELD #PurchReqLineRefId
Id 106
GUID
PROPERTIES
Name #PurchReqLineRefId
Visible #No
Table #PurchLine
ExtendedDataType
ARRAY
#PurchReqLineRefId
#
ENDARRAY
ENDPROPERTIES
FIELD #DepreciationStartDate
Id 107
DATE
PROPERTIES
Name #DepreciationStartDate
ConfigurationKey #CRSEItaly
Table #PurchLine
ExtendedDataType
ARRAY
#AssetDepreciationStartDate
#
ENDARRAY
ENDPROPERTIES
FIELD #ActivityNumber
Id 108
STRING
PROPERTIES
Name #ActivityNumber
Table #PurchLine
ExtendedDataType
ARRAY
#ProjActivityNumber
#
ENDARRAY
ENDPROPERTIES
FIELD #ReturnStatus
Id 109
ENUM
PROPERTIES
Name #ReturnStatus
AllowEditOnCreate #No
AllowEdit #No
Visible #No
Table #PurchLine
EnumType #ReturnStatusLine
ENDPROPERTIES
FIELD #ReturnDispositionCodeId
Id 110
STRING
PROPERTIES
Name #ReturnDispositionCodeId
AllowEditOnCreate #No
AllowEdit #No
Table #PurchLine
ExtendedDataType
ARRAY
#ReturnDispositionCodeId
#
ENDARRAY
ENDPROPERTIES
FIELD #CreateFixedAsset
Id 111
ENUM
PROPERTIES
Name #CreateFixedAsset
Label #@SYS115671
HelpText #@SYS115672
Table #PurchLine
EnumType #NoYes
ENDPROPERTIES
FIELD #AssetGroup
Id 112
STRING
PROPERTIES
Name #AssetGroup
Table #PurchLine
ExtendedDataType
ARRAY
#AssetGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #Requisitioner
Id 113
STRING
PROPERTIES
Name #Requisitioner
Table #PurchLine
ExtendedDataType
ARRAY
#PurchRequisitioner
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #ReqAttention
Id 114
STRING
PROPERTIES
Name #ReqAttention
Table #PurchLine
ExtendedDataType
ARRAY
#PurchReqAttention
#
ENDARRAY
StringSize #255
ENDPROPERTIES
FIELD #PurchReqId
Id 115
STRING
PROPERTIES
Name #PurchReqId
Table #PurchLine
ExtendedDataType
ARRAY
#PurchReqId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #GSTHSTTaxType_CA
Id 235
ENUM
PROPERTIES
Name #GSTHSTTaxType_CA
Table #PurchLine
EnumType #GSTHSTTaxType_CA
ENDPROPERTIES
FIELD #itemPBAId
Id 8001
STRING
PROPERTIES
Name #itemPBAId
Table #PurchLine
ExtendedDataType
ARRAY
#PBAId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #BPLImpFolderId
Id 20001
STRING
PROPERTIES
Name #BPLImpFolderId
ConfigurationKey #CRSEIsrael
Table #PurchLine
ExtendedDataType
ARRAY
#BPLImpFolderId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #BPLAppChargeAff
Id 20002
ENUM
PROPERTIES
Name #BPLAppChargeAff
Label #@BPL93
HelpText #@BPL93
AllowEditOnCreate #No
AllowEdit #No
ConfigurationKey #CRSEIsrael
Table #PurchLine
EnumType #NoYes
ENDPROPERTIES
FIELD #BPLAppCharge
Id 20003
ENUM
PROPERTIES
Name #BPLAppCharge
Label #@BPL125
HelpText #@BPL125
AllowEditOnCreate #No
AllowEdit #No
ConfigurationKey #CRSEIsrael
Table #PurchLine
EnumType #NoYes
ENDPROPERTIES
FIELD #BPLMarked
Id 20004
ENUM
PROPERTIES
Name #BPLMarked
Label #@SYS7678
HelpText #@SYS7678
ConfigurationKey #CRSEIsrael
Table #PurchLine
EnumType #NoYes
ENDPROPERTIES
FIELD #BPLClosedToImpFolder
Id 20005
ENUM
PROPERTIES
Name #BPLClosedToImpFolder
Label #@BPL68
HelpText #@BPL68
ConfigurationKey #CRSEIsrael
Table #PurchLine
EnumType #NoYes
ENDPROPERTIES
FIELD #BPLRequestedDlvDate
Id 20006
DATE
PROPERTIES
Name #BPLRequestedDlvDate
Mandatory #Yes
ConfigurationKey #CRSEIsrael
Table #PurchLine
ExtendedDataType
ARRAY
#BPLRequestedDlvDate
#
ENDARRAY
ENDPROPERTIES
FIELD #BPLVendorConfirmedDlvDate
Id 20007
DATE
PROPERTIES
Name #BPLVendorConfirmedDlvDate
ConfigurationKey #CRSEIsrael
Table #PurchLine
ExtendedDataType
ARRAY
#BPLVendorConfirmedDlvDate
#
ENDARRAY
ENDPROPERTIES
ENDFIELDS
GROUPS
GROUP #AutoReport
PROPERTIES
Name #AutoReport
ENDPROPERTIES
GROUPFIELDS
#PurchId
#ItemId
#PurchQty
#PurchPrice
#LineAmount
#CurrencyCode
#PurchStatus
ENDGROUPFIELDS
ENDGROUP
GROUP #AddressDisplay
PROPERTIES
Name #AddressDisplay
Label #@SYS9362
ENDPROPERTIES
GROUPFIELDS
#DeliveryAddress
ENDGROUPFIELDS
ENDGROUP
GROUP #AddressLookup
PROPERTIES
Name #AddressLookup
Label #@SYS88672
ENDPROPERTIES
GROUPFIELDS
#LineNum
#PurchId
#VendAccount
ENDGROUPFIELDS
ENDGROUP
GROUP #AddressReference
PROPERTIES
Name #AddressReference
Label #@SYS88679
ENDPROPERTIES
GROUPFIELDS
#AddressRefRecId
#AddressRefTableId
ENDGROUPFIELDS
ENDGROUP
GROUP #Attention
PROPERTIES
Name #Attention
Label #@SYS1593
ENDPROPERTIES
GROUPFIELDS
#ReqAttention
ENDGROUPFIELDS
ENDGROUP
GROUP #Barcode
PROPERTIES
Name #Barcode
Label #@SYS24296
ENDPROPERTIES
GROUPFIELDS
#BarCode
#BarCodeType
ENDGROUPFIELDS
ENDGROUP
GROUP #BlanketOrder
PROPERTIES
Name #BlanketOrder
Label #@SYS59511
ENDPROPERTIES
GROUPFIELDS
#BlanketRefTransId
ENDGROUPFIELDS
ENDGROUP
GROUP #Block
PROPERTIES
Name #Block
Label #@SYS28075
ENDPROPERTIES
GROUPFIELDS
#Blocked
#Complete
ENDGROUPFIELDS
ENDGROUP
GROUP #BOMRoute
PROPERTIES
Name #BOMRoute
Label #@SYS22227
ENDPROPERTIES
GROUPFIELDS
#ItemRouteId
#ItemBOMId
#itemPBAId
ENDGROUPFIELDS
ENDGROUP
GROUP #BPLAllFields
PROPERTIES
Name #BPLAllFields
Label #@BPL141
ENDPROPERTIES
GROUPFIELDS
#BPLImpFolderId
#BPLAppChargeAff
#BPLAppCharge
#BPLMarked
#BPLClosedToImpFolder
#BPLRequestedDlvDate
#BPLVendorConfirmedDlvDate
ENDGROUPFIELDS
ENDGROUP
GROUP #BPLGrpImpFolder
PROPERTIES
Name #BPLGrpImpFolder
Label #@BPL94
ENDPROPERTIES
GROUPFIELDS
#BPLImpFolderIdDisplay
#BPLAppChargeAff
ENDGROUPFIELDS
ENDGROUP
GROUP #BPLGrpImpFolderGen
PROPERTIES
Name #BPLGrpImpFolderGen
Label #@BPL94
ENDPROPERTIES
GROUPFIELDS
#BPLImpFolderId
#BPLAppChargeAff
#BPLAppCharge
#BPLMarked
#BPLClosedToImpFolder
#BPLRequestedDlvDate
#BPLVendorConfirmedDlvDate
ENDGROUPFIELDS
ENDGROUP
GROUP #Delivery
PROPERTIES
Name #Delivery
Label #@SYS4508
ENDPROPERTIES
GROUPFIELDS
#OverDeliveryPct
#UnderDeliveryPct
#DeliveryDate
#ConfirmedDlv
#DeliveryType
ENDGROUPFIELDS
ENDGROUP
GROUP #DeliveryAddress
PROPERTIES
Name #DeliveryAddress
Label #@SYS7924
ENDPROPERTIES
GROUPFIELDS
#DeliveryName
#DeliveryStreet
#DeliveryZipCode
#DeliveryCity
#DeliveryCounty
#DeliveryState
#DeliveryCountryRegionId
ENDGROUPFIELDS
ENDGROUP
GROUP #DeliveryRef
PROPERTIES
Name #DeliveryRef
Label #@SYS78577
ENDPROPERTIES
GROUPFIELDS
#CustPurchaseOrderFormNum
#CustomerRef
ENDGROUPFIELDS
ENDGROUP
GROUP #Dimension
PROPERTIES
Name #Dimension
Label #@SYS5951
ENDPROPERTIES
GROUPFIELDS
#Dimension
ENDGROUPFIELDS
ENDGROUP
GROUP #Discount
PROPERTIES
Name #Discount
Label #@SYS11829
ENDPROPERTIES
GROUPFIELDS
#LineDisc
#LinePercent
#MultiLnDisc
#MultiLnPercent
ENDGROUPFIELDS
ENDGROUP
GROUP #FixedAssets
PROPERTIES
Name #FixedAssets
Label #@SYS12578
ENDPROPERTIES
GROUPFIELDS
#CreateFixedAsset
#AssetGroup
#AssetId
#AssetBookId
#AssetTransTypePurch
#DepreciationStartDate
ENDGROUPFIELDS
ENDGROUP
GROUP #ForeignTrade
PROPERTIES
Name #ForeignTrade
Label #@SYS27650
ENDPROPERTIES
GROUPFIELDS
#TransactionCode
#Transport
#Port
#StatProcId
#StatTriangularDeal
#CountyOrigDest
ENDGROUPFIELDS
ENDGROUP
GROUP #g1099Fields
PROPERTIES
Name #g1099Fields
Label #@SYS24226
ENDPROPERTIES
GROUPFIELDS
#Tax1099Box
#Tax1099Amount
#Tax1099State
#Tax1099StateAmount
ENDGROUPFIELDS
ENDGROUP
GROUP #GSTHSTTaxType_CA
PROPERTIES
Name #GSTHSTTaxType_CA
Label #@SYP2308
ENDPROPERTIES
GROUPFIELDS
#GSTHSTTaxType_CA
ENDGROUPFIELDS
ENDGROUP
GROUP #Identification
PROPERTIES
Name #Identification
Label #@SYS5711
ENDPROPERTIES
GROUPFIELDS
#PurchId
#LineNum
ENDGROUPFIELDS
ENDGROUP
GROUP #Intercompany
PROPERTIES
Name #Intercompany
Label #@SYS74106
ENDPROPERTIES
GROUPFIELDS
#interCompanyOriginDisplay
ENDGROUPFIELDS
ENDGROUP
GROUP #InterCompanyReference
PROPERTIES
Name #InterCompanyReference
Label #@SYS14018
ENDPROPERTIES
GROUPFIELDS
#InterCompanyInventTransId
ENDGROUPFIELDS
ENDGROUP
GROUP #InterCompanyReturn
PROPERTIES
Name #InterCompanyReturn
Label #@SYS95177
ENDPROPERTIES
GROUPFIELDS
#ReturnDispositionCodeId
ENDGROUPFIELDS
ENDGROUP
GROUP #Intrastat
PROPERTIES
Name #Intrastat
Label #@SYS6530
ENDPROPERTIES
GROUPFIELDS
#TransactionCode
#Transport
#Port
#StatProcId
#CountyOrigDest
ENDGROUPFIELDS
ENDGROUP
GROUP #Inventory
PROPERTIES
Name #Inventory
Label #@SYS981
ENDPROPERTIES
GROUPFIELDS
#InventTransId
#QtyOrdered
#RemainInventPhysical
#InventReceivedNow
#RemainInventFinancial
ENDGROUPFIELDS
ENDGROUP
GROUP #ItemReference
PROPERTIES
Name #ItemReference
Label #@SYS24659
ENDPROPERTIES
GROUPFIELDS
#ItemRefType
#InventRefId
#InventRefTransId
ENDGROUPFIELDS
ENDGROUP
GROUP #PlannedOrder
PROPERTIES
Name #PlannedOrder
Label #@SYS8597
ENDPROPERTIES
GROUPFIELDS
#ReqPOId
#ReqPlanIdSched
ENDGROUPFIELDS
ENDGROUP
GROUP #Posting
PROPERTIES
Name #Posting
Label #@SYS5943
ENDPROPERTIES
GROUPFIELDS
#LedgerAccount
ENDGROUPFIELDS
ENDGROUP
GROUP #Price
PROPERTIES
Name #Price
Label #@SYS11865
ENDPROPERTIES
GROUPFIELDS
#PurchPrice
#PurchMarkup
#PriceUnit
ENDGROUPFIELDS
ENDGROUP
GROUP #ProjectCostPrice
PROPERTIES
Name #ProjectCostPrice
Label #@SYS13134
ENDPROPERTIES
GROUPFIELDS
#PurchQty
#PurchPrice
#LineAmount
ENDGROUPFIELDS
ENDGROUP
GROUP #ProjectIdentification
PROPERTIES
Name #ProjectIdentification
Label #@SYS89920
ENDPROPERTIES
GROUPFIELDS
#ProjId
#ActivityNumber
#ProjCategoryId
#ItemId
#ProjLinePropertyId
ENDGROUPFIELDS
ENDGROUP
GROUP #ProjectSalesPrice
PROPERTIES
Name #ProjectSalesPrice
Label #@SYS5755
ENDPROPERTIES
GROUPFIELDS
#ProjSalesCurrencyId
#ProjSalesUnitId
#ProjSalesPrice
ENDGROUPFIELDS
ENDGROUP
GROUP #ProjectSalesTax
PROPERTIES
Name #ProjectSalesTax
Label #@SYS67871
ENDPROPERTIES
GROUPFIELDS
#ProjTaxGroupId
#ProjTaxItemGroupId
ENDGROUPFIELDS
ENDGROUP
GROUP #ProjTransaction
PROPERTIES
Name #ProjTransaction
Label #@SYS15191
ENDPROPERTIES
GROUPFIELDS
#ProjTransId
ENDGROUPFIELDS
ENDGROUP
GROUP #PurchaseLines
PROPERTIES
Name #PurchaseLines
Label #@SYS9664
ENDPROPERTIES
GROUPFIELDS
#TaxAutogenerated
#Name
#ExternalItemId
#PurchaseType
#PurchStatus
#CovRef
#CurrencyCode
#LineAmount
#VendGroup
#VendAccount
#LineHeader
ENDGROUPFIELDS
ENDGROUP
GROUP #PurchaseQuantity
PROPERTIES
Name #PurchaseQuantity
Label #@SYS11187
ENDPROPERTIES
GROUPFIELDS
#PurchQty
#PurchReceivedNow
#RemainPurchPhysical
#RemainPurchFinancial
#PurchUnit
ENDGROUPFIELDS
ENDGROUP
GROUP #PurchReq
PROPERTIES
Name #PurchReq
Label #@SYS94925
ENDPROPERTIES
GROUPFIELDS
#PurchReqId
ENDGROUPFIELDS
ENDGROUP
GROUP #PurchReqReference
PROPERTIES
Name #PurchReqReference
Label #@SYS110285
ENDPROPERTIES
GROUPFIELDS
#PurchReqId
ENDGROUPFIELDS
ENDGROUP
GROUP #Requisitioner
PROPERTIES
Name #Requisitioner
Label #@SYS108788
ENDPROPERTIES
GROUPFIELDS
#Requisitioner
ENDGROUPFIELDS
ENDGROUP
GROUP #ReturnedItem
PROPERTIES
Name #ReturnedItem
Label #@SYS24700
ENDPROPERTIES
GROUPFIELDS
#ReturnActionId
#Scrap
ENDGROUPFIELDS
ENDGROUP
GROUP #RFIDTagging
PROPERTIES
Name #RFIDTagging
Label #@SYS90171
ENDPROPERTIES
GROUPFIELDS
#ItemTagging
#CaseTagging
#PalletTagging
ENDGROUPFIELDS
ENDGROUP
GROUP #SalesTax
PROPERTIES
Name #SalesTax
Label #@SYS5878
ENDPROPERTIES
GROUPFIELDS
#TaxItemGroup
#TaxGroup
ENDGROUPFIELDS
ENDGROUP
GROUP #Status
PROPERTIES
Name #Status
Label #@SYS25587
ENDPROPERTIES
GROUPFIELDS
#PurchStatus
#Blocked
#Complete
ENDGROUPFIELDS
ENDGROUP
GROUP #TableGroup
PROPERTIES
Name #TableGroup
Label #@SYS21958
ENDPROPERTIES
GROUPFIELDS
#ItemId
ENDGROUPFIELDS
ENDGROUP
ENDGROUPS
INDICES
#PurchLineIdx
Id 1
PROPERTIES
Name #PurchLineIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#PurchId
#LineNum
#RecId
ENDINDEXFIELDS
#TransIdIdx
Id 3
PROPERTIES
Name #TransIdIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#InventTransId
ENDINDEXFIELDS
#PurchStatusIdx
Id 4
PROPERTIES
Name #PurchStatusIdx
ENDPROPERTIES
INDEXFIELDS
#PurchId
#PurchStatus
ENDINDEXFIELDS
#ItemIdx
Id 5
PROPERTIES
Name #ItemIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#ItemId
#RecId
ENDINDEXFIELDS
#StatusItemIdx
Id 6
PROPERTIES
Name #StatusItemIdx
ENDPROPERTIES
INDEXFIELDS
#PurchStatus
#ItemId
ENDINDEXFIELDS
ENDINDICES
REFERENCES
REFERENCE #AssetBook
PROPERTIES
Name #AssetBook
Table #AssetBook
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #AssetId
RelatedField #AssetId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #AssetBookId
RelatedField #BookId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #BPLImpFolderLine
PROPERTIES
Name #BPLImpFolderLine
Table #BPLImpFolderLine
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #InventTransId
RelatedField #InventTransId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #Common
PROPERTIES
Name #Common
Table #Common
Validate #No
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #AddressRefRecId
RelatedField #RecId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #AddressRefTableId
RelatedField #TableId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #CountyOrigDest
PROPERTIES
Name #CountyOrigDest
Table #AddressCounty
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #CountyOrigDest
RelatedField #CountyId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #DeliveryCounty
PROPERTIES
Name #DeliveryCounty
Table #AddressCounty
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #DeliveryCountryRegionId
RelatedField #CountryRegionId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #DeliveryState
RelatedField #StateId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #DeliveryCounty
RelatedField #CountyId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #DeliveryState
PROPERTIES
Name #DeliveryState
Table #AddressState
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #DeliveryCountryRegionId
RelatedField #CountryRegionId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #DeliveryState
RelatedField #StateId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #DeliveryZipCode
PROPERTIES
Name #DeliveryZipCode
Table #AddressZipCode
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #DeliveryZipCode
RelatedField #ZipCode
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #InventJournalTableRef
PROPERTIES
Name #InventJournalTableRef
Table #InventJournalTable
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PurchLine
Field #ItemRefType
Value #5
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #InventRefId
RelatedField #JournalId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #ProdLineRef
PROPERTIES
Name #ProdLineRef
Table #ProdTable
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #InventRefId
RelatedField #ProdId
ENDPROPERTIES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PurchLine
Field #ItemRefType
Value #4
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #ProdTableRef
PROPERTIES
Name #ProdTableRef
Table #ProdTable
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PurchLine
Field #ItemRefType
Value #3
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #InventRefId
RelatedField #ProdId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #SalesTableRef
PROPERTIES
Name #SalesTableRef
Table #SalesTable
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE THISFIXED
PROPERTIES
Table #PurchLine
Field #ItemRefType
Value #1
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #InventRefId
RelatedField #SalesId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #State
PROPERTIES
Name #State
Table #AddressState
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #Tax1099State
RelatedField #StateId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
ENDREFERENCES
DELETEACTIONS
#BPLChangeDlvReasonHistory
PROPERTIES
Table #BPLChangeDlvReasonHistory
DeleteAction #Cascade
ENDPROPERTIES
#BPLImpFolderLine
PROPERTIES
Table #BPLImpFolderLine
DeleteAction #Cascade
ENDPROPERTIES
#MarkupTrans
PROPERTIES
Table #MarkupTrans
DeleteAction #Cascade
ENDPROPERTIES
#DocuRef
PROPERTIES
Table #DocuRef
DeleteAction #Cascade
ENDPROPERTIES
#CustVendCreditInvoicingLine
PROPERTIES
Table #CustVendCreditInvoicingLine
DeleteAction #Cascade
ENDPROPERTIES
ENDDELETEACTIONS
METHODS
Version: 3
SOURCE #AccountClearing
#//BP Deviation Documented
#server display LedgerAccount accountClearing()
#{
# return VendLedgerAccounts::clearingAccount(this.purchTable().InvoiceAccount,
# this.purchTable().PostingProfile);
#}
ENDSOURCE
SOURCE #AccountConsumption
#///
#/// Change which account is returned when getting the ledger account so that all fixed asset
#/// transactions will use the PurchReceiptFA account instead of the PurchConsump account.
#///
#///
#/// LedgerAccount for the consumption transaction.
#///
#
#//BP Deviation Documented
#display LedgerAccount accountConsumption()
#{
# LedgerAccount ledgerAccount;
# ;
#
# if (this.LedgerAccount && !InventMovement::construct(this).mustBeBookedBalanceSheet())
# {
# ledgerAccount = this.LedgerAccount;
# }
# else
# {
# if (this.AssetId)
# {
# if (AssetParameters::canUserCreateAssetAcquisition())
# {
# ledgerAccount = this.assetLedgerAccount();
# }
# else
# {
# ledgerAccount = InventPosting::accountItem(InventAccountType::PurchConsump,
# this.ItemId,
# this.inventTable().ItemGroupId,
# this.VendAccount,
# this.VendGroup,
# this.TaxGroup);
# }
#
# }
# else
# {
# ledgerAccount = InventPosting::accountItem(InventAccountType::PurchConsump,
# this.ItemId,
# this.inventTable().ItemGroupId,
# this.VendAccount,
# this.VendGroup,
# this.TaxGroup);
#
# }
# }
#
# return ledgerAccount;
#}
ENDSOURCE
SOURCE #AccountDisc
#//BP Deviation Documented
#server display LedgerAccount accountDisc()
#{
# return InventPosting::accountItem(InventAccountType::PurchDisc,
# this.ItemId,
# this.inventTable().ItemGroupId,
# this.VendAccount,
# this.VendGroup,
# this.TaxGroup);
#}
ENDSOURCE
SOURCE #AccountOffsetAccountPckSlp
#//BP Deviation Documented
#display LedgerAccount accountOffsetAccountPckSlp()
#{
# return InventPosting::accountItem(
# InventAccountType::PurchPackingSlipOffsetAccount,
# this.ItemId,
# this.inventTable().ItemGroupId,
# this.VendAccount,
# this.VendGroup,
# this.TaxGroup);
#}
ENDSOURCE
SOURCE #AccountReceipt
#///
#/// Change which account is returened when getting the ledger account so that all the fixed asset
#/// transactions will use PurchReceiptFA account instead of the PurchReceipt account.
#///
#///
#/// LedgerAccount for the receipt transaction
#///
#
#//BP Deviation Documented
#display LedgerAccount accountReceipt()
#{
# LedgerAccount ledgerAccount;
# ;
#
# if (this.LedgerAccount && InventMovement::construct(this).mustBeBookedBalanceSheet())
# {
# ledgerAccount = this.LedgerAccount;
# }
# else
# {
# if (this.AssetId)
# {
# ledgerAccount = InventPosting::accountItemWithBackup(InventAccountType::PurchReceiptFixedAsset,
# InventAccountType::PurchReceipt,
# this.ItemId,
# this.inventTable().ItemGroupId,
# this.VendAccount,
# this.VendGroup,
# this.TaxGroup);
# }
# else
# {
# ledgerAccount = InventPosting::accountItem(InventAccountType::PurchReceipt,
# this.ItemId,
# this.inventTable().ItemGroupId,
# this.VendAccount,
# this.VendGroup,
# this.TaxGroup);
# }
# }
# return ledgerAccount;
#}
ENDSOURCE
SOURCE #AccountVend
#//BP Deviation Documented
#server display LedgerAccount accountVend()
#{
# return VendLedgerAccounts::sumAccount(this.purchTable().InvoiceAccount,
# this.purchTable().PostingProfile);
#}
ENDSOURCE
SOURCE #allowEditReturnActionId
#boolean allowEditReturnActionId()
#{
# return this.type().allowEditReturnActionId();
#}
#
ENDSOURCE
SOURCE #allowEditScrap
#boolean allowEditScrap()
#{
# return this.type().allowEditScrap();
#}
#
ENDSOURCE
SOURCE #allowEditTax1099
#boolean allowEditTax1099()
#{
# boolean ok = true;
# ;
# if (this.PurchStatus == PurchStatus::Invoiced)
# {
# ok = false;
# }
#
# return ok;
#}
#
#
ENDSOURCE
SOURCE #allowUpdateWithQualityOrder
#///
#/// Determines if the update of the purchase line is allowed even if an open quality order exists.
#///
#///
#/// true if the update is allowed; otherwise, false.
#///
#///
#/// Normally we don't allow update, but if the invoice posting fails, a pending invoice is saved and the remaining quantity is reset.
#///
#boolean allowUpdateWithQualityOrder()
#{
# PurchLine purchLineFromTemp;
# ;
# if (!InventParameters::find().UseQualityManagement)
# { // Not using quality management for this company
# return true;
# }
#
# if (this.qualityOrderStatusDisplay() != InventTestOrderStatusDisplay::Open)
# { // No open quality order exists
# return true;
# }
# purchLineFromTemp = this.orig().data();
#
# // Changing the following fields is allowed so make those equal before comparing
# purchLineFromTemp.PurchReceivedNow = this.PurchReceivedNow;
# purchLineFromTemp.InventReceivedNow = this.InventReceivedNow;
#
# // Israel-Localisation-Prodware-ImportFolder-Begin
# purchLineFromTemp.BPLMarked = this.BPLMarked;
# // Israel-Localisation-Prodware-ImportFolder-End
#
# return this.equal(purchLineFromTemp);
#}
ENDSOURCE
SOURCE #amountCur
#AmountCur amountCur(AmountMST amountMST,
# TransDate exchRateDate = systemdateget(),
# ExchRate exchRate = 0,
# ExchrateSecondary exchrateSecondary = 0,
# ExchRatesTriangulation exchRatesTriangulation = UnknownNoYes::Unknown)
#{
# return this.SalesPurchLine::amountCur(amountMST, exchRateDate, exchRate, exchrateSecondary, exchRatesTriangulation);
#}
ENDSOURCE
SOURCE #amountExclTax
#AmountCur amountExclTax(AmountCur amountCur, Qty qty, TransDate transDate, boolean _rounded = true)
#{
# return this.SalesPurchLine::amountExclTax(amountCur, qty, transDate, _rounded);
#}
ENDSOURCE
SOURCE #amountMST
#AmountMST amountMST(AmountCur amountCur,
# TransDate exchRateDate = systemdateget(),
# ExchRate exchRate = 0,
# ExchrateSecondary exchrateSecondary = 0,
# ExchRatesTriangulation exchRatesTriangulation = UnknownNoYes::Unknown)
#
#{
# return this.SalesPurchLine::amountMST(amountCur, exchRateDate, exchRate, exchrateSecondary, exchRatesTriangulation);
#}
#
ENDSOURCE
SOURCE #Arrived
#//BP Deviation Documented
#display InventQtyArrived arrived()
#{
# return (select sum(Qty) from inventTrans
# where inventTrans.InventTransId == this.InventTransId &&
# inventTrans.StatusReceipt == StatusReceipt::Arrived).Qty;
#}
ENDSOURCE
SOURCE #arrivedInPurchUnit
#//BP Deviation Documented
#display PurchQtyArrived arrivedInPurchUnit()
#{
# PurchQtyArrived purchQtyArrived = this.arrived();
# ;
# if (!purchQtyArrived)
# return 0;
#
# return this.unitConvertInvent2Purch(purchQtyArrived);
#}
ENDSOURCE
SOURCE #assetLedgerAccount
#///
#/// Change which account is returned when getting the ledger account so that all fixed asset
#/// transactions will use the PurchRecieptFA account instead of the PurchConsump account.
#///
#///
#/// LedgerAccount contains ledger accounts.
#///
#private LedgerAccount assetLedgerAccount()
#{
# AssetTransType assetTransType;
# AssetBook assetBook;
#
# ;
#
# assetBook = AssetBook::find(this.AssetId, this.AssetBookId);
# assetTransType = AssetPost::assetTransTypePurch2AssetTransType(this.AssetTransTypePurch);
# return AssetLedgerAccounts::assetLedgerAccount(this.AssetId, this.AssetBookId, assetTransType,
# assetBook.PostingProfile);
#}
#
ENDSOURCE
SOURCE #assetUpdateInventTrans
#void assetUpdateInventTrans()
#{
# InventTrans inventTrans;
# ;
#
# if (this.InventTransId)
# {
# inventTrans.updateAssetIdAndBookId(this.InventTransId, this.AssetId, this.AssetBookId);
# }
#}
ENDSOURCE
SOURCE #AxPurchLine
#public AxPurchLine axPurchLine()
#{
# AxPurchLine axPurchLine = new AxPurchLine();
# ;
# axPurchLine.purchLine(this);
# return axPurchLine;
#}
ENDSOURCE
SOURCE #BPLaddChangeDlvReasonHistory
#// Israel-Localisation-Prodware-ImportFolder
#void BPLaddChangeDlvReasonHistory(BPLChangeDlvReasonId _ChangeDlvReasonId, Purchline _purchline, Purchline _purchLine_orig)
#{
# BPLChangeDlvReasonHistory BPLChangeDlvReasonHistory;
#;
# BPLChangeDlvReasonHistory.clear();
# BPLChangeDlvReasonHistory.initFromPurchLine(_purchLine_orig, _purchLine);
# BPLChangeDlvReasonHistory.ChangeDlvReasonId = _ChangeDlvReasonId;
# BPLChangeDlvReasonHistory.insert();
#
#}
#
ENDSOURCE
SOURCE #BPLAmountMST
#// Israel-Localisation-Prodware-ImportFolder
#display AmountMST BPLAmountMST()
#{
# return this.lineAmountMST();
#}
#
ENDSOURCE
SOURCE #BPLcheckDlvDates
#// Israel-Localisation-Prodware-ImportFolder
#boolean BPLcheckDlvDates()
#{
# // BPLRequestedDlvDate mandatory
# if ((this.BPLVendorConfirmedDlvDate && this.BPLVendorConfirmedDlvDate < this.BPLRequestedDlvDate) ||
# (this.DeliveryDate && this.DeliveryDate < this.BPLRequestedDlvDate) ||
# (this.ConfirmedDlv && this.ConfirmedDlv < this.BPLRequestedDlvDate) ||
# (this.BPLVendorConfirmedDlvDate && this.DeliveryDate && this.DeliveryDate < this.BPLVendorConfirmedDlvDate) ||
# (this.BPLVendorConfirmedDlvDate && this.ConfirmedDlv && this.ConfirmedDlv < this.BPLVendorConfirmedDlvDate) ||
# (this.DeliveryDate && this.ConfirmedDlv && this.ConfirmedDlv < this.DeliveryDate))
# {
# return checkFailed(strfmt("@BPL28", this.PurchId, this.ItemId));
# }
#
# return true;
#}
#
ENDSOURCE
SOURCE #BPLChkOpenImpFolderLines
#// Israel-Localisation-Prodware-ImportFolder
#// chks if purcline has open import folder lines
#// return true if open lines exists
#public boolean BPLChkOpenImpFolderLines()
#{
# BPLImpFolderLine ImpFolderLine;
# ;
# while select ImpFolderLine
# where ImpFolderLine.InventTransId == this.InventTransId
# {
# if (ImpFolderLine.Qty - ImpFolderLine.TransQty() && ImpFolderLine.Qty)
# return true;
# }
#
# return false;
#}
ENDSOURCE
SOURCE #BPLExistsImpFolderLine
#// Israel-Localisation-Prodware-ImportFolder
#boolean BPLExistsImpFolderLine()
#{
# ;
# if (this.InventTransId)
# {
# return (select firstonly BPLImpFolderLine
# where BPLImpFolderLine.InventTransId == this.InventTransId).RecId != 0;
# }
# return false;
#
#}
ENDSOURCE
SOURCE #BPLgrossVolume
#// Israel-Localisation-Prodware-ImportFolder
#display Volume BPLgrossVolume()
#{
# return this.PurchQty * InventTable::find(this.ItemId).grossVolume();
#}
ENDSOURCE
SOURCE #BPLgrossWeight
#// Israel-Localisation-Prodware-ImportFolder
#display ItemGrossWeight BPLgrossWeight()
#{
# return this.PurchQty * InventTable::find(this.ItemId).grossWeight();
#}
#
ENDSOURCE
SOURCE #BPLImpFolderIdDisplay
#// Israel-Localisation-Prodware-ImportFolder
#display BPLImpFolderId BPLImpFolderIdDisplay()
#{
# if (this.BPLImpFolderId)
# return this.BPLImpFolderId;
# else
# return (select firstonly BPLImpFolderLine
# where BPLImpFolderLine.InventTransId == this.InventTransId).FolderId;
#}
ENDSOURCE
SOURCE #BPLImpFolderIdEdit
#// Israel-Localisation-Prodware-ImportFolder
#public edit BPLImpFolderId BPLImpFolderIdEdit(
# boolean _set,
# BPLImpFolderId _BPLImpFolderId)
#{
# BPLImpFolderLine bPLImpFolderLine;
# if (_set)
# {
# if (_BPLImpFolderId && BPLImpFolderTable::exist(_BPLImpFolderId))
# {
# this.BPLImpFolderId = _BPLImpFolderId;
# }
# else
# {
# this.BPLImpFolderId = '';
# }
# }
# if (this.BPLImpFolderId)
# return this.BPLImpFolderId;
# else
# return (select firstonly bPLImpFolderLine
# where bPLImpFolderLine.InventTransId == this.InventTransId).FolderId;
#}
#
ENDSOURCE
SOURCE #BPLImpLineQtyRemain
#// Israel-Localisation-Prodware-ImportFolder
#Display BPLImpLineQty BPLImpLineQtyRemain()
#{
# BPLImpFolderLine ImpFolderLine;
# ;
# select sum(Qty) from ImpFolderLine
# where ImpFolderLine.InventTransId == this.InventTransId;
#
# return (this.PurchQty - ImpFolderLine.Qty);
#
#}
ENDSOURCE
SOURCE #BPLmodifyDeliveryDates
#// Israel-Localisation-Prodware-ImportFolder
#void BPLmodifyDeliveryDates(fieldId _fieldId)
#{
# switch (_fieldId)
# {
# case fieldnum(PurchLine, BPLRequestedDlvDate):
# if (this.BPLRequestedDlvDate)
# {
# this.BPLVendorConfirmedDlvDate = this.BPLRequestedDlvDate;
# this.DeliveryDate = this.BPLRequestedDlvDate;
# }
# break;
#
# case fieldnum(PurchLine, BPLVendorConfirmedDlvDate):
# if (this.BPLVendorConfirmedDlvDate)
# this.DeliveryDate = this.BPLVendorConfirmedDlvDate;
# break;
# }
#
# if (this.DeliveryDate)
# this.ConfirmedDlv = BPLVendDlvLeadTime::calcPurchLineDlvDate(this.DeliveryDate,this.PurchId);
#}
ENDSOURCE
SOURCE #BPLvendorName
#// Israel-Localisation-Prodware-ImportFolder
#display Name BPLvendorName()
#{
# return this.purchTable().vendorName();
#}
ENDSOURCE
SOURCE #calcGrossAmount
#AmountCur calcGrossAmount(Qty qty = this.PurchQty)
#{
# return this.SalesPurchLine::calcGrossAmount(qty);
#}
ENDSOURCE
SOURCE #calcGrossAmountExclTax
#AmountCur calcGrossAmountExclTax(Qty qty = this.PurchQty, TransDate transDate = systemdateget(), boolean _rounded = true)
#{
# return this.SalesPurchLine::calcGrossAmountExclTax(qty, this.taxDate(transDate), _rounded);
#}
ENDSOURCE
SOURCE #calcLineAmount
#AmountCur calcLineAmount(Qty qty = this.PurchQty)
#{
# return this.SalesPurchLine::calcLineAmount(qty);
#}
ENDSOURCE
SOURCE #calcLineAmountExclTax
#AmountCur calcLineAmountExclTax(Qty qty = this.PurchQty, TransDate transDate = systemdateget(), boolean _rounded = true)
#{
# return this.SalesPurchLine::calcLineAmountExclTax(qty, this.taxDate(transDate), _rounded);
#}
ENDSOURCE
SOURCE #calcLineAmountForced
#AmountCur calcLineAmountForced(Qty _qty = this.PurchQty)
#{
# return this.SalesPurchLine::calcLineAmountForced(_qty);
#}
ENDSOURCE
SOURCE #CalcLineDisc
#DiscAmount calcLineDisc(Qty qty = this.PurchQty)
#{
# return this.SalesPurchLine::calcLineDisc(qty);
#}
ENDSOURCE
SOURCE #calcLineDiscExclTax
#DiscAmount calcLineDiscExclTax(Qty qty = this.PurchQty, TransDate transDate = systemdateget())
#{
# return this.SalesPurchLine::calcLineDiscExclTax(qty, this.taxDate(transDate));
#}
ENDSOURCE
SOURCE #calcLineDiscUnit
#//BP Deviation Documented
#display DiscAmount calcLineDiscUnit()
#{
# if (this.PurchQty)
# {
# return this.calcLineDisc() / this.PurchQty * this.PriceUnit;
# }
#
# return 0;
#}
ENDSOURCE
SOURCE #calcPendingMatchedQtyInvent
#///
#/// Calculates a sum of InventNow quantity for invoice lines connected to this PurchLine table record that are matched to a packing slip.
#///
#///
#/// A boolean value which determines whether only pending invoice lines are considered connected. True, if only pending invoice lines are considered connected; otherwise, false.
#///
#///
#/// The calculated InventNow quantity.
#///
#///
#/// Records from both the PurchParmSubLine and the VendInvoiceInfoSubLine tables are used in the calculation.
#///
#public InventQty calcPendingMatchedQtyInvent(boolean _pendingOnly = true)
#{
# PurchParmLine purchParmLine, purchParmLineJoin;
# PurchParmSubLine purchParmSubLine;
# PurchParmTable purchParmTable;
# VendInvoiceInfoLine vendInvoiceInfoLine;
# VendInvoiceInfoSubLine vendInvoiceInfoSubLine;
# ;
#
# // sum for all saved invoice sub lines connected to this PO line
#
# select sum(InventNow) from purchParmSubLine
# exists join purchParmLine
# where
# purchParmLine.RecId == purchParmSubLine.LineRefRecId &&
# purchParmLine.InventTransId == this.InventTransId
# exists join purchParmTable
# where
# purchParmTable.ParmId == purchParmLine.ParmId &&
# purchParmTable.TableRefId == purchParmLine.TableRefId &&
# purchParmTable.ParmJobStatus == ParmJobStatus::Waiting &&
# (purchParmTable.Ordering == DocumentStatus::Invoice || purchParmTable.Ordering == DocumentStatus::ApproveJournal) &&
# (!_pendingOnly || purchParmTable.VendInvoiceSaveStatus == VendInvoiceSaveStatus::Pending);
#
# select sum(InventNow) from vendInvoiceInfoSubLine
# exists join vendInvoiceInfoLine
# where
# vendInvoiceInfoLine.RecId == vendInvoiceInfoSubLine.LineRefRecId &&
# vendInvoiceInfoLine.InventTransId == this.InventTransId
# notexists join purchParmLineJoin // exclude all lines for existing purchParm document
# where
# purchParmLineJoin.InvoiceInfoTableRefId == vendInvoiceInfoLine.TableRefId;
#
# return purchParmSubLine.InventNow + vendInvoiceInfoSubLine.InventNow;
#}
ENDSOURCE
SOURCE #calcPendingMatchedQtyPurch
#///
#/// Calculates a sum of ReceiveNow quantity for invoice lines connected to this PurchLine table record that are matched to a packing slip.
#///
#///
#/// A boolean value which determines whether only pending invoice lines are considered connected. True, if only pending invoice lines are considered connected; otherwise, false.
#///
#///
#/// The calculated ReceiveNow quantity.
#///
#///
#/// Records from both the PurchParmSubLine and the VendInvoiceInfoSubLine tables are used in the calculation.
#///
#public PurchQty calcPendingMatchedQtyPurch(boolean _pendingOnly = true)
#{
# PurchParmLine purchParmLine, purchParmLineJoin;
# PurchParmSubLine purchParmSubLine;
# PurchParmTable purchParmTable;
# VendInvoiceInfoLine vendInvoiceInfoLine;
# VendInvoiceInfoSubLine vendInvoiceInfoSubLine;
# ;
#
# // sum for all saved invoice sub lines connected to this PO line
#
# select sum(ReceiveNow) from purchParmSubLine
# exists join purchParmLine
# where
# purchParmLine.RecId == purchParmSubLine.LineRefRecId &&
# purchParmLine.InventTransId == this.InventTransId
# exists join purchParmTable
# where
# purchParmTable.ParmId == purchParmLine.ParmId &&
# purchParmTable.TableRefId == purchParmLine.TableRefId &&
# purchParmTable.ParmJobStatus == ParmJobStatus::Waiting &&
# (purchParmTable.Ordering == DocumentStatus::Invoice || purchParmTable.Ordering == DocumentStatus::ApproveJournal) &&
# (!_pendingOnly || purchParmTable.VendInvoiceSaveStatus == VendInvoiceSaveStatus::Pending);
#
#
# select sum(ReceiveNow) from vendInvoiceInfoSubLine
# exists join vendInvoiceInfoLine
# where
# vendInvoiceInfoLine.RecId == vendInvoiceInfoSubLine.LineRefRecId &&
# vendInvoiceInfoLine.InventTransId == this.InventTransId
# notexists join purchParmLineJoin // exclude all lines for existing purchParm document
# where
# purchParmLineJoin.InvoiceInfoTableRefId == vendInvoiceInfoLine.TableRefId;
#
# return purchParmSubLine.ReceiveNow + vendInvoiceInfoSubLine.ReceiveNow;
#}
ENDSOURCE
SOURCE #calcPendingQtyInvent
#///
#/// Calculates a sum of InventNow quantity for all pending invoice lines connected to this PurchLine table record.
#///
#///
#/// The calculated InventNow quantity.
#///
#///
#/// Records from both the PurchParmLine and the VendInvoiceInfoLine tables are used in the calculation.
#///
#public InventQty calcPendingQtyInvent()
#{
# PurchParmLine purchParmLine, purchParmLineJoin;
# PurchParmTable purchParmTable;
# VendInvoiceInfoLine vendInvoiceInfoLine;
# ;
#
# // sum for all saved invoice lines connected to this PO line
#
# select sum(InventNow) from purchParmLine
# where
# purchParmLine.InventTransId == this.InventTransId
# exists join purchParmTable
# where
# purchParmTable.ParmId == purchParmLine.ParmId &&
# purchParmTable.TableRefId == purchParmLine.TableRefId &&
# purchParmTable.ParmJobStatus == ParmJobStatus::Waiting &&
# (purchParmTable.Ordering == DocumentStatus::Invoice || purchParmTable.Ordering == DocumentStatus::ApproveJournal) &&
# purchParmTable.VendInvoiceSaveStatus == VendInvoiceSaveStatus::Pending;
#
# select sum(InventNow) from vendInvoiceInfoLine
# where
# vendInvoiceInfoLine.InventTransId == this.InventTransId
# notexists join purchParmLineJoin // exclude all lines for existing purchParm document
# where
# purchParmLineJoin.InvoiceInfoTableRefId == vendInvoiceInfoLine.TableRefId;
#
# return purchParmLine.InventNow + vendInvoiceInfoLine.InventNow;
#}
#
ENDSOURCE
SOURCE #calcPendingQtyPurch
#///
#/// Calculates a sum of ReceiveNow quantity for all pending invoice lines connected to this PurchLine table record.
#///
#///
#/// The calculated ReceiveNow quantity.
#///
#///
#/// Records from both the PurchParmLine and the VendInvoiceInfoLine tables are used in the calculation.
#///
#public server PurchQty calcPendingQtyPurch()
#{
# PurchParmLine purchParmLine, purchParmLineJoin;
# PurchParmTable purchParmTable;
# VendInvoiceInfoLine vendInvoiceInfoLine;
# ;
#
# // sum for all saved invoice lines connected to this PO line
#
# select sum(ReceiveNow) from purchParmLine
# where
# purchParmLine.InventTransId == this.InventTransId
# exists join purchParmTable
# where
# purchParmTable.ParmId == purchParmLine.ParmId &&
# purchParmTable.TableRefId == purchParmLine.TableRefId &&
# purchParmTable.ParmJobStatus == ParmJobStatus::Waiting &&
# (purchParmTable.Ordering == DocumentStatus::Invoice || purchParmTable.Ordering == DocumentStatus::ApproveJournal) &&
# purchParmTable.VendInvoiceSaveStatus == VendInvoiceSaveStatus::Pending;
#
# select sum(ReceiveNow) from vendInvoiceInfoLine
# where
# vendInvoiceInfoLine.InventTransId == this.InventTransId
# notexists join purchParmLineJoin // exclude all lines for existing purchParm document
# where
# purchParmLineJoin.InvoiceInfoTableRefId == vendInvoiceInfoLine.TableRefId;
#
# return purchParmLine.ReceiveNow + vendInvoiceInfoLine.ReceiveNow;
#}
#
ENDSOURCE
SOURCE #calcPendingQtyPurchDisplay
#///
#/// Returns the sum of ReceiveNow quantities for all pending invoice lines connected to this PurchLine table record.
#///
#///
#/// Calculated ReceiveNow quantity.
#///
#///
#/// Records from both PurchParmLine and VendInvoiceInfoLine tables are used in the calculation.
#///
#//BP Deviation Documented
#public display UnpostedInvoicePurchQty calcPendingQtyPurchDisplay()
#{
# return this.calcPendingQtyPurch();
#}
#
ENDSOURCE
SOURCE #calcPrice2LineAmount
#AmountCur calcPrice2LineAmount(Qty _qty, boolean _forceLineAmountCalculation)
#{
# return this.SalesPurchLine::calcPrice2LineAmount(_qty, _forceLineAmountCalculation);
#}
ENDSOURCE
SOURCE #calcPriceFromAmount
#void calcPriceFromAmount()
#{
# this.SalesPurchLine::calcPriceFromAmount();
#}
ENDSOURCE
SOURCE #CalcQtyOrdered
#InventQty calcQtyOrdered(Qty purchQty = this.PurchQty)
#{
# return this.SalesPurchLine::calcQtyOrdered(purchQty);
#}
ENDSOURCE
SOURCE #canEditDisc
#// This method is called when setting disc fields
#boolean canEditDisc()
#{
# return true;
#}
ENDSOURCE
SOURCE #checkActivity
#boolean checkActivity()
#{
# RecId projRecId;
# ;
#
# if (this.ActivityNumber)
# {
# if (!ProjActivity::find(this.ActivityNumber))
# {
# return checkFailed(strfmt("@SYS50966",this.ActivityNumber));
# }
#
# //validate activity is associated to Project
# projRecId = ProjTable::find(this.ProjId).RecId;
# if (smmActivityParentLinkTable::find(this.ActivityNumber, smmActivityParentType::Project, projRecId).RecId == 0)
# {
# return checkFailed(strfmt("@SYS105858",this.ActivityNumber, this.ProjId));
# }
# }
# return true;
#}
#
ENDSOURCE
SOURCE #checkAndPromptFixedLineAmount
#boolean checkAndPromptFixedLineAmount()
#{
# return this.PriceDiscLine::checkAndPromptFixedLineAmount();
#}
#
ENDSOURCE
SOURCE #CheckCurrencyCode
#boolean checkCurrencyCode()
#{
# boolean ok = true;
# ;
#
# if (! Currency::exist(this.CurrencyCode))
# ok = checkFailed(strfmt("@SYS1458", this.CurrencyCode));
#
# if (this.purchTable().CurrencyCode != this.CurrencyCode)
# ok = checkFailed("@SYS20793");
#
# return ok;
#}
#
ENDSOURCE
SOURCE #checkCustomerRef
#boolean checkCustomerRef()
#{
# boolean ok = true;
# PurchLine purchLine;
# ;
#
# select count(RecId) from purchLine
# index hint PurchLineIdx
# where purchLine.PurchId == this.PurchId
# && purchLine.DeliveryAddress == this.DeliveryAddress
# && purchLine.CustomerRef != this.CustomerRef
# && purchLine.RecId != this.RecId;
#
# if (purchLine.RecId)
# {
# ok = checkFailed("@SYS78581");
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #checkCustPurchaseOrderFormNum
#boolean checkCustPurchaseOrderFormNum()
#{
# boolean ok = true;
# PurchLine purchLine;
# ;
#
# select count(RecId) from purchLine
# index hint PurchLineIdx
# where purchLine.PurchId == this.PurchId
# && purchLine.DeliveryAddress == this.DeliveryAddress
# && purchLine.CustPurchaseOrderFormNum != this.CustPurchaseOrderFormNum
# && purchLine.RecId != this.RecId;
#
# if (purchLine.RecId)
# {
# ok = checkFailed("@SYS78581");
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #checkDelete
#boolean checkDelete(boolean _useWarning = true)
#{
# return this.type().checkDelete(_useWarning);
#}
ENDSOURCE
SOURCE #CheckInitFromInventTable
#boolean checkInitFromInventTable(InventTable inventTable)
#{
# return this.SalesPurchLine::checkInitFromInventTable(inventTable);
#}
ENDSOURCE
SOURCE #CheckItemId
#boolean checkItemId()
#{
# boolean ok = true;
# ;
#
# if (this.orig().ItemId &&
# this.orig().ItemId != this.ItemId &&
# this.InventTransId)
# {
# ok = checkFailed("@SYS19376");
# }
#
# if (!this.inventTable().inventItemPurchSetup(this.InventDimId).checkNotStopped(false))
# ok = false;
#
# if (this.purchTable().isInterCompanyOrder() && this.inventTable().interCompanyBlockedPurch())
# ok = checkFailed(strfmt("@SYS74812", this.ItemId));
#
# return ok;
#}
ENDSOURCE
SOURCE #checkItemPBAId
#boolean checkItemPBAId()
#{
# boolean ok = true;
# ;
# if ( new DictConfigurationKey( configurationkeynum( PBA_ProductBuilder ) ).enabled() )
# {
# if ( InventTable::find( this.ItemId ).pbaItemConfigurable == NoYes::Yes )
# {
# if ( ! PBAVersion::existsVersion(this.ItemId,this.ItemPBAId) )
# {
# ok = checkFailed(strfmt("@SYS41402",this.ItemPBAId, this.ItemId));
# }
# }
# }
# return ok;
#}
#
ENDSOURCE
SOURCE #CheckLedgerAccount
#boolean checkLedgerAccount()
#{
# boolean ok = true;
# ;
#
# ok = LedgerTable::checkExist(this.LedgerAccount);
#
# if (ok)
# ok = LedgerTable::checkTransactionAccount(this.LedgerAccount);
#
# return ok;
#}
ENDSOURCE
SOURCE #CheckOverDelivery
#boolean checkOverDelivery()
#{
# boolean ok = true;
# ;
#
# if (this.OverDeliveryPct < 0)
# ok = checkFailed("@SYS26776");
#
# return ok;
#}
ENDSOURCE
SOURCE #checkProjCategory
#boolean checkProjCategory()
#{
# boolean ok = true;
# ProjCategory projCategory;
# ;
#
# if (this.ProjCategoryId)
# {
# projCategory = ProjCategory::find(this.ProjCategoryId);
# if (projCategory.CategoryType != ProjCategoryType::Item)
# ok = checkFailed(strfmt("@SYS56468",ProjTransType::Item));
#
# ok = ok && projCategory.validateIfInactiveAllowed();
# }
# return ok;
#}
ENDSOURCE
SOURCE #CheckPurchQty
#boolean checkPurchQty()
#{
# boolean ok = true;
# ;
#
# if ((this.PurchQty != 0 && this.QtyOrdered == 0) ||
# (this.PurchQty == 0 && this.QtyOrdered != 0) )
# {
# ok = checkFailed(strfmt("@SYS18441",this.PurchId));
# }
# else
# {
# if (this.PurchQty * this.QtyOrdered < 0)
# {
# ok = checkFailed(strfmt("@SYS18442",this.PurchId));
# }
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #CheckPurchType
#boolean checkPurchType()
#{
# if (this.purchTable().PurchaseType != this.PurchaseType)
# return checkFailed("@SYS17095");
#
# return true;
#}
#
ENDSOURCE
SOURCE #checkPurchUnit
#boolean checkPurchUnit()
#{
# boolean ok = true;
# ;
#
# if (!UnitConvert::canConvert(InventTable::find(this.ItemId).inventUnitId(), this.PurchUnit, this.ItemId))
# ok = checkFailed(strfmt("@SYS28690", InventTable::find(this.ItemId).inventUnitId(), this.PurchUnit));
#
# if (this.orig()
# && this.orig().PurchUnit != this.PurchUnit
# && this.orig().PurchQty != this.RemainPurchPhysical)
# {
# ok = checkFailed("@SYS81896");
# }
#
# if (this.BlanketRefTransId &&
# this.RecId && (this.PurchUnit != this.orig().PurchUnit))
# ok = checkFailed("@SYS83498");
#
# if (ok)
# ok = this.type().checkPurchUnit();
#
# return ok;
#}
#
ENDSOURCE
SOURCE #checkReleaseOrderLines
#boolean checkReleaseOrderLines(PurchBlanketRefTransId _blanketRefTransId)
#{
# boolean ok = true;
# PurchLine purchLine;
# ;
#
# if (_blanketRefTransId)
# {
# select firstonly RecId from purchLine
# where purchLine.BlanketRefTransId == _blanketRefTransId;
#
# if (purchLine.RecId)
# {
# ok = checkFailed("@SYS112340");
# }
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #checkReqActivity
#boolean checkReqActivity()
#{
# RequireActivity requireActivity;
# boolean ret = true;
# ;
#
# requireActivity = ProjTable::checkRequireActivity(this.ProjId,tablenum(ProjItemTrans));
# if (requireActivity && (!this.ActivityNumber))
# {
# ret = false;
# }
# return ret;
#}
#
ENDSOURCE
SOURCE #CheckTaxItemGroup
#boolean checkTaxItemGroup()
#{
# if (this.TaxItemGroup && ! TaxItemGroupHeading::exist(this.TaxItemGroup))
# return checkFailed(strfmt("@SYS21973", this.TaxItemGroup));
#
# return true;
#}
ENDSOURCE
SOURCE #CheckUnderDelivery
#boolean checkUnderDelivery()
#{
# boolean ok = true;
# ;
#
# if (this.UnderDeliveryPct > 100)
# ok = checkFailed("@SYS26778");
#
# return ok;
#}
ENDSOURCE
SOURCE #checkUpdatePhysical
#boolean checkUpdatePhysical()
#{
# return this.type().checkUpdatePhysical();
#}
#
ENDSOURCE
SOURCE #clearAddressReference
#public void clearAddressReference()
#{
# this.AddressRefRecId = 0;
# this.AddressRefTableId = 0;
#}
ENDSOURCE
SOURCE #ClearingPeriod
#//BP Deviation Documented
#display ClearingPeriod clearingPeriod()
#{
# return this.purchTable().payer().clearingPeriod();
#}
ENDSOURCE
SOURCE #clearPurchReqRef
#void clearPurchReqRef()
#{
# #OCCRetryCount
# PurchReqLine purchReqLine;
# #define.EmptyString('')
# ;
#
# try
# {
# if (this.PurchReqLineRefId)
# {
# ttsbegin;
#
# select forupdate firstonly purchReqLine
# where purchReqLine.LineRefId == this.PurchReqLineRefId;
#
# if (purchReqLine)
# {
# purchReqLine.PurchId = #emptyString;
# purchReqLine.update();
# purchReqLine.updatePurchReqStatus(PurchReqStatus::ApprovedCancelled);
# }
# ttscommit;
# }
# }
# catch(Exception::Deadlock)
# {
# retry;
# }
# catch(Exception::UpdateConflict)
# {
# if (appl.ttsLevel() == 0)
# {
# if (xSession::currentRetryCount() >= #RetryNum)
# {
# throw Exception::UpdateConflictNotRecovered;
# }
# else
# {
# retry;
# }
# }
# else
# {
# throw Exception::UpdateConflict;
# }
# }
#}
ENDSOURCE
SOURCE #convertCurrencyCode
#server void convertCurrencyCode(CurrencyCode currencyCode, TradeCurencyConversion tradeCurencyConversion = TradeCurencyConversion::ExchRate)
#{
# MarkupTrans markupTrans;
#
# ttsbegin;
#
# while select forupdate markupTrans
# index hint TableRecIdIdx
# where markupTrans.TransTableId == this.TableId &&
# markupTrans.TransRecId == this.RecId
# {
# markupTrans.convertCurrencyCode(currencyCode);
# markupTrans.doUpdate();
# }
#
# this.PurchPrice = Currency::curPrice2CurPrice(this.PurchPrice, this.CurrencyCode, currencyCode);
# this.LineDisc = Currency::curPrice2CurPrice(this.LineDisc, this.CurrencyCode, currencyCode);
# this.MultiLnDisc = Currency::curPrice2CurPrice(this.MultiLnDisc, this.CurrencyCode, currencyCode);
# this.PurchMarkup = Currency::curPrice2CurPrice(this.PurchMarkup, this.CurrencyCode, currencyCode);
# this.LineAmount = Currency::curAmount2CurAmount(this.LineAmount, this.CurrencyCode, currencyCode);
# this.CurrencyCode = currencyCode;
#
# switch(tradeCurencyConversion)
# {
# case TradeCurencyConversion::ExchRate:
# break;
# case TradeCurencyConversion::TradeAgreements:
# this.SalesPurchLine::resetPriceAgreement();
# this.setPriceDisc(this.inventDim());
# break;
# }
# this.LineAmount = this.calcLineAmount();
#
# ttscommit;
#}
ENDSOURCE
SOURCE #copyDimension
#///
#/// Returns a dimension set that can be applied to the PurchLine.dimension field.
#/// The method ensures that potential linked dimensions are not overwritten.
#///
#///
#/// A dimension set that should be applied to the PurchLine.dimension field.
#///
#///
#/// A dimensionCopy object previously instantiated using the current PurchLine buffer; optional.
#///
#///
#/// Dimension set that can be applied to the PurchLine.dimension field.
#///
#public Dimension copyDimension(Dimension _dimension, DimensionCopy _dimensionCopy = DimensionCopy::newFromTable(this))
#{
# return _dimensionCopy.copy(_dimension);
#}
ENDSOURCE
SOURCE #createFromTmpFrmVirtual
#void createFromTmpFrmVirtual(PurchTable _purchTable, TmpFrmVirtual tmpFrmVirtual)
#{;
# while select tmpFrmVirtual
# where tmpFrmVirtual.Qty
# {
# try
# {
# this.clear();
# this.PurchId = _purchTable.PurchId;
# this.ItemId = tmpFrmVirtual.ItemId;
# this.PurchQty = tmpFrmVirtual.Qty;
# this.setInventDimId(tmpFrmVirtual.InventDimId);
#
# this.createLine(true, // validation
# true, // initFromPurchTable
# true, // initFromInventTableModule
# true, // calcInventQty
# true, // searchMarkup
# true); // searchPrice
#
# tmpFrmVirtual.delete();
# }
#
# catch (Exception::Error)
# {
# checkFailed("@SYS18447");
# }
# }
#}
#
ENDSOURCE
SOURCE #CreateLine
#server void createLine(boolean validation = false,
# boolean initFromPurchTable = false,
# boolean initFromInventTable = false,
# boolean calcInventQty = false,
# boolean searchMarkup = true,
# boolean searchPrice = false)
#{
# PurchTable purchTable;
# InventTable inventTable;
#
# boolean dropInvent= false;
#
# if (initFromPurchTable)
# {
# purchTable= this.purchTable();
# this.initFromPurchTable(purchTable);
# }
#
# if (initFromInventTable)
# {
# inventTable= this.inventTable();
#
# if (! this.checkInitFromInventTable(inventTable))
# throw error("@SYS18447");
#
# this.initFromInventTable(inventTable);
# }
#
# this.initFromVendTable(this.vendTable_OrderAccount());
#
# if (calcInventQty)
# this.QtyOrdered = this.calcQtyOrdered();
#
# this.RemainPurchPhysical = this.PurchQty;
# this.RemainPurchFinancial = 0;
# this.RemainInventPhysical = this.QtyOrdered;
# // 1877
# this.RemainInventFinancial = 0;
# // 1877
# this.type().initReturn();
#
# if (searchPrice)
# {
# this.setPriceDisc(this.inventDim());
# }
#
# if (validation)
# if (!this.validateWrite())
# throw error("@SYS18447");
#
# if (!this.LineNum)
# this.LineNum = PurchLine::lastLineNum(this.PurchId) + 1.0;
#
# this.insert(dropInvent,searchMarkup);
#}
ENDSOURCE
SOURCE #createMarkupTrans
#server void createMarkupTrans(PurchTable purchTable)
#{;
# Markup::insertMarkupTrans(HeadingLine::Linie,
# ModuleInventCustVend::Vend,
# this,
# purchTable.OrderAccount,
# purchTable.MarkupGroup,
# purchTable.CurrencyCode,
# purchTable.LanguageId,
# this.ItemId,
# this.inventTable().purchMarkupGroup(),
# (this.LineAmount < 0)); // invert sign on creditnotes
#}
#
ENDSOURCE
SOURCE #CreditNoteLine
#boolean creditNoteLine()
#{
# return this.type().creditNoteLine();
#}
#
ENDSOURCE
SOURCE #delete
#public void delete(boolean _showInfoDelReserv = true, boolean deletePBA = true)
#{
# PurchLineType purchLineType;
# ;
#
# purchLineType = this.type();
# purchLineType.delete(_showInfoDelReserv, deletePBA);
# this.clearPurchReqRef();
#}
#
ENDSOURCE
SOURCE #deliveryAddress
#//BP Deviation Documented
#display Addressing deliveryAddress()
#{
# return (this.DeliveryAddress ? this.DeliveryAddress : this.purchTable().DeliveryAddress);
#}
ENDSOURCE
SOURCE #DeliveryDate
#//BP Deviation Documented
#display PurchLineDlvDate deliveryDate(PurchLineDlvDate blankDate = systemdateget())
#{
# if (this.ConfirmedDlv)
# return this.ConfirmedDlv;
#
# if (this.DeliveryDate)
# return this.DeliveryDate;
#
# if (this.purchTable().DeliveryDate)
# return this.purchTable().DeliveryDate;
#
# return blankDate;
#}
ENDSOURCE
SOURCE #deliveryName
#//BP Deviation Documented
#display VendName deliveryName()
#{
# return (this.DeliveryName ? this.DeliveryName : this.purchTable().DeliveryName);
#}
ENDSOURCE
SOURCE #deliveryStatusImage
#//BP Deviation Documented
#display ImageRes deliveryStatusImage()
#{
# #resAppl
# ;
#
# if(!this.RecId)
# return 0;
#
# if(this.receivedInTotal())
# {
# if(this.RemainPurchPhysical > 0)
# {
# return #ImageNew;
# }
# else
# {
# return #ImageOverlayYes;
# }
# }
#
# return 0;
#}
ENDSOURCE
SOURCE #deliveryStatusTxt
#str deliveryStatusTxt()
#{
# if(!this.RecId)
# return '';
#
# if(this.receivedInTotal())
# {
# if(this.RemainPurchPhysical > 0)
# {
# return "@SYS89798";
# }
# else
# {
# return "@SYS89797";
# }
# }
#
# return "@SYS99500";
#}
ENDSOURCE
SOURCE #deliveryTerm
#DlvTermId deliveryTerm()
#{
# return this.purchTable().DlvTerm;
#}
ENDSOURCE
SOURCE #DiscAmount
#DiscAmount discAmount()
#{
# return PriceDisc::discAmount(PurchParameters::find().Disc, this.LineDisc, this.MultiLnDisc);
#}
ENDSOURCE
SOURCE #DiscPercent
#DiscPct discPercent()
#{
# return PriceDisc::discPercent(PurchParameters::find().Disc, this.LinePercent, this.MultiLnPercent);
#}
ENDSOURCE
SOURCE #endDisc
#boolean endDisc()
#{
# return this.SalesPurchLine::endDisc();
#}
ENDSOURCE
SOURCE #existSavedInvoice
#///
#/// Determines if a saved unposted invoices exist for the current record.
#///
#///
#/// True if a saved pending invoice exists for this purchase order line; otherwise, false.
#///
#///
#/// It includes unposted invoices saved in batches or in the process of being edited. Additionally
#/// it includes those invoices actually saved as pending.
#///
#public boolean existSavedInvoice()
#{
# VendInvoiceInfoLine vendInvoiceInfoLine;
# ;
#
# if (this.purchTable().PurchStatus == PurchStatus::Backorder || this.purchTable().PurchStatus == PurchStatus::Received)
# {
# select firstonly RecId from vendInvoiceInfoLine
# where vendInvoiceInfoLine.InventTransId == this.InventTransId;
#
# if (vendInvoiceInfoLine.RecId != 0)
# {
# return true;
# }
# }
# return false;
#}
#
#
#
ENDSOURCE
SOURCE #ExpandBOM
#server void expandBOM(TmpFrmVirtual _tmpFrmVirtual, BOM tmpBOM)
#{
# PurchTable purchTable;
# PurchLine purchLine;
# BOMCalcData bomCalcData;
# InventTable inventTable;
# RouteId routeNum;
# Counter x = 1;
# ;
#
# ttsbegin;
#
# purchTable = this.purchTable();
# inventTable = this.inventTable();
# bomCalcData = BOMCalcData::newInventTable(this.QtyOrdered,inventTable);
# routeNum = inventTable.routeId(purchTable.DeliveryDate, this.QtyOrdered, this.inventDim());
#
# startLengthyOperation();
# while select _tmpFrmVirtual
# {
# purchLine.clear();
# purchLine.PurchId = this.PurchId;
# select tmpBOM where tmpBOM.RecId == _tmpFrmVirtual.RecordNo;
#
# purchLine.initFromPurchTable(this.purchTable());
# purchLine.initFromBOM(tmpBOM, this);
# purchLine.setAddressFromPurchLine(this);
#
# purchLine.QtyOrdered = UnitConvert::qty(BOMCalcConsumption::construct(tmpBOM.Formula,bomCalcData).calcConsumption(
# tmpBOM,
# Route::accError(routeNum,
# tmpBOM.OprNum)),
# tmpBOM.UnitId,
# purchLine.inventTable().inventUnitId(),
# tmpBOM.ItemId);
#
# purchLine.PurchQty = UnitConvert::qty(purchLine.QtyOrdered,
# purchLine.inventTable().inventUnitId(),
# purchLine.PurchUnit,
# tmpBOM.ItemId);
#
# purchLine.LineNum = this.LineNum + 0.001 * x; //ensure unique line number before IC line is created
# purchLine.createLine(true,false,false,false,true,true);
#
# purchLine.LineHeader = strfmt("@SYS25825", this.inventTable().ItemName);
# purchLine.write();
# x++;
# }
#
# while select _tmpFrmVirtual
# {
# this.resetInvent();
# break;
# }
#
# ttscommit;
#}
#
ENDSOURCE
SOURCE #fieldChanged
#boolean fieldChanged(fieldId fieldId)
#{
# boolean ok = false;
# ;
#
# if (!this.RecId)
# ok = true;
#
# if (this.orig().(fieldId) != this.(fieldId))
# ok = true;
#
# return ok;
#}
ENDSOURCE
SOURCE #hasOnlyLineAmount
#boolean hasOnlyLineAmount()
#{
# return this.PriceDiscLine::hasOnlyLineAmount();
#}
ENDSOURCE
SOURCE #inclTax
#boolean inclTax()
#{;
# return this.SalesPurchLine::inclTax();
#}
ENDSOURCE
SOURCE #initBarcode
#server void initBarcode(InventDim _inventDim = this.inventDim())
#{
# InventItemBarcode inventItemBarcode = InventItemBarcode::findPurchBarcodeDimension(this.ItemId, _inventDim);
# ;
# this.BarCode = inventItemBarcode.ItemBarCode;
# this.BarCodeType = inventItemBarcode.BarcodeSetupId;
#}
ENDSOURCE
SOURCE #InitFromBOM
#void initFromBOM(BOM bom,
# PurchLine parentLine)
#{
# InventDim inventDim;
# InventTable inventTable;
# ;
# if (this.InventDimId)
# inventDim = this.inventDim();
#
# this.ItemId = bom.ItemId;
# inventTable = InventTable::find(this.ItemId);
# inventDim.copyItemDim(inventTable.DimGroupId,bom.inventDim());
# inventDim.InventLocationId = bom.inventDim().InventLocationId;
# inventDim.initFromInventLocation(inventDim.inventLocation(), inventTable.DimGroupId);
# this.setInventDimIdFromInventDim(inventDim);
#
# this.initFromInventTable(this.inventTable());
#}
#
ENDSOURCE
SOURCE #InitFromInventTable
#void initFromInventTable(InventTable inventTable)
#{
# PurchLineType purchLineType;
# ;
#
# purchLineType = this.type();
# purchLineType.initFromInventTable(inventTable);
#}
ENDSOURCE
SOURCE #InitFromPriceDisc
#void initFromPriceDisc(PriceDisc priceDisc)
#{
# SchedDate schedDate;
# WorkCalendarSched workCalendarSched;
#
# this.PurchPrice = priceDisc.price();
# this.PriceUnit = priceDisc.priceUnit();
# this.PurchMarkup = priceDisc.markup();
#
# if (this.SkipUpdate == InterCompanySkipUpdate::No)
# {
# this.DeliveryDate = this.purchTable().DeliveryDate;
#
# if (priceDisc.deliveryDays())
# {
# workCalendarSched = new WorkCalendarSched();
# schedDate = workCalendarSched.schedDate(SchedDirection::Forward,
# systemdateget(), // FromDate
# priceDisc.deliveryDays(), // LeadTime
# priceDisc.calendarDays(),
# this.vendTable_OrderAccount().PurchCalendarId,
# this.type().internalCalendarId());
#
# this.DeliveryDate = max(schedDate, this.DeliveryDate);
# }
# // Israel-Localisation-Prodware-ImportFolder-Begin
# this.BPLmodifyDeliveryDates(fieldnum(PurchLine, DeliveryDate));
# // Israel-Localisation-Prodware-ImportFolder-End
# }
#}
#
ENDSOURCE
SOURCE #InitFromProdBOM
#void initFromProdBOM(ProdBOM prodBOM)
#{
# InventDim inventDim;
# ;
#
# this.ItemId = prodBOM.ItemId;
# this.QtyOrdered = prodBOM.QtyInventCalc;
# this.RemainInventPhysical = prodBOM.QtyInventCalc;
#
# if (this.InventDimId)
# {
# inventDim = this.inventDim();
# }
#
# inventDim.mergeUsedDim(this.inventTable().DimGroupId, prodBOM.inventDim());
#
# this.setAddressFromInventDim(inventDim);
#
# this.setInventDimIdFromInventDim(inventDim);
#
# this.ReqPlanIdSched = prodBOM.ReqPlanIdSched;
# this.ReqPOId = prodBOM.ReqPOId;
#
# this.DeliveryDate = prodBOM.RawMaterialDate;
# this.InventRefId = prodBOM.ProdId;
# this.InventRefTransId = prodBOM.InventTransId;
# this.ItemRefType = InventRefType::ProdLine;
#
# this.initName();
# this.initFromVendExternalItemDescription();
#}
#
ENDSOURCE
SOURCE #initFromProjActivity
#public void initFromProjActivity(ProjActivity _projActivity)
#{;
# if (!_projActivity || !_projActivity.CategoryDefault)
# {
# return;
# }
#
# this.ProjCategoryId = _projActivity.CategoryDefault;
#}
#
ENDSOURCE
SOURCE #initFromProjTable
#void initFromProjTable(ProjTable projTable, boolean updateSalesPriceOnly = false)
#{
# PriceMarkup markUpDummy;
# PriceUnit salesUnitDummy;
# ;
#
# if (!updateSalesPriceOnly)
# {
# this.ProjSalesCurrencyId = projTable.currencyId();
# this.ProjLinePropertyId = ProjLinePropertySetup::findLinePropertyId(this.ProjId,this.ProjCategoryId);
# this.ProjTaxGroupId = ProjParameters::taxGroupInvoice(this.ProjId);
# this.ProjTaxItemGroupId = ProjParameters::taxItemGroupItem(this.ProjCategoryId,this.ItemId);
# }
#
# if (projTable.Type == ProjType::FixedPrice ||
# projTable.Type == ProjType::Internal)
# {
# this.ProjSalesPrice = 0;
# }
# else
# {
# [this.ProjSalesPrice,
# salesUnitDummy,
# markUpDummy] = this.inventTable().salesPriceAgreement(
# (this.ConfirmedDlv ? this.ConfirmedDlv : this.DeliveryDate),
# this.inventDim(),
# this.PurchQty,
# this.inventTable().inventUnitId(),
# projTable.CustAccount,
# this.ProjSalesCurrencyId ? this.ProjSalesCurrencyId : projTable.currencyId());
# }
#
# this.Scrap = NoYes::Yes;
#}
#
ENDSOURCE
SOURCE #InitFromPurchLine
#///
#/// Initializes a purchLine table buffer based on another purchLine table buffer.
#///
#///
#/// The purchLine table buffer that is to be copied.
#///
#///
#/// A Boolean value that specifies whether to precisely copy all the account and tax details; optional.
#///
#///
#/// A Boolean value that specifies whether to copy the price discount fields; optional.
#///
#///
#/// A Boolean value that specifies whether to copy the quantify information; optional.
#///
#///
#/// A Boolean value that specifies whether to copy the project information; optional.
#///
#///
#/// A quantity object that sets the PurchQty field value of the new purchLine table buffer to be
#/// different than value of the other table buffer; optional.
#///
#void initFromPurchLine(PurchLine purchLine,
# boolean copyPrecisely = true,
# boolean copyPriceDisc = true,
# boolean copyQty = true,
# boolean copyProject = false,
# Qty qty = purchLine.PurchQty)
#{
# InventDim inventDim;
#
# this.ItemId = purchLine.ItemId;
# this.initFromInventTable(this.inventTable());
#
# this.CreateFixedAsset = purchLine.CreateFixedAsset;
# this.AssetGroup = purchLine.AssetGroup;
# this.AssetId = purchLine.AssetId;
# this.AssetBookId = purchLine.AssetBookId;
# this.AssetTransTypePurch = purchLine.AssetTransTypePurch;
#
# if (copyQty)
# {
# this.setInventDimId(purchLine.InventDimId);
# this.PurchQty = qty;
# this.PurchUnit = purchLine.PurchUnit;
# this.QtyOrdered = purchLine.PurchQty == qty ? purchLine.QtyOrdered : this.calcQtyOrdered();
# }
# else
# {
# inventDim = this.inventDim();
# inventDim.copyItemDim(this.inventTable().DimGroupId,purchLine.inventDim());
# this.setInventDimIdFromInventDim(inventDim);
# }
#
# if (copyPriceDisc)
# {
# this.PurchPrice = purchLine.PurchPrice;
# this.PriceUnit = purchLine.PriceUnit;
# this.LinePercent = purchLine.LinePercent;
# this.LineDisc = purchLine.LineDisc;
# this.MultiLnDisc = purchLine.MultiLnDisc;
# this.MultiLnPercent = purchLine.MultiLnPercent;
# this.PurchMarkup = purchLine.PurchMarkup;
# this.LineAmount = purchLine.LineAmount;
# }
#
# if (copyPrecisely)
# {
# this.setInventDimId(purchLine.InventDimId);
# this.Name = purchLine.Name;
# this.ExternalItemId = purchLine.ExternalItemId;
# this.LedgerAccount = purchLine.LedgerAccount;
# this.Blocked = purchLine.Blocked;
# this.Complete = purchLine.Complete;
# this.TaxGroup = purchLine.TaxGroup;
# this.TaxItemGroup = purchLine.TaxItemGroup;
# this.Dimension = this.copyDimension(purchLine.Dimension);
# this.OverDeliveryPct = purchLine.OverDeliveryPct;
# this.UnderDeliveryPct = purchLine.UnderDeliveryPct;
# this.Transport = purchLine.Transport;
# this.Port = purchLine.Port;
# this.StatProcId = purchLine.StatProcId;
#
# if (VendTable::find(this.VendAccount).Tax1099Reports)
# {
# this.Tax1099Box = purchLine.Tax1099Box;
# this.Tax1099Amount = purchLine.Tax1099Amount;
# this.Tax1099State = purchLine.Tax1099State;
# this.Tax1099StateAmount = purchLine.Tax1099StateAmount;
# }
#
# this.setAddressFromPurchLine(purchLine);
# // Israel-Localisation-Prodware-ImportFolder-Begin
# this.BPLRequestedDlvDate = purchLine.BPLRequestedDlvDate;
# this.BPLVendorConfirmedDlvDate = purchLine.BPLVendorConfirmedDlvDate;
# this.DeliveryDate = purchLine.DeliveryDate;
# this.ConfirmedDlv = purchLine.ConfirmedDlv;
# // Israel-Localisation-Prodware-ImportFolder-End
# }
#
# if (copyProject)
# {
# this.ProjId = purchLine.ProjId;
# this.ActivityNumber = purchLine.ActivityNumber;
# this.ProjCategoryId = purchLine.ProjCategoryId;
# this.ProjLinePropertyId = purchLine.ProjLinePropertyId;
# this.ProjSalesCurrencyId= purchLine.ProjSalesCurrencyId;
# this.ProjSalesUnitId = purchLine.ProjSalesUnitId;
# this.ProjSalesPrice = purchLine.ProjSalesPrice;
# this.ProjTaxGroupId = purchLine.ProjTaxGroupId;
# this.ProjTaxItemGroupId = purchLine.ProjTaxItemGroupId;
# }
#}
#
#
ENDSOURCE
SOURCE #initFromPurchParmLine_Asset
#///
#/// Sets the PurchLine table asset related field values.
#///
#///
#/// A PurchParmLine_Asset table buffer which will be used to set PurchLine asset related field values.
#///
#client server void initFromPurchParmLine_Asset(PurchParmLine_Asset _purchParmLine_Asset)
#{
# ;
#
# if (_purchParmLine_Asset.CreateFixedAsset == NoYes::Yes)
# {
# if (AssetParameters::find().AssetAllowCreate)
# {
# this.CreateFixedAsset = _purchParmLine_Asset.CreateFixedAsset;
# this.AssetGroup = _purchParmLine_Asset.AssetGroup;
# }
# else
# {
# this.CreateFixedAsset = NoYes::No;
# this.AssetGroup = '';
# }
# }
# else
# {
# this.AssetGroup = _purchParmLine_Asset.AssetGroup;
# this.CreateFixedAsset = _purchParmLine_Asset.CreateFixedAsset;
# }
#
# this.AssetId = _purchParmLine_Asset.AssetId;
# this.AssetBookId = _purchParmLine_Asset.AssetBookId;
# this.AssetTransTypePurch = _purchParmLine_Asset.AssetTransTypePurch;
#}
#
ENDSOURCE
SOURCE #initFromPurchRFQLine
#void initFromPurchRFQLine(PurchRFQLine _purchRFQLine)
#{
# this.ItemId = _purchRFQLine.ItemId;
# this.DeliveryDate = _purchRFQLine.DeliveryDate;
# this.QtyOrdered = _purchRFQLine.QtyOrdered;
# this.PurchUnit = _purchRFQLine.PurchUnit;
# this.LineDisc = _purchRFQLine.LineDisc;
# this.LinePercent = _purchRFQLine.LinePercent;
# this.LineAmount = _purchRFQLine.LineAmount;
# this.setInventDimId(_purchRFQLine.InventDimId);
# this.Name = _purchRFQLine.Name;
# this.ExternalItemId = _purchRFQLine.ExternalItemId;
# this.DeliveryAddress = _purchRFQLine.DeliveryAddress;
# this.DeliveryCountryRegionId = _purchRFQLine.DeliveryCountryRegionId;
# this.DeliveryState = _purchRFQLine.DeliveryState;
# this.DeliveryCounty = _purchRFQLine.DeliveryCounty;
# this.DeliveryCity = _purchRFQLine.DeliveryCity;
# this.DeliveryStreet = _purchRFQLine.DeliveryStreet;
# this.DeliveryName = _purchRFQLine.DeliveryName;
# this.MultiLnDisc = _purchRFQLine.MultiLnDisc;
# this.MultiLnPercent = _purchRFQLine.MultiLnPercent;
# this.PurchMarkup = _purchRFQLine.PurchMarkup;
# this.ReqPOId = _purchRFQLine.ReqPOId;
# this.ReqPlanIdSched = _purchRFQLine.ReqPlanIdSched;
# this.AssetId = _purchRFQLine.AssetId;
# this.AssetBookId = _purchRFQLine.AssetBookId;
# this.AssetTransTypePurch = _purchRFQLine.AssetTransTypePurch;
# this.PurchPrice = _purchRFQLine.PurchPrice;
# this.PurchQty = _purchRFQLine.PurchQty;
# this.Dimension = _purchRFQLine.Dimension;
# this.TaxGroup = _purchRFQLine.TaxGroup;
# this.AddressRefRecId = _purchRFQLine.AddressRefRecId;
# this.AddressRefTableId = _purchRFQLine.AddressRefTableId;
# this.ConfirmedDlv = _purchRFQLine.ConfirmedDlv;
# this.InventRefTransId = _purchRFQLine.InventRefTransId;
# this.InventRefId = _purchRFQLine.InventRefId;
# this.TaxItemGroup = _purchRFQLine.TaxItemGroup;
#
# if (_purchRFQLine.ProjId)
# {
# this.ProjId = _purchRFQLine.ProjId;
# this.ActivityNumber = _purchRFQLine.ActivityNumber;
# this.ProjCategoryId = _purchRFQLine.ProjCategoryId;
# this.ProjLinePropertyId = _purchRFQLine.ProjLinePropertyId;
# this.ProjSalesCurrencyId = _purchRFQLine.ProjSalesCurrencyId;
# this.ProjSalesUnitId = _purchRFQLine.ProjSalesUnitId;
# this.ProjSalesPrice = _purchRFQLine.ProjSalesPrice;
# this.ProjTaxGroupId = _purchRFQLine.ProjTaxGroupId;
# this.ProjTaxItemGroupId = _purchRFQLine.ProjTaxItemGroupId;
# this.ProjTransId = _purchRFQLine.ProjTransId;
# }
#}
#
ENDSOURCE
SOURCE #initFromPurchRFQReplyLine
#void initFromPurchRFQReplyLine(PurchRFQReplyLine _purchRFQReplyLine)
#{
# CompanyInfo companyInfo;
# WorkCalendarSched workCalendar;
# InventItemPurchSetup itemPurchSetup;
# int leadTime;
# CalendarDays calDays;
#
# this.DeliveryDate = _purchRFQReplyLine.DeliveryDate;
# if(!this.DeliveryDate)
# {
# if( _purchRFQReplyLine.LeadTime > 0)
# {
# leadTime = _purchRFQReplyLine.LeadTime;
# calDays = _purchRFQReplyLine.CalendarDays;
# }
# else
# {
# itemPurchSetup = InventItemPurchSetup::find(PurchRFQLine::findRecId(_purchRFQReplyLine.rfqLineRecId).ItemId, this.InventDimId);
# leadTime = itemPurchSetup.leadTime();
# calDays = itemPurchSetup.calendarDays();
# }
#
# if(leadTime > 0)
# {
# companyInfo = CompanyInfo::find();
# workCalendar = new WorkCalendarSched();
# this.DeliveryDate = workCalendar.schedDate(SchedDirection::Forward, systemdateget(),
# leadTime, calDays, companyInfo.ShippingCalendarId);
# }
# }
# this.ConfirmedDlv = _purchRFQReplyLine.DeliveryDate;
# this.PurchQty = _purchRFQReplyLine.PurchQty;
# this.PurchUnit = _purchRFQReplyLine.PurchUnit;
# this.PurchPrice = _purchRFQReplyLine.PurchPrice;
# this.PriceUnit = _purchRFQReplyLine.PriceUnit;
# this.LineDisc = _purchRFQReplyLine.LineDisc;
# this.LinePercent = _purchRFQReplyLine.LinePercent;
# this.LineAmount = _purchRFQReplyLine.LineAmount;
# this.ExternalItemId = _purchRFQReplyLine.ExternalItemId;
# this.MultiLnDisc = _purchRFQReplyLine.MultiLnDisc;
# this.MultiLnPercent = _purchRFQReplyLine.MultiLnPercent;
# this.PurchMarkup = _purchRFQReplyLine.PurchMarkup;
# this.Name = _purchRFQReplyLine.Name;
#
#}
ENDSOURCE
SOURCE #InitFromPurchTable
#void initFromPurchTable(PurchTable purchTable)
#{
# this.type().initFromPurchTable(purchTable);
#}
ENDSOURCE
SOURCE #initFromReqPO
#void initFromReqPO(ReqPO _reqPO)
#{
# ;
# this.ItemId = _reqPO.ItemId;
#
# this.setInventDimId(_reqPO.CovInventDimId);
#
# this.ReqPOId = _reqPO.RefId;
# this.ReqPlanIdSched = _reqPO.ReqPlanId;
#
# this.PurchQty = _reqPO.PurchQty;
# this.RemainPurchPhysical = _reqPO.PurchQty;
# this.PurchUnit = _reqPO.PurchUnit;
#
# this.QtyOrdered = this.calcQtyOrdered();
# this.RemainInventPhysical = this.QtyOrdered;
#
# this.initName();
# this.initFromVendExternalItemDescription();
#}
#
ENDSOURCE
SOURCE #InitFromSalesLine
#void initFromSalesLine(SalesLine salesLine)
#{
# InventDim inventDim = this.inventDim();
# ;
#
# this.ItemId = salesLine.ItemId;
#
# inventDim.mergeUsedDim(this.inventTable().DimGroupId,salesLine.inventDim());
#
# this.setAddressFromInventDim(inventDim);
#
# this.setInventDimIdFromInventDim(inventDim);
#
# this.InventRefId = salesLine.SalesId;
# this.InventRefTransId = salesLine.InventTransId;
# this.ItemRefType = InventRefType::Sales;
#
# if (this.DeliveryType == TradeLineDlvType::DropShip)
# {
# this.CustomerRef = salesLine.salesTable().CustomerRef;
# this.CustPurchaseOrderFormNum = salesLine.salesTable().PurchOrderFormNum;
# }
#
# this.ProjCategoryId = salesLine.ProjCategoryId;
# if (this.ProjId)
# this.Scrap = NoYes::No;
#
# this.initName();
# this.initFromVendExternalItemDescription();
#}
#
#
ENDSOURCE
SOURCE #initFromTmpPurchLinePrice
#void initFromTmpPurchLinePrice(TmpPurchLinePrice _tmpPurchLinePrice)
#{
# this.LineAmount = _tmpPurchLinePrice.LineAmount;
# this.PurchPrice = _tmpPurchLinePrice.Price;
#
# this.LineDisc = _tmpPurchLinePrice.LineDisc;
# this.LinePercent = _tmpPurchLinePrice.LinePercent;
#
# this.MultiLnDisc = _tmpPurchLinePrice.MultiLineDisc;
# this.MultiLnPercent = _tmpPurchLinePrice.MultiLinePercent;
#
# this.PurchMarkup = _tmpPurchLinePrice.Markup;
#}
#
ENDSOURCE
SOURCE #initFromTmpSuppItem
#void initFromTmpSuppItem(TmpSuppItem _tmpSuppItem)
#{
# LineNum lineNum;
# InventDim inventDim;
# ;
#
# this.ItemId = _tmpSuppItem.ItemId;
# inventDim = this.inventDim();
# inventDim.mergeUsedDim(this.inventTable().DimGroupId, InventDim::find(_tmpSuppItem.InventDimId));
# this.setInventDimIdFromInventDim(inventDim);
#
# this.initFromInventTable(this.inventTable());
# this.initFromVendExternalItemDescription();
#
# this.PurchQty = _tmpSuppItem.Qty;
# this.QtyOrdered = this.calcQtyOrdered();
#
# if (_tmpSuppItem.SuppItemFree)
# {
# this.PurchPrice = 0.0;
# this.LinePercent = 0.0;
# this.LineDisc = 0.0;
# this.MultiLnDisc = 0.0;
# this.MultiLnPercent = 0.0;
# this.PurchMarkup = 0.0;
# }
#
# this.LineAmount = this.calcLineAmountForced();
#
# if (_tmpSuppItem.AttachRecId)
# {
# this.LineNum = PurchLine::findRecId(_tmpSuppItem.AttachRecId).LineNum;
# lineNum = this.nextLineNum();
# if (lineNum)
# this.LineNum += (lineNum - this.LineNum) / 2;
# else
# this.LineNum += 1.0;
# }
#
#}
#
#
ENDSOURCE
SOURCE #initFromVendExternalItemDescription
#server void initFromVendExternalItemDescription(InventDim _inventDim = this.inventDim())
#{
# VendExternalItemDescription vendExternalItemDescription = new VendExternalItemDescription(this.ItemId, _inventDim, this.purchTable().OrderAccount);
# ;
#
# if (vendExternalItemDescription.findExternalDescription())
# {
# this.ExternalItemId = vendExternalItemDescription.externalItemId();
# if (vendExternalItemDescription.externalItemFreeTxt())
# {
# if (VendFormletterParameters::find().ExternalItemOverwriteAppend == OverwriteAppend::Overwrite)
# {
# this.Name = vendExternalItemDescription.externalItemFreeTxt();
# }
# else
# {
# this.initName(this.inventTable());
# if (this.Name)
# {
# this.Name += '\n';
# }
# this.Name += vendExternalItemDescription.externalItemFreeTxt();
# }
# }
# }
#}
#
#
ENDSOURCE
SOURCE #InitFromVendInvoiceTrans
#server void initFromVendInvoiceTrans(VendInvoiceTrans vendInvoiceTrans,
# boolean copyPrecisely = true,
# boolean copyPriceDisc = true,
# boolean copyQty = true,
# Qty qty = vendInvoiceTrans.Qty)
#{
# InventDim inventDim;
# ;
#
# this.ItemId = vendInvoiceTrans.ItemId;
# this.initFromInventTable(this.inventTable());
#
# if (copyQty)
# {
# this.setInventDimId(vendInvoiceTrans.InventDimId);
# this.PurchQty = qty;
# this.PurchUnit = vendInvoiceTrans.PurchUnit;
# this.QtyOrdered = vendInvoiceTrans.Qty == qty ? vendInvoiceTrans.InventQty : this.calcQtyOrdered();
#
# }
# else
# {
# inventDim = this.inventDim();
# inventDim.copyItemDim(this.inventTable().DimGroupId,vendInvoiceTrans.inventDim());
# this.setInventDimIdFromInventDim(inventDim);
# }
#
# if (copyPriceDisc)
# {
# this.PurchPrice = vendInvoiceTrans.PurchPrice;
# this.PriceUnit = vendInvoiceTrans.PriceUnit;
# this.LinePercent = vendInvoiceTrans.LinePercent;
# this.LineDisc = vendInvoiceTrans.LineDisc;
# this.MultiLnDisc = vendInvoiceTrans.MultiLnDisc;
# this.MultiLnPercent = vendInvoiceTrans.MultiLnPercent;
# this.PurchMarkup = vendInvoiceTrans.PurchMarkup;
# this.LineAmount = vendInvoiceTrans.LineAmount;
# }
#
# if (copyPrecisely)
# {
# this.setInventDimId(vendInvoiceTrans.InventDimId);
# this.Name = vendInvoiceTrans.Name;
# this.ExternalItemId = vendInvoiceTrans.ExternalItemId;
# this.LedgerAccount = vendInvoiceTrans.LedgerAccount;
# this.TaxGroup = vendInvoiceTrans.TaxGroup;
# this.TaxItemGroup = vendInvoiceTrans.TaxItemGroup;
# this.Dimension = this.copyDimension(vendInvoiceTrans.Dimension);
# this.StatProcId = vendInvoiceTrans.StatProcId;
# this.Transport = vendInvoiceTrans.Transport;
# this.Port = vendInvoiceTrans.Port;
# this.StatProcId = vendInvoiceTrans.StatProcId;
# }
#}
#
#
ENDSOURCE
SOURCE #initFromVendPackingSlipTrans
#server void initFromVendPackingSlipTrans(VendPackingSlipTrans vendPackingSlipTrans,
# boolean copyPrecisely = true,
# boolean copyPriceDisc = true,
# boolean copyQty = true,
# Qty qty = vendPackingSlipTrans.Qty)
#{
# InventDim inventDim;
# ;
#
# this.ItemId = vendPackingSlipTrans.ItemId;
# this.initFromInventTable(this.inventTable());
#
# if (copyQty)
# {
# this.setInventDimId(vendPackingSlipTrans.InventDimId);
# this.PurchQty = qty;
# this.PurchUnit = vendPackingSlipTrans.PurchUnit;
# this.QtyOrdered = vendPackingSlipTrans.Qty == qty ? vendPackingSlipTrans.InventQty : this.calcQtyOrdered();
# }
# else
# {
# inventDim = this.inventDim();
# inventDim.copyItemDim(this.inventTable().DimGroupId,vendPackingSlipTrans.inventDim());
# this.setInventDimIdFromInventDim(inventDim);
# }
#
# if (copyPrecisely)
# {
# this.Name = vendPackingSlipTrans.Name;
# this.ExternalItemId = vendPackingSlipTrans.ExternalItemId;
# this.Dimension = this.copyDimension(vendPackingSlipTrans.Dimension);
# this.Transport = vendPackingSlipTrans.Transport;
# this.Port = vendPackingSlipTrans.Port;
# this.StatProcId = vendPackingSlipTrans.StatProcId;
# }
#}
#
ENDSOURCE
SOURCE #initFromVendPurchOrderTrans
#server void initFromVendPurchOrderTrans(VendPurchOrderTrans vendPurchOrderTrans,
# boolean copyPrecisely = true,
# boolean copyPriceDisc = true,
# boolean copyQty = true,
# Qty qty = vendPurchOrderTrans.Qty)
#{
# InventDim inventDim;
# ;
#
# this.ItemId = vendPurchOrderTrans.ItemId;
# this.initFromInventTable(this.inventTable());
#
# if (copyQty)
# {
# this.setInventDimId(vendPurchOrderTrans.InventDimId);
# this.PurchQty = qty;
# this.PurchUnit = vendPurchOrderTrans.PurchUnit;
# this.QtyOrdered = this.calcQtyOrdered();
# }
# else
# {
# inventDim = this.inventDim();
# inventDim.copyItemDim(this.inventTable().DimGroupId,vendPurchOrderTrans.inventDim());
# this.setInventDimIdFromInventDim(inventDim);
# }
#
# if (copyPriceDisc)
# {
# this.PurchPrice = vendPurchOrderTrans.PurchPrice;
# this.PriceUnit = vendPurchOrderTrans.PriceUnit;
# this.LinePercent = vendPurchOrderTrans.LinePercent;
# this.LineDisc = vendPurchOrderTrans.LineDisc;
# this.MultiLnDisc = vendPurchOrderTrans.MultiLnDisc;
# this.MultiLnPercent = vendPurchOrderTrans.MultiLnPercent;
# this.PurchMarkup = vendPurchOrderTrans.PurchMarkup;
# this.LineAmount = vendPurchOrderTrans.LineAmount;
# }
#
# if (copyPrecisely)
# {
# this.Name = vendPurchOrderTrans.Name;
# this.ExternalItemId = vendPurchOrderTrans.ExternalItemId;
# this.TaxGroup = vendPurchOrderTrans.TaxGroup;
# this.TaxItemGroup = vendPurchOrderTrans.TaxItemGroup;
# this.Dimension = this.copyDimension(vendPurchOrderTrans.Dimension);
# }
#}
#
#
ENDSOURCE
SOURCE #InitFromVendTable
#void initFromVendTable (VendTable vendTable = VendTable::find(this.VendAccount))
#{
# this.Tax1099Box = vendTable.Tax1099Box;
#}
ENDSOURCE
SOURCE #initItemDim
#server void initItemDim(InventDim _inventDim = this.inventDim())
#{
# ;
# this.InventDimId = InventDim::findOrCreate(_inventDim).InventDimId;
# this.initName();
# this.initFromVendExternalItemDescription(_inventDim);
# this.initBarcode(_inventDim);
#
#}
#
ENDSOURCE
SOURCE #initName
#void initName(InventTable inventTable = InventTable::find(this.ItemId))
#{
# this.Name = PurchParameters::nameAndOrDescription(inventTable, this.purchTable().LanguageId, this.InventDimId);
#}
#
ENDSOURCE
SOURCE #InitPurchQty
#void initPurchQty()
#{
# PurchLineType purchLineType;
# ;
# purchLineType = this.type();
# purchLineType.initPurchQty();
#}
ENDSOURCE
SOURCE #initValue
#public void initValue()
#{
# super();
#
# this.type().initValue();
#}
ENDSOURCE
SOURCE #insert
#public void insert(boolean dropInvent = false,
# boolean findMarkup = true)
#{
# PurchLineType purchLineType;
# ;
#
# purchLineType = this.type();
# purchLineType.insert(dropInvent, findMarkup);
#}
ENDSOURCE
SOURCE #interCompanyIsBeingUpdated
#public boolean interCompanyIsBeingUpdated(boolean _showWarning = true)
#{
# SalesLine salesLine;
# InventTrans inventTrans;
# PurchTable purchTable = this.purchTable();
# boolean ret = false;
#;
# if (this.RecId
# && purchTable.InterCompanyOrder
# && purchTable.InterCompanyCompanyId)
# {
# inventTrans = null;
# select firstonly RecId, TransRefId from inventTrans
# index hint TransIdIdx
# where inventTrans.InventTransId == this.InventTransId
# && (inventTrans.StatusReceipt == StatusReceipt::Received
# || inventTrans.StatusReceipt == StatusReceipt::Registered
# || inventTrans.StatusReceipt == StatusReceipt::Arrived
# || inventTrans.StatusIssue == StatusIssue::Deducted
# || inventTrans.StatusIssue == StatusIssue::Picked
# || inventTrans.TransChildType != InventTransChildType::None);
#
# if (inventTrans.RecId)
# {
# ret = true;
# if (_showWarning)
# {
# setprefix(strfmt("@SYS93821",TradeInterCompany::curCompanyName()));
# setprefix(#PreFixField(purchTable, PurchId));
# checkFailed("@SYS93839");
# }
# }
# else
# {
# if (this.PurchStatus != PurchStatus::Invoiced)
# {
# select sum(Qty) from inventTrans
# index hint TransIdIdx
# where inventTrans.InventTransId == this.InventTransId
# && (inventTrans.StatusReceipt == StatusReceipt::Purchased
# || inventTrans.StatusIssue == StatusIssue::Sold);
# if (inventTrans.Qty != 0)
# {
# ret = true;
# if (_showWarning)
# {
# setprefix(strfmt("@SYS93821",TradeInterCompany::curCompanyName()));
# setprefix(#PreFixField(purchTable, PurchId));
# checkFailed("@SYS93839");
# }
# }
# }
# }
#
# if (!ret
# && this.InterCompanyInventTransId)
# {
# changecompany(purchTable.InterCompanyCompanyId)
# {
# setprefix(strfmt("@SYS93821",TradeInterCompany::curCompanyName()));
#
# salesLine = SalesLine::findInventTransId(this.InterCompanyInventTransId);
# if (salesLine)
# ret = salesLine.interCompanyIsBeingUpdated(_showWarning);
# }
# }
# }
# return ret;
#}
#
ENDSOURCE
SOURCE #interCompanyLineAmount
#AmountCur interCompanyLineAmount(PurchQty _purchQty = this.PurchQty,
# InvoiceDate _invoiceDate = this.DeliveryDate,
# boolean _rounded = true)
#{
# AmountCur lineAmount;
# SalesLine salesLine;
# ;
# lineAmount = 0;
# if (this.InventRefTransId)
# {
# salesLine = SalesLine::findInventTransId(this.InventRefTransId);
# if (salesLine.RecId)
# {
# lineAmount = Currency::curAmount2CurAmount(salesLine.calcLineAmountExclTax(_purchQty, _invoiceDate, _rounded),salesLine.CurrencyCode,this.CurrencyCode,_invoiceDate,_rounded);
# }
# else
# {
# lineAmount = this.calcLineAmountExclTax(_purchQty, _invoiceDate, _rounded);
# }
# }
# else
# {
# lineAmount = this.calcLineAmountExclTax(_purchQty, _invoiceDate, _rounded);
# }
# return lineAmount;
#}
#
ENDSOURCE
SOURCE #interCompanyOriginDisplay
#//BP Deviation Documented
#display InterCompanyOriginDisplay interCompanyOriginDisplay()
#{
# InterCompanyOriginDisplay interCompanyOriginDisplay;
# DictEnum dictEnum = new DictEnum(enumnum(InterCompanyOrigin));
# ;
# if (this.InterCompanyInventTransId)
# {
# interCompanyOriginDisplay = dictEnum.value2Name(this.InterCompanyOrigin);
# }
# return interCompanyOriginDisplay;
#}
#
ENDSOURCE
SOURCE #interCompanyPurchaseLeadDate
#server TransDate interCompanyPurchaseLeadDate(TransDate _deliveryDate)
#{
# LeadTime leadTime;
# CalendarDays calendarDays;
# ReqItemTable reqItemTable = ReqItemTable::find(this.ItemId,this.InventDimId);
# PriceDisc priceDisc;
# InventItemPurchSetup inventItemPurchSetup = InventItemPurchSetup::find(this.ItemId,this.InventDimId);
# TransDate leadTimeDate;
# WorkCalendarSched workCalendarSched;
# ;
# if (reqItemTable.LeadTimePurchaseActive)
# {
# leadTime = reqItemTable.LeadTimePurchase;
# calendarDays = reqItemTable.CalendarDaysPurchase;
# }
# else
# {
# priceDisc = PriceDisc::newFromSalesPurchLine(this, this.inventDim());
# priceDisc.findPrice(this.priceGroupId());
# if (priceDisc.deliveryDays())
# {
# leadTime = priceDisc.deliveryDays();
# calendarDays = priceDisc.calendarDays();
# }
# else
# {
# leadTime = inventItemPurchSetup.leadTime();
# calendarDays = inventItemPurchSetup.calendarDays();
# }
# }
#
# workCalendarSched = new WorkCalendarSched();
# leadTimeDate = workCalendarSched.schedDate(SchedDirection::Backward,
# _deliveryDate,
# leadTime,
# calendarDays,
# this.vendTable_OrderAccount().PurchCalendarId,
# this.type().internalCalendarId());
#
#
# return leadTimeDate;
#}
#
ENDSOURCE
SOURCE #interCompanyPurchLineExist
#boolean interCompanyPurchLineExist()
#{;
# return SalesLine::findInventTransId(this.InventRefTransId).InterCompanyInventTransId ? true : false;
#}
ENDSOURCE
SOURCE #interCompanyRevertMarkupTrans
#server void interCompanyRevertMarkupTrans()
#{
# SalesLine salesLine;
# CustInvoiceTrans custInvoiceTrans;
# VendInvoiceTrans vendInvoiceTrans;
# ;
# if (this.purchTable().isInterCompanyOrder()
# && this.ItemRefType == InventRefType::Sales
# && this.InventRefTransId)
# {
# salesLine = SalesLine::findInventTransId(this.InventRefTransId);
# if (salesLine.InventTransIdReturn)
# {
# select firstonly custInvoiceTrans
# where custInvoiceTrans.InventTransId == salesLine.InventTransIdReturn
# && custInvoiceTrans.Qty == -salesLine.SalesQty;
# if (custInvoiceTrans.InventRefType == InventRefType::Purch
# && custInvoiceTrans.InventRefTransId)
# {
# select firstonly vendInvoiceTrans
# where vendInvoiceTrans.InventTransId == custInvoiceTrans.InventRefTransId
# && vendInvoiceTrans.Qty == -salesLine.SalesQty;
# if (vendInvoiceTrans)
# {
# Markup::copy(true,vendInvoiceTrans,this);
# }
# }
# }
# }
#}
#
ENDSOURCE
SOURCE #interCompanySalesLine
#SalesLine interCompanySalesLine(boolean _forUpdate = false)
#{
# SalesLine salesLine = null;
#;
# if (this.InterCompanyInventTransId)
# {
# changecompany(this.purchTable().InterCompanyCompanyId)
# {
# salesLine = SalesLine::findInventTransId(this.InterCompanyInventTransId,_forUpdate);
# }
#
# }
# return salesLine;
#}
ENDSOURCE
SOURCE #interCompanySalesLineOriginal
#SalesLine interCompanySalesLineOriginal(boolean _forUpdate = false)
#{
# SalesLine salesLine = null;
#;
# if (this.ItemRefType == InventRefType::Sales
# && this.InventRefTransId)
# {
# changecompany(this.DataAreaId)
# {
# salesLine = SalesLine::findInventTransId(this.InventRefTransId,_forUpdate);
# }
# }
# return salesLine;
#}
ENDSOURCE
SOURCE #interCompanyUpdateNow
#boolean interCompanyUpdateNow()
#{
# boolean ok = false;
# ;
#
# if (!this.RecId)
# ok = true;
#
# if (this.orig().ItemId != this.ItemId
# || this.orig().InventDimId != this.InventDimId
# || this.orig().DeliveryDate != this.DeliveryDate
# || this.orig().ConfirmedDlv != this.ConfirmedDlv
# || this.orig().ShippingDateRequested != this.ShippingDateRequested
# || this.orig().ShippingDateConfirmed != this.ShippingDateConfirmed
# || this.orig().LineNum != this.LineNum
# || this.orig().InventTransId != this.InventTransId
# || this.orig().PurchQty != this.PurchQty
# || this.orig().PurchUnit != this.PurchUnit
# || this.orig().OverDeliveryPct != this.OverDeliveryPct
# || this.orig().UnderDeliveryPct != this.UnderDeliveryPct
# || this.orig().DeliveryAddress != this.DeliveryAddress
# || this.orig().DeliveryName != this.DeliveryName
# || this.orig().DeliveryStreet != this.DeliveryStreet
# || this.orig().DeliveryZipCode != this.DeliveryZipCode
# || this.orig().DeliveryCity != this.DeliveryCity
# || this.orig().DeliveryCounty != this.DeliveryCounty
# || this.orig().DeliveryState != this.DeliveryState
# || this.orig().DeliveryCountryRegionId != this.DeliveryCountryRegionId
# || this.orig().Dimension != this.Dimension
# || this.orig().PurchPrice != this.PurchPrice
# || this.orig().PriceUnit != this.PriceUnit
# || this.orig().LineAmount != this.LineAmount
# || this.orig().PurchMarkup != this.PurchMarkup
# || this.orig().LineDisc != this.LineDisc
# || this.orig().LinePercent != this.LinePercent
# || this.orig().MultiLnDisc != this.MultiLnDisc
# || this.orig().MultiLnPercent != this.MultiLnPercent
# || this.orig().Complete != this.Complete
# || this.orig().Blocked != this.Blocked
# || this.orig().ReturnDispositionCodeId != this.ReturnDispositionCodeId
# || this.orig().ReturnStatus != this.ReturnStatus
# )
# {
# ok = true;
# }
#
# return ok;
#}
#
ENDSOURCE
SOURCE #InventDim
#InventDim inventDim(boolean update = false)
#{
# return InventDim::find(this.InventDimId, update);
#}
ENDSOURCE
SOURCE #InventTable
#InventTable inventTable(ItemId itemId = this.ItemId,
# boolean update = false)
#{
# return InventTable::find(itemId, update);
#}
ENDSOURCE
SOURCE #InventTableModule
#InventTableModule inventTableModule(ItemId itemId = this.ItemId)
#{
# return InventTableModule::find(itemId, this.moduleType());
#}
ENDSOURCE
SOURCE #invoiceAccount
#VendInvoiceAccount invoiceAccount()
#{
# return this.purchTable().InvoiceAccount;
#}
ENDSOURCE
SOURCE #InvoicedInTotal
#//BP Deviation Documented
#display PurchQty invoicedInTotal()
#{
# if (!this.InventTransId)
# return 0;
#
# return this.invoicedInTotalServer();
#}
ENDSOURCE
SOURCE #invoicedInTotalServer
#server PurchQty invoicedInTotalServer()
#{
# return this.type().invoicedInTotal();
#}
ENDSOURCE
SOURCE #invoicedInventInTotal
#//BP Deviation Documented
#display InventQty invoicedInventInTotal()
#{
# InventTransIdSum inventTransIdSum;
# InventQty inventQty = 0;
# ;
#
# if (this.InventTransId)
# {
# inventTransIdSum = new InventTransIdSum(this.InventTransId);
#
# inventQty = inventTransIdSum.financial();
# }
#
# return inventQty;
#}
ENDSOURCE
SOURCE #isDirectDelivery
#///
#/// Checks if the order line is part of a direct delivery.
#///
#///
#/// True if the order line is part of a direct delivery; otherwise false.
#///
#boolean isDirectDelivery()
#{
# return this.DeliveryType == TradeLineDlvType::DropShip;
#}
ENDSOURCE
SOURCE #isInterCompanyOrder
#boolean isInterCompanyOrder()
#{
# boolean ok = false;
# ;
#
# if (this.InterCompanyInventTransId && this.purchTable().isInterCompanyOrder())
# {
# ok = true;
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #ItemIdChanged
#server void itemIdChanged()
#{
# PurchTable purchTable;
#
# this.initFromInventTable(this.inventTable());
#
# if (this.inventTable().inventModelGroup().InventModel == InventModel::StdCost)
# {
# this.CreateFixedAsset = NoYes::No;
# this.AssetGroup = '';
# this.AssetId = '';
# this.AssetGroup = '';
# this.AssetBookId = '';
# }
#
# if (ReverseChargeParameters_UK::find().rcEnabled)
# {
# if (ReverseChargeItemGroup_UK::exist(this.inventTable().ItemGroupId))
# {
# purchTable = this.purchTable();
# if (!purchTable.vatNum && ReverseCharge_invoice_UK::isPurchDomestic(purchTable))
# {
# warning("@SYS125406");
# }
# }
# }
#}
ENDSOURCE
SOURCE #ItemLineDisc
#LineDiscCode itemLineDisc()
#{;
# return this.inventTable().purchLineDisc();
#}
ENDSOURCE
SOURCE #ItemName
#//BP Deviation Documented
#display PurchLineShowItemName itemName()
#{
# return this.inventTable().itemName(this.inventDim());
#}
#
ENDSOURCE
SOURCE #lineAmountExclTax
#//BP Deviation Documented
#display PurchLineAmount lineAmountExclTax(TransDate transDate = systemdateget())
#{
# return this.SalesPurchLine::lineAmountExclTax(this.taxDate(transDate));
#}
ENDSOURCE
SOURCE #lineAmountModified
#void lineAmountModified()
#{
# this.PriceDiscLine::lineAmountModified();
#}
ENDSOURCE
SOURCE #LineAmountMST
#AmountMST lineAmountMST(TransDate exchRateDate = systemdateget(),
# ExchRate exchRate = 0,
# ExchrateSecondary exchrateSecondary = 0,
# ExchRatesTriangulation exchRatesTriangulation = UnknownNoYes::Unknown)
#
#{
# return this.SalesPurchLine::lineAmountMST(exchRateDate, exchRate, exchrateSecondary, exchRatesTriangulation);
#}
#
ENDSOURCE
SOURCE #lineAmountMSTExclTax
#AmountMST lineAmountMSTExclTax(TransDate exchRateDate = systemdateget(),
# ExchRate exchRate = 0,
# ExchrateSecondary exchrateSecondary = 0,
# ExchRatesTriangulation exchRatesTriangulation = UnknownNoYes::Unknown)
#
#{
# return this.SalesPurchLine::lineAmountMSTExclTax(exchRateDate, exchRate, exchrateSecondary, exchRatesTriangulation);
#}
#
ENDSOURCE
SOURCE #LineDisc
#LineDiscCode lineDisc()
#{;
# return this.purchTable().LineDisc;
#}
ENDSOURCE
SOURCE #linkInventDim2Dimension
#///
#/// Defaults PurchLine.dimension values based on the InventDim record buffer values.
#///
#///
#/// The InventDim record buffer linked to the current PurchLine record buffer;
#///
#///
#/// The InventDim record buffer that was previously linked to the current PurchLine record buffer;
#///
#public void linkInventDim2Dimension(InventDim _newInventDim, InventDim _oldInventDim)
#{
# ;
# _newInventDim.setInventSiteFromParentIfModified(this, _oldInventDim);
#}
#
ENDSOURCE
SOURCE #modifiedField
#public void modifiedField(fieldId _fieldId)
#{
#
# super(_fieldId);
#
# switch (_fieldId)
# {
# case fieldnum(PurchLine, PurchReceivedNow):
# this.setInventReceivedNow();
# this.Tax1099Amount = 0;
# this.Tax1099StateAmount = 0;
# break;
#
# case fieldnum(PurchLine, PriceUnit):
# this.LineAmount = this.calcLineAmount();
# break;
#
# case fieldnum(PurchLine, PurchPrice):
# this.LineAmount = this.calcLineAmountForced();
# break;
#
# case fieldnum(PurchLine, LinePercent):
# this.LineAmount = this.calcLineAmountForced();
# break;
#
# case fieldnum(PurchLine, LineDisc):
# this.LineAmount = this.calcLineAmountForced();
# break;
#
# case fieldnum(PurchLine, LineAmount):
# this.lineAmountModified();
# break;
#
# case fieldnum(PurchLine, PurchUnit):
# InventMovement::bufferSetTransQtyUnit(this);
# this.setInventReceivedNow();
# break;
#
# case fieldnum(PurchLine, PurchMarkup):
# this.LineAmount = this.calcLineAmountForced();
# break;
#
# case fieldnum(PurchLine, MultiLnDisc):
# this.LineAmount = this.calcLineAmountForced();
# break;
#
# case fieldnum(PurchLine, MultiLnPercent):
# this.LineAmount = this.calcLineAmountForced();
# break;
#
# case fieldnum(PurchLine, ProjCategoryId):
# this.ProjLinePropertyId = ProjLinePropertySetup::findLinePropertyId(this.ProjId,this.ProjCategoryId);
# this.ProjTaxItemGroupId = ProjParameters::taxItemGroupItem(this.ProjCategoryId,this.ItemId);
# break;
#
# case fieldnum(PurchLine, ActivityNumber):
# this.initFromProjActivity(ProjActivity::find(this.ActivityNumber));
# this.ProjLinePropertyId = ProjLinePropertySetup::findLinePropertyId(this.ProjId,this.ProjCategoryId);
# this.ProjTaxItemGroupId = ProjParameters::taxItemGroupItem(this.ProjCategoryId,this.ItemId);
# break;
#
# case fieldnum(PurchLine, AssetId):
# this.modifyAssetId();
# this.assetUpdateInventTrans();
# break;
#
# case fieldnum(PurchLine, AssetBookId):
# if (this.AssetId && this.AssetBookId)
# {
# this.Dimension = this.copyDimension(AssetTable::find(this.AssetId).dimension(this.AssetBookId));
# }
# this.assetUpdateInventTrans();
# break;
#
# case fieldnum(PurchLine, DeliveryAddress):
# this.setListCode();
# this.clearAddressReference();
# break;
#
# case fieldnum(PurchLine, DeliveryCountryRegionId):
# this.AddressMap::formatAddress();
# this.setListCode();
# this.clearAddressReference();
# break;
#
# case fieldnum(PurchLine, DeliveryCounty):
# this.AddressMap::formatAddress();
# this.setListCode();
# this.clearAddressReference();
# break;
#
# case fieldnum(PurchLine, DeliveryState):
# this.AddressMap::formatAddress();
# this.clearAddressReference();
# break;
#
# case fieldnum(PurchLine, DeliveryCity):
# this.AddressMap::formatAddress();
# this.clearAddressReference();
# break;
#
# case fieldnum(PurchLine, DeliveryStreet):
# this.AddressMap::formatAddress();
# this.clearAddressReference();
# break;
#
# case fieldnum(PurchLine, DeliveryZipCode):
# this.AddressMap::modifiedFieldZipCode();
# this.clearAddressReference();
# break;
#
# case fieldnum(PurchLine, DeliveryAddress):
# this.setListCode();
# this.clearAddressReference();
# break;
#
# case fieldnum(PurchLine, Requisitioner):
# this.ReqAttention = EmplTable::find(this.Requisitioner).ReqAttention;
# break;
#
# case fieldnum(PurchLine, ConfirmedDlv):
# if(this.ProjId)
# {
# this.initFromProjTable(this.projTable(),true);
# }
# break;
#
# case fieldnum(PurchLine, DeliveryDate):
# if(this.ProjId && !this.ConfirmedDlv)
# {
# this.initFromProjTable(this.projTable(),true);
# }
# // Israel-Localisation-Prodware-ImportFolder-Begin
# this.BPLmodifyDeliveryDates(_fieldId);
# // Israel-Localisation-Prodware-ImportFolder-End
# break;
#
# case fieldnum(PurchLine, ProjSalesCurrencyId):
# if(this.ProjId)
# {
# this.initFromProjTable(this.projTable(),true);
# }
# break;
# // Israel-Localisation-Prodware-ImportFolder-Begin
# case fieldnum(PurchLine, BPLRequestedDlvDate):
# case fieldnum(PurchLine, BPLVendorConfirmedDlvDate):
# this.BPLmodifyDeliveryDates(_fieldId);
# break;
# // Israel-Localisation-Prodware-ImportFolder-End
# }
#}
#
ENDSOURCE
SOURCE #modifyAssetId
#///
#/// Modifies the related field values when the AssetId field value is changed.
#///
#///
#/// The AssetGroup and AssetBookId field values will be updated based on the
#/// new AssetId field value.
#///
#public void modifyAssetId()
#{
# AssetBook assetBook;
# AssetBookTable assetBookTable;
# AssetBookId bookIdDefault;
# AssetTable assetTable;
# ;
#
# select AssetGroup from assetTable
# where assetTable.AssetId == this.AssetId;
# if (assetTable)
# {
# this.AssetGroup = assetTable.AssetGroup;
# this.ItemRefType = InventRefType::FixedAsset;
#
# // If asset is assigned, need to clear "createFixedAsset" flag.
# this.CreateFixedAsset = false;
# }
# else
# {
# this.AssetGroup = '';
# this.ItemRefType = InventRefType::None;
# }
#
# bookIdDefault = AssetParameters::find().BookIdDefault;
# assetBook = AssetBook::find(this.AssetId, bookIdDefault);
#
# if(assetBook &&
# AssetBookTable::find(bookIdDefault).CurrentOperationsTax == CurrentOperationsTax::Current &&
# (assetBook.Status == AssetStatus::NoAcquisition ||
# assetBook.Status == AssetStatus::Open))
# {
# this.AssetBookId = bookIdDefault;
# }
# else
# {
# select firstonly assetBook
# where assetBook.AssetId == this.AssetId &&
# (assetBook.Status == AssetStatus::NoAcquisition ||
# assetBook.Status == AssetStatus::Open)
# join assetBookTable
# where assetBookTable.BookId == assetBook.BookId &&
# assetBookTable.CurrentOperationsTax == CurrentOperationsTax::Current;
#
# if (assetBook)
# {
# this.AssetBookId = assetBook.BookId;
# }
# else
# {
# this.AssetBookId = "";
# }
# }
# if (this.AssetId && this.AssetBookId)
# {
# this.Dimension = this.copyDimension(Dimensions::mergeDimensions(this.Dimension, AssetTable::find(this.AssetId).dimension(this.AssetBookId)));
# }
#}
#
ENDSOURCE
SOURCE #modifyCreateFixedAsset
#///
#/// Modifies the related field values when the CreateFixedAsset field value is changed.
#///
#///
#/// If the CreateFixedAsset field value is checked then the AssetId field value
#/// will be cleared. It will always clear the AssetGroup field value and set the
#/// AssetTransTypePurch field value to be Acquisition.
#///
#public void modifyCreateFixedAsset()
#{
# ;
#
# if (this.CreateFixedAsset == NoYes::Yes)
# {
# this.AssetId = '';
# this.modifyAssetId();
# this.ItemRefType = InventRefType::FixedAsset;
# }
# else
# {
# this.ItemRefType = InventRefType::None;
# }
#
# this.AssetGroup = '';
# this.AssetTransTypePurch = AssetTransTypePurch::Acquisition;
#}
ENDSOURCE
SOURCE #modifyItemDim
#void modifyItemDim(InventDim inventDim,
# fieldId dimFieldId,
# InventDimGroupId dimGroupId
# )
#{;
# if (!dimGroupId)
# return;
#
# if (InventDim::isFieldIdItemDim(dimFieldId))
# {
# this.ExternalItemId = '';
# this.initItemDim(inventDim);
# }
#
#
# if (InventDim::mustUseFieldPurchPriceDisc(dimFieldId,dimGroupId))
# {
# this.SalesPurchLine::resetPriceAgreement();
# this.setPriceDisc(inventDim);
# }
#}
#
ENDSOURCE
SOURCE #ModuleType
#ModuleInventPurchSales moduleType()
#{
# return ModuleInventPurchSales::Purch;
#}
ENDSOURCE
SOURCE #MustBeCovPlanned
#boolean mustBeCovPlanned()
#{
# return (this.RemainPurchPhysical || this.RemainPurchFinancial);
#}
ENDSOURCE
SOURCE #nextLineNum
#LineNum nextLineNum()
#{
# PurchLine purchLine;
#
# return this.SalesPurchLine::nextLineNum(purchLine);
#}
ENDSOURCE
SOURCE #OrderAccount
#CustVendAC orderAccount()
#{;
# return this.VendAccount;
#}
ENDSOURCE
SOURCE #Ordered
#//BP Deviation Documented
#display InventQtyOrdered ordered()
#{
# if (!this.InventTransId)
# return 0;
#
# return (select sum(Qty) from inventTrans
# where inventTrans.InventTransId == this.InventTransId &&
# inventTrans.StatusReceipt == StatusReceipt::Ordered).Qty;
#}
ENDSOURCE
SOURCE #orderedInPurchUnit
#//BP Deviation Documented
#display PurchQtyOrdered orderedInPurchUnit()
#{
# PurchQtyOrdered purchQtyOrdered = this.ordered();
# ;
# if (!purchQtyOrdered)
# return 0;
#
# return this.unitConvertInvent2Purch(purchQtyOrdered);
#}
ENDSOURCE
SOURCE #PriceGroupId
#PriceGroupId priceGroupId()
#{;
# return this.purchTable().PriceGroupId;
#}
ENDSOURCE
SOURCE #projQueryValueInventTransId
#str projQueryValueInventTransId()
#{
# return ProjItemTrans::projQueryValueInventTransId(this.InventTransId, this.ItemId);
#}
#
ENDSOURCE
SOURCE #projTable
#ProjTable projTable(
# ProjId projId = this.ProjId,
# boolean update = false)
#{
# return ProjTable::find(projId, update);
#}
ENDSOURCE
SOURCE #PurchTable
#PurchTable purchTable(boolean update = false)
#{
# return PurchTable::find(this.PurchId, update);
#}
ENDSOURCE
SOURCE #qtyMarked
#///
#/// Returns the amount of thye inventory items marked for the purchase order line.
#///
#///
#/// The amount of inventory marked for the inventory transaction related to the purchase order line.
#///
#
#
#public InventQtyMarked qtyMarked()
#{
# ;
#
# return InventTrans::qtyMarked(this.InventTransId);
#}
ENDSOURCE
SOURCE #qualityOrderStatusDisplay
#///
#/// Retrieves and returns the associated qualtiy orders's status.
#///
#///
#/// Current quality order status.
#///
#
#//BP deviation documented
#display InventTestOrderStatusDisplay qualityOrderStatusDisplay()
#{
# ;
# return InventQualityOrderType::newBuffer(this).orderStatusDisplay();
#}
#
ENDSOURCE
SOURCE #ReceivedInTotal
#//BP Deviation Documented
#display PurchQty receivedInTotal()
#{
# if (!this.InventTransId)
# return 0;
#
# return this.receivedInTotalServer();
#}
ENDSOURCE
SOURCE #ReceivedInTotalPrice
#//BP Deviation Documented
#server display AmountCur receivedInTotalPrice()
#{
# AmountCur receivedAmount;
# InventQty qty;
# ;
#
# receivedAmount = (select sum(LineAmount) from vendInvoiceTrans
# index hint TransIdIdx
# where vendInvoiceTrans.InventTransId == this.InventTransId).LineAmount;
#
# qty = (select sum(Qty) from vendPackingSlipTrans
# index hint TransIdIdx
# where vendPackingSlipTrans.InventTransId == this.InventTransId).Qty;
#
# receivedAmount += (qty * InventTable::findCostPcsPrice(this.ItemId, this.InventDimId));
#
# return receivedAmount;
#}
ENDSOURCE
SOURCE #receivedInTotalServer
#server PurchQty receivedInTotalServer()
#{
# return this.type().receivedInTotal();
#}
ENDSOURCE
SOURCE #receivedInventInTotal
#//BP Deviation Documented
#server display InventQty receivedInventInTotal()
#{
# InventTransIdSum inventTransIdSum;
# InventQty inventQty = 0;
# ;
#
# if (this.InventTransId)
# {
# inventTransIdSum = new InventTransIdSum(this.InventTransId);
#
# inventQty = (inventTransIdSum.physical() + inventTransIdSum.financial());
# }
#
# return inventQty;
#}
ENDSOURCE
SOURCE #referenceWarningTxt
#str referenceWarningTxt()
#{
# SalesLine salesLine;
# PurchLine purchLine;
# ;
#
# if (this.InventRefId)
# {
# switch (this.ItemRefType)
# {
# case InventRefType::Sales:
# salesLine = SalesLine::findInventTransId(this.InventRefTransId);
# if (salesLine)
# {
# return strfmt("@SYS75609", salesLine.SalesId, salesLine.SalesStatus, this.ItemId);
# }
# break;
# case InventRefType::Purch:
# purchLine = PurchLine::findInventTransId(this.InventRefTransId);
# if (purchLine)
# {
# return strfmt("@SYS75607", purchLine.PurchId, purchLine.PurchStatus, this.ItemId);
# }
# break;
#
# }
# }
#
# return '';
#}
ENDSOURCE
SOURCE #Registered
#//BP Deviation Documented
#display InventQtyRegistered registered()
#{
# return (select sum(Qty) from inventTrans
# where inventTrans.InventTransId == this.InventTransId &&
# inventTrans.StatusReceipt == StatusReceipt::Registered).Qty;
#}
ENDSOURCE
SOURCE #registeredInPurchUnit
#//BP Deviation Documented
#display PurchQtyRegistered registeredInPurchUnit()
#{
# PurchQtyRegistered purchQtyRegistered = this.registered();
# ;
# if (!purchQtyRegistered)
# return 0;
#
# return this.unitConvertInvent2Purch(purchQtyRegistered);
#}
ENDSOURCE
SOURCE #reqTrans
#ReqTrans reqTrans(ReqPlanId _reqPlanId = ReqPlanSched::defaultDynamicId(),boolean _forupdate = false)
#{
# ReqTrans reqTrans;
# ;
# reqTrans.selectForUpdate(_forupdate);
#
# select firstonly reqTrans
# index hint RefIdx
# where reqTrans.ReqPlanId == _reqPlanId &&
# reqTrans.RefType == ReqRefType::Purch &&
# reqTrans.RefId == this.PurchId &&
# reqTrans.InventTransId == this.InventTransId;
#
# return reqTrans;
#}
#
ENDSOURCE
SOURCE #ResetInvent
#server void resetInvent(boolean update = true)
#{
# this.PurchQty = 0;
# this.QtyOrdered = 0;
# this.PurchPrice = 0;
# this.LineAmount = 0;
#
# this.RemainPurchPhysical = this.PurchQty;
# this.RemainPurchFinancial = 0;
# this.RemainInventPhysical = this.QtyOrdered;
# // 1877
# this.RemainInventFinancial = 0;
# // 1877
#
# InventMovement::bufferSetTransQtyUnit(this);
# this.setInventReceivedNow();
#
# if (update)
# {
# this.update();
# this.PurchStatus = PurchStatus::Canceled;
# this.updatePurchReqStatus();
# this.doUpdate();
#
# InterCompanyUpdateStatus::synchronize(this);
# }
# else
# {
# this.PurchStatus = PurchStatus::Canceled;
# }
#}
ENDSOURCE
SOURCE #returnActionChanged
#void returnActionChanged(InventDim inventDim = null)
#{
# ReturnActionDefaults returnActionDefaults = ReturnActionDefaults::find(this.moduleType(), this.ReturnActionId);
# ;
#
# if (returnActionDefaults.RecId)
# {
# if (!inventDim)
# {
# inventDim = this.inventDim();
# }
#
# inventDim.mergeUsedDim(this.inventTable().DimGroupId, returnActionDefaults.inventDim());
# this.setInventDimIdFromInventDim(inventDim);
#
#
# if (this.ProjId)
# {
# this.Scrap = returnActionDefaults.Scrap;
#
# if (this.ItemRefType != InventRefType::Sales &&
# this.ItemRefType != InventRefType::InventJournal)
# this.Scrap = true;
# }
# }
#}
#
ENDSOURCE
SOURCE #salesLine
#SalesLine salesLine(boolean _update = false)
#{
# SalesLine salesLine;
# ;
#
# if (this.ItemRefType == InventRefType::Sales && this.InventRefId && this.InventRefTransId)
# {
# salesLine = SalesLine::findInventTransId(this.InventRefTransId, _update);
# }
#
# return salesLine;
#}
#
ENDSOURCE
SOURCE #SalesPurchTable
#SalesPurchTable salesPurchTable()
#{
# return this.purchTable();
#}
ENDSOURCE
SOURCE #setAddress
#void setAddress(Address address)
#{
# if (address.Name)
# this.DeliveryName = address.Name;
#
# this.DeliveryAddress = address.Address;
# this.DeliveryZipCode = address.ZipCode;
# this.DeliveryCountryRegionId = address.CountryRegionId;
# this.DeliveryState = address.State;
# this.DeliveryCounty = address.County;
# this.DeliveryStreet = address.Street;
# this.DeliveryCity = address.City;
# this.AddressRefRecId = address.RecId;
# this.AddressRefTableId = address.TableId;
#
# this.setListCode();
# this.setTaxGroup(TaxSales::custTaxGroup(this.deliveryTerm(), this.TaxGroup, address));
#}
ENDSOURCE
SOURCE #setAddressFromInventDim
#void setAddressFromInventDim(InventDim _inventDim)
#{
# InventLocation inventLocation;
# InventSite inventSite;
# Address address;
# ;
#
# if (_inventDim.RecId
# && this.DeliveryType != TradeLineDlvType::DropShip)
# {
# inventLocation = InventLocation::find(_inventDim.InventLocationId);
# address = Address::find(tablenum(InventLocation), inventLocation.RecId, AddressType::Delivery);
#
# if (address.RecId)
# {
# this.setAddress(address);
# }
# else if(inventLocation.VendAccount)
# {
# this.setAddressFromVendTable(VendTable::find(inventLocation.VendAccount));
# }
# else
# {
# inventSite = InventSite::find(_inventDim.InventSiteId);
# address = Address::find(tablenum(InventSite), inventSite.RecId, AddressType::Delivery);
# if (address.RecId)
# {
# this.setAddress(address);
# }
# else
# {
# this.setAddressFromPurchTable();
# }
# }
# }
#}
#
ENDSOURCE
SOURCE #setAddressFromPurchLine
#void setAddressFromPurchLine(PurchLine purchLine)
#{;
# this.DeliveryAddress = purchLine.DeliveryAddress;
# this.DeliveryName = purchLine.DeliveryName;
# this.DeliveryStreet = purchLine.DeliveryStreet;
# this.DeliveryZipCode = purchLine.DeliveryZipCode;
# this.DeliveryCity = purchLine.DeliveryCity;
# this.DeliveryCounty = purchLine.DeliveryCounty;
# this.DeliveryState = purchLine.DeliveryState;
# this.DeliveryCountryRegionId = purchLine.DeliveryCountryRegionId;
# this.AddressRefRecId = purchLine.RecId;
# this.AddressRefTableId = purchLine.TableId;
#}
ENDSOURCE
SOURCE #setAddressFromPurchTable
#void setAddressFromPurchTable(PurchTable purchTable = this.purchTable())
#{;
# this.DeliveryAddress = purchTable.DeliveryAddress;
# this.DeliveryName = purchTable.DeliveryName;
# this.DeliveryStreet = purchTable.DeliveryStreet;
# this.DeliveryZipCode = purchTable.DeliveryZipCode;
# this.DeliveryCity = purchTable.DeliveryCity;
# this.DeliveryCounty = purchTable.DlvCounty;
# this.DeliveryState = purchTable.DlvState;
# this.DeliveryCountryRegionId = purchTable.DlvCountryRegionId;
# this.AddressRefRecId = purchTable.RecId;
# this.AddressRefTableId = purchTable.TableId;
#}
ENDSOURCE
SOURCE #setAddressFromVendTable
#void setAddressFromVendTable(VendTable _vendTable)
#{;
# this.DeliveryName = _vendTable.Name;
# this.DeliveryAddress = _vendTable.Address;
# this.DeliveryZipCode = _vendTable.ZipCode;
# this.DeliveryCountryRegionId = _vendTable.CountryRegionId;
# this.DeliveryState = _vendTable.State;
# this.DeliveryCounty = _vendTable.County;
# this.DeliveryStreet = _vendTable.Street;
# this.DeliveryCity = _vendTable.City;
# this.AddressRefRecId = _vendTable.RecId;
# this.AddressRefTableId = _vendTable.TableId;
#}
ENDSOURCE
SOURCE #setDepreciationStartDate
#void setDepreciationStartDate(boolean _forceSet = false)
#{
# if (this.AssetId != this.orig().AssetId ||
# this.AssetBookId != this.orig().AssetBookId || _forceSet)
# {
# this.DepreciationStartDate = AssetBook::getDepreciationStartDate(this.AssetId, this.AssetBookId);
# }
#
#}
ENDSOURCE
SOURCE #setInventDimId
#///
#/// Applies the InventDimId parameter to the PurchLine.inventDimId field and defaults values based on the new inventory dimensions.
#///
#///
#/// The InventDimId value that should be applied to the PurchLine.InventDimId field.
#///
#///
#/// The InventDim record buffer related to the InventDimId parameters; optional.
#///
#public void setInventDimId(InventDimId _inventDimId, InventDim _inventDim = InventDim::find(_inventDimId))
#{
# InventDim currentInventDim = this.InventDimId == _inventDimId ? _inventDim : this.inventDim();
# ;
# this.InventDimId = _inventDimId;
# this.linkInventDim2Dimension(_inventDim, currentInventDim);
#}
#
ENDSOURCE
SOURCE #setInventDimIdFromInventDim
#///
#/// Finds or create an InventDimId for the InventDim parameter and applies the found InventDimId to the PurchLine.inventDimId field.
#///
#///
#/// An InventDim record buffer that should be referenced by the current PurchLine record buffer.
#///
#public void setInventDimIdFromInventDim(InventDim _inventDim)
#{
# InventDim inventDim;
# ;
# inventDim = InventDim::findOrCreate(_inventDim);
# this.setInventDimId(inventDim.InventDimId, inventDim);
#}
ENDSOURCE
SOURCE #SetInventReceivedNow
#void setInventReceivedNow()
#{
# this.InventReceivedNow = UnitConvert::qty(this.PurchReceivedNow,
# this.PurchUnit,
# this.inventTable().inventUnitId(),
# this.ItemId);
#}
ENDSOURCE
SOURCE #setListCode
#void setListCode()
#{;
#// this.listcode = EUSalesList::resolveListCode(this.deliveryCountry, this.payer().country);
#}
ENDSOURCE
SOURCE #SetPriceAgreement
#server void setPriceAgreement(InventDim inventDim)
#{;
# this.SalesPurchLine::setPriceAgreement(inventDim);
#}
ENDSOURCE
SOURCE #SetPriceDisc
#server void setPriceDisc(InventDim inventDim)
#{
# this.setPriceAgreement(inventDim);
# this.LineAmount = this.calcLineAmountForced();
#}
ENDSOURCE
SOURCE #SetPurchStatus
#void setPurchStatus()
#{
# PurchLineType purchLineType;
# ;
#
# purchLineType = this.type();
# purchLineType.setPurchStatus(this);
#}
ENDSOURCE
SOURCE #setTaxGroup
#void setTaxGroup(TaxGroup _taxGroup)
#{
# PurchLineType purchLineType;
# ;
#
# purchLineType = this.type();
# purchLineType.setTaxGroup(_taxGroup);
#}
ENDSOURCE
SOURCE #taxByLine
#real taxByLine()
#{
# TaxTrans taxTrans;
# ;
# if(this.InventTransId)
# {
# select sum(TaxAmount) from taxTrans
# where taxTrans.InventTransId == this.InventTransId;
# }
#
# return taxTrans.TaxAmount;
#}
#
#
ENDSOURCE
SOURCE #taxDate
#TransDate taxDate(TransDate transDate)
#{
# return TaxParameters::find().TaxCalculationDateType == TaxCalculationDateType::DeliveryDate ? this.deliveryDate(transDate) : transDate;
#}
ENDSOURCE
SOURCE #taxPcsPrice
#PriceCur taxPcsPrice(TransDate transDate = systemdateget())
#{
# return this.SalesPurchLine::taxPcsPrice(transDate);
#}
ENDSOURCE
SOURCE #Type
#PurchLineType type()
#{
# return PurchLineType::construct(this);
#}
ENDSOURCE
SOURCE #unitConvertInvent2Purch
#PurchQty unitConvertInvent2Purch(InventQty _inventQty)
#{
# return UnitConvert::qty(_inventQty,
# this.inventTable().inventUnitId(),
# this.PurchUnit,
# this.ItemId);
#}
#
ENDSOURCE
SOURCE #Update
#// Israel-Localisation-Prodware-ImportFolder-Begin
#//public void update(boolean dropInvent = false)
#public void update(boolean dropInvent = false, boolean _BPLskipCheckQualityOrder = false)
#// Israel-Localisation-Prodware-ImportFolder-End
#{
# PurchLineType purchLineType;
# ;
# // Israel-Localisation-Prodware-ImportFolder-Begin
# if (!_BPLskipCheckQualityOrder)
# {
# // Israel-Localisation-Prodware-ImportFolder-End
# if (!this.allowUpdateWithQualityOrder())
# {
# throw error("@SYS113930");
# }
# // Israel-Localisation-Prodware-ImportFolder-Begin
# }
# // Israel-Localisation-Prodware-ImportFolder-End
# purchLineType = this.type();
# purchLineType.update(dropInvent);
#}
ENDSOURCE
SOURCE #updateBlanketOrder
#server void updateBlanketOrder(PurchQty _purchQty)
#{
# PurchLine purchLineBlanketOrder;
# UnitId inventUnitId;
# ;
# if (this.BlanketRefTransId && _purchQty)
# {
# ttsbegin;
#
# purchLineBlanketOrder = PurchLine::findInventTransId(this.BlanketRefTransId, true);
# if (purchLineBlanketOrder.RecId && purchLineBlanketOrder.PurchaseType == PurchaseType::Blanket)
# {
# purchLineBlanketOrder.RemainPurchPhysical += _purchQty;
# inventUnitId = purchLineBlanketOrder.inventTable().inventUnitId();
# if (purchLineBlanketOrder.PurchUnit != inventUnitId)
# {
# purchLineBlanketOrder.RemainInventPhysical += UnitConvert::qty(_purchQty,
# purchLineBlanketOrder.PurchUnit,
# inventUnitId,
# purchLineBlanketOrder.ItemId);
#
#
# }
# else
# {
# purchLineBlanketOrder.RemainInventPhysical += _purchQty;
# }
#
# purchLineBlanketOrder.update();
# }
# ttscommit;
# }
#}
#
ENDSOURCE
SOURCE #updatePurchReqStatus
#void updatePurchReqStatus()
#{
# #OCCRetryCount
# PurchReqLine purchReqLine;
# PurchReqStatus purchReqStatus;
# #define.EmptyString('')
# ;
#
# try
# {
# if (this.PurchReqLineRefId)
# {
# switch (this.PurchStatus)
# {
# case PurchStatus::Canceled :
# purchReqStatus = PurchReqStatus::ApprovedCancelled;
# break;
# case PurchStatus::Invoiced :
# purchReqStatus = PurchReqStatus::ApprovedInvoiced;
# break;
# case PurchStatus::Received :
# purchReqStatus = PurchReqStatus::ApprovedReceived;
# break;
# default :
# purchReqStatus = PurchReqStatus::ApprovedOrdered;
# break;
# }
#
# ttsbegin;
#
# select forupdate firstonly purchReqLine
# where purchReqLine.LineRefId == this.PurchReqLineRefId;
#
# if (purchReqLine)
# {
# purchReqLine.updatePurchReqStatus(purchReqStatus);
# }
#
# ttscommit;
# }
# }
# catch(Exception::Deadlock)
# {
# retry;
# }
# catch(Exception::UpdateConflict)
# {
# if (appl.ttsLevel() == 0)
# {
# if (xSession::currentRetryCount() >= #RetryNum)
# {
# throw Exception::UpdateConflictNotRecovered;
# }
# else
# {
# retry;
# }
# }
# else
# {
# throw Exception::UpdateConflict;
# }
# }
#}
ENDSOURCE
SOURCE #ValidateDelete
#boolean validateDelete(boolean _interCompanyForce = false)
#{
# boolean ok = true;
# PurchLineType purchLineType;
# ;
#
# ok = super();
#
# if (ok)
# {
# purchLineType = this.type();
# ok = purchLineType.validateDelete(_interCompanyForce);
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #validateField
#public boolean validateField(fieldId fieldId)
#{
# boolean ok;
# PurchLineType purchLineType;
# ;
# if(!this.AddressMap::validatePostalCode(fieldId))
# {
# return false;
# }
#
# switch(fieldId)
# {
# case fieldnum(PurchLine, InventTransId):
# if (this.PurchaseType == PurchaseType::Journal ||
# this.PurchaseType == PurchaseType::Blanket)
#// No inventory transactions so no need for consistency check to report this as error
# return true;
# break;
# }
#
# ok = super(fieldId);
#
# if (ok)
# {
# purchLineType = this.type();
# ok = purchLineType.validateField(fieldId);
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #validateModifyItemDim
#public boolean validateModifyItemDim(InventDim _inventDim,
# fieldId _dimFieldId,
# InventDimGroupId _dimGroupId)
#{
# ;
# return this.type().validateModifyItemDim(_inventDim,_dimFieldId,_dimGroupId);
#}
ENDSOURCE
SOURCE #ValidateWrite
#boolean validateWrite()
#{
# boolean ok = true;
# PurchLineType purchLineType;
# container taxCheck;
# AmountMST totalAmt;
# AmountMST taxAmount;
# ;
#
# ok = super();
#
# if (ok)
# {
# purchLineType = this.type();
# ok = purchLineType.validateWrite();
# }
#
# if (ok)
# {
# taxAmount = this.taxByLine();
# totalAmt = this.LineAmount + taxAmount;
# taxCheck = [totalAmt, this.Tax1099Amount, this.Tax1099StateAmount, this.Tax1099Box, this.Tax1099State];
# ok = Tax1099ElectronicCheck::tax1099EntryValidation(taxCheck);
# }
#
# if (ok)
# {
# ok = appl.dimensionSetValidation().checkDimension(this, fieldnum(PurchLine, Dimension), true, false, true);
# }
#
# return ok;
#}
#
ENDSOURCE
SOURCE #VariencePrice
#//BP Deviation Documented
#server display AmountCur variencePrice()
#{
# return this.calcLineAmount(this.varienceQty());
#}
ENDSOURCE
SOURCE #VarienceQty
#//BP Deviation Documented
#server display PurchQty varienceQty()
#{
# return this.receivedInTotal() - this.PurchQty;
#}
ENDSOURCE
SOURCE #VarienceQtyPct
#//BP Deviation Documented
#server display Percent varienceQtyPct()
#{
# if (this.PurchQty)
# {
# return (this.receivedInTotal() * 100) / this.PurchQty;
# }
#
# return 0;
#}
ENDSOURCE
SOURCE #vendTable_OrderAccount
#VendTable vendTable_OrderAccount()
#{
# return this.purchTable().vendTable_OrderAccount();
#}
ENDSOURCE
SOURCE #warningForReference
#boolean warningForReference()
#{
# str warningTxt;
# ;
#
# if (this.InventRefId)
# {
# warningTxt = this.referenceWarningTxt();
# if (warningTxt)
# {
# return Box::yesNo(warningTxt+'\n\n'+strfmt("@SYS75610"),DialogButton::Yes) == DialogButton::Yes;
# }
# }
#
# return true;
#}
ENDSOURCE
SOURCE #exist
#client server
#static boolean exist(PurchId purchId,
# LineNum lineNum = naReal())
#{
#
# if (purchId)
# {
# if (lineNum == naReal())
# return (select firstonly RecId from purchLine
# index PurchLineIdx
# where purchLine.PurchId == purchId
# ).RecId != 0;
#
# return (select firstonly RecId from purchLine
# index PurchLineIdx
# where purchLine.PurchId == purchId &&
# purchLine.LineNum == lineNum
# ).RecId != 0;
# }
#
# return false;
#}
ENDSOURCE
SOURCE #existDifferentCurrency
#server static boolean existDifferentCurrency(PurchId purchId, CurrencyCode currencyCode)
#{
# if (!purchId || !currencyCode)
# return false;
#
# return (select firstonly RecId from purchLine
# index hint PurchLineIdx
# where purchLine.PurchId == purchId &&
# purchLine.CurrencyCode != currencyCode).RecId != 0;
#}
ENDSOURCE
SOURCE #find
#client server
#static PurchLine find(PurchId purchId,
# LineNum lineNum = naReal(),
# boolean update = false)
#{
# PurchLine purchLine;
# ;
#
# if (purchId)
# {
# purchLine.selectForUpdate(update);
#
# if (lineNum == naReal())
# {
# select firstonly purchLine
# index hint PurchLineIdx
# where purchLine.PurchId == purchId;
# }
# else
# {
# select firstonly purchLine
# index hint PurchLineIdx
# where purchLine.PurchId == purchId &&
# purchLine.LineNum == lineNum;
# }
# }
#
# return purchLine;
#}
ENDSOURCE
SOURCE #findInventTransId
#static PurchLine findInventTransId(InventTransId _inventTransId,
# boolean _update = false)
#{
# PurchLine purchLine;
# ;
#
# if (_inventTransId)
# {
# purchLine.selectForUpdate(_update);
#
# select firstonly purchLine
# index hint TransIdIdx
# where purchLine.InventTransId == _inventTransId;
# }
#
# return purchLine;
#}
ENDSOURCE
SOURCE #findRecId
#static PurchLine findRecId(recId _recId,
# boolean update = false)
#{
# PurchLine purchLine;
# ;
#
# purchLine.selectForUpdate(update);
#
# select firstonly purchLine
# index hint RecId
# where purchLine.RecId == _recId;
#
# return purchLine;
#}
ENDSOURCE
SOURCE #highestPurchStatus
#static PurchStatus highestPurchStatus(PurchId purchId)
#{
# PurchLine purchLine;
# ;
#
# select maxof(PurchStatus) from purchLine
# index hint PurchStatusIdx
# where purchLine.PurchId == purchId
# && purchLine.PurchStatus > PurchStatus::None;
#
# if (purchLine)
# {
# return purchLine.PurchStatus;
# }
#
# return PurchStatus::Backorder;
#}
ENDSOURCE
SOURCE #isTaxExist
#static boolean isTaxExist(PurchIdBase _purchID, LineNum _lineNum, TaxCode _taxCode)
#{
# PurchLine purchLineloc;
# TaxOnItem taxOnItem;
# boolean taxExist = false;
# ;
#
# if (_purchID && _lineNum)
# {
# select TaxItemGroup, PurchId, LineNum
# from purchLineloc
# where purchLineloc.PurchId == _purchID
# && purchLineloc.LineNum == _lineNum;
# }
#
# if (purchLineloc)
# {
# while select TaxCode, TaxItemGroup
# from taxOnItem
# where taxOnItem.TaxItemGroup == purchLineloc.TaxItemGroup
# && taxExist == false
# {
# if (taxOnItem.TaxCode == _taxCode)
# {
# taxExist = true;
# }
# }
# }
#
# return taxExist;
#}
ENDSOURCE
SOURCE #isTaxUnrealized
#static boolean isTaxUnrealized(PurchIdBase _purchID)
#{
# PurchLine purchLineloc;
# TaxGroupData taxGroupData;
# boolean taxUnrealized = false;
# ;
#
# while select TaxGroup, PurchId
# from purchLineloc
# where purchLineloc.PurchId == _purchID
# {
# while select TaxCode, TaxGroup
# from taxGroupData
# where taxGroupData.TaxGroup == purchLineloc.TaxGroup
# && taxUnrealized == false
# {
# if (TaxTable::find(taxGroupData.TaxCode).UnrealizedTax == true)
# {
# taxUnrealized = true;
# }
# }
# }
#
# return taxUnrealized;
#}
ENDSOURCE
SOURCE #lastLineNum
#static LineNum lastLineNum(PurchId purchId)
#{
# return (select maxof(LineNum) from purchLine
# index hint PurchLineIdx
# where purchLine.PurchId == purchId).LineNum;
#}
ENDSOURCE
SOURCE #lowestPurchStatus
#static PurchStatus lowestPurchStatus(PurchId purchId)
#{
# PurchLine purchLine;
# ;
#
# select minof(PurchStatus) from purchLine
# index hint PurchStatusIdx
# where purchLine.PurchId == purchId
# && purchLine.PurchStatus > PurchStatus::None;
#
# if (purchLine)
# {
# return purchLine.PurchStatus;
# }
#
# return PurchStatus::Backorder;
#}
ENDSOURCE
SOURCE #modifyPurchQty
#server static void modifyPurchQty(PurchLine _purchLine,
# InventDim _inventDim)
#{;
# if (!_purchLine.interCompanyIsBeingUpdated())
# {
# InventMovement::setMinMaxQty(_purchLine);
#
# _purchLine.SalesPurchLine::resetPriceAgreement();
# _purchLine.initPurchQty();
# _purchLine.setPriceDisc(_inventDim);
#
# InventMovement::bufferSetTransQtyUnit(_purchLine);
#
# _purchLine.setInventReceivedNow();
#
# if (_purchLine.ProjId)
# {
# // Recalculate the project sales price
# _purchLine.initFromProjTable(_purchLine.projTable(), true);
# }
# }
# else
# {
# _purchLine.PurchQty = _purchLine.orig().PurchQty;
# }
#}
ENDSOURCE
ENDMETHODS
ENDTABLE
en-us
Purchase lines
@SYS9664
0
0
he
שורות רכישה
@SYS9664
0
0
en-us
The PurchLine table contains all purchase order lines regardless whether they have been posted or not.
{locked}
@SYS124476
0
0
he
The PurchLine table contains all purchase order lines regardless whether they have been posted or not.
{locked}
@SYS124476
0
0
en-us
Purchase number that the line is attached to
@SYS13121
0
0
he
מספר הרכישה שאליה מצורפת השורה
@SYS13121
0
0
en-us
Used for sorting (COUNTER)
@SYS4691
0
0
he
משמש למיון (COUNTER)
@SYS4691
0
0
en-us
Item number included in the line.
@SYS2882
0
0
he
מספר הפריט הכלול בשורה.
@SYS2882
0
0
en-us
Line status
@SYS7161
0
0
he
מצב שורה
@SYS7161
0
0
en-us
Line status with regard to delivery and invoicing
@SYS6391
0
0
he
מצב השורה בכל הקשור למשלוח והפקת חשבונית
@SYS6391
0
0
en-us
Ledger account for posting lines in special receipt account.
@SYS7102
0
0
he
חשבון ספר ראשי עבור רישום שורות בחשבון קבלות מיוחד.
@SYS7102
0
0
en-us
Line delivery date
@SYS3828
0
0
he
תאריך מסירה של שורה
@SYS3828
0
0
en-us
Line description
@SYS2102
0
0
he
תיאור שורה
@SYS2102
0
0
en-us
Name of sales tax group.
Tax = Sales tax (VAT)
@SYS21920
0
0
he
שם קבוצת המע"מ.
Tax = Sales tax (VAT)
@SYS21920
0
0
en-us
Quantity ordered in the inventory unit.
@SYS8090
0
0
he
הכמות שהוזמנה ביחידת המלאי.
@SYS8090
0
0
en-us
Receive now
@SYS1743
0
0
he
קבל כעת
@SYS1743
0
0
en-us
Quantity received now in purchase units
@SYS69028
0
0
he
הכמות שהתקבלה כעת ביחידות רכישה
@SYS69028
0
0
en-us
Deliver remainder
@SYS22556
0
0
he
שלח יתרה
@SYS22556
0
0
en-us
Quantity that has not yet been packing slip received.
@SYS27457
0
0
he
כמות שטרם התקבלה בתעודת משלוח.
@SYS27457
0
0
en-us
Invoice remainder
Used for purch and sales to denote the quantity that has been packing slip delivered but not yet invoice updated.
@SYS22380
0
0
he
יתרת חשבונית
Used for purch and sales to denote the quantity that has been packing slip delivered but not yet invoice updated.
@SYS22380
0
0
en-us
Quantity that has been packing slip received but not yet invoice updated.
@SYS27459
0
0
he
כמות שהתקבלה בתעודת משלוח אך טרם עודכנה בחשבונית.
@SYS27459
0
0
en-us
Number of units the quantity applies to.
@SYS3472
0
0
he
מספר היחידות שהכמות חלה עליהן.
@SYS3472
0
0
en-us
Unit price
Replaces price each
@SYS11770
0
0
he
מחיר יחידה
Replaces price each
@SYS11770
0
0
en-us
Purchase price per price unit
@SYS5369
0
0
he
מחיר רכישה לכל יחידת מחיר
@SYS5369
0
0
en-us
Currency the line is invoiced in
@SYS6734
0
0
he
המטבע שבו מחויבת השורה
@SYS6734
0
0
en-us
Confirmed
@SYS8985
0
0
he
אושר
@SYS8985
0
0
en-us
Date for confirmed delivery.
@SYS931
0
0
he
תאריך עבור משלוח מאושר.
@SYS931
0
0
en-us
Group
@SYS3815
0
0
he
קבוצה
@SYS3815
0
0
en-us
Vendor group
@SYS9253
0
0
he
קבוצת ספקים
@SYS9253
0
0
en-us
Fixed misc. charges on purchase price, which are independent of quantity.
@SYS16914
0
0
he
חיובים שונים קבועים על מחיר רכישה, שאינם תלויים בכמות.
@SYS16914
0
0
en-us
Quantity now being received in inventory unit
@SYS12421
0
0
he
הכמות המתקבלת כעת ביחידת המלאי
@SYS12421
0
0
en-us
Type
@SYS1201
0
0
he
סוג
@SYS1201
0
0
en-us
Purchase type
@SYS17049
0
0
he
סוג רכישה
@SYS17049
0
0
en-us
What is the purchase coverage planned for?
@SYS17021
0
0
he
עבור מה תוכנן עיתוד הרכישה?
@SYS17021
0
0
en-us
Quantity for which a packing slip has not yet been received in the inventory unit
@SYS11699
0
0
he
כמות שעבורה טרם התקבלה תעודת משלוח ביחידת המלאי
@SYS11699
0
0
en-us
Scrap
@SYS24894
0
0
he
גרט
@SYS24894
0
0
en-us
No inventory transactions will be created for the line.
@SYS29137
0
0
he
לא תתבצע יצירה של תנועות מלאי עבור השורה.
@SYS29137
0
0
en-us
Item sales tax group project invoicing.
@SYS67873
0
0
he
קבוצת מע"מ לפריט להפקת חשבונית לפרוייקט.
@SYS67873
0
0
en-us
Sales tax group project invoicing.
@SYS67872
0
0
he
קבוצת מע"מ להפקת חשבונית לפרוייקט.
@SYS67872
0
0
en-us
Sales currency
@SYS56480
0
0
he
מטבע מכירה
@SYS56480
0
0
en-us
Currency in which the project is invoiced.
@SYS20788
0
0
he
המטבע שבו מופקת חשבונית עבור הפרוייקט.
@SYS20788
0
0
en-us
Delivery address
@SYS7924
0
0
he
כתובת משלוח
@SYS7924
0
0
en-us
Address where the items are to be delivered.
@SYS27762
0
0
he
כתובת שאליה על הפריטים להישלח.
@SYS27762
0
0
en-us
Delivery name
@SYS22058
0
0
he
שם משלוח
@SYS22058
0
0
en-us
Name or company name of delivery address.
@SYS17217
0
0
he
שם או שם החברה של כתובת המסירה.
@SYS17217
0
0
en-us
Name
@SYS7399
0
0
he
שם
@SYS7399
0
0
en-us
ZIP/postal Code in delivery address.
@SYS17884
0
0
he
מיקוד עבור כתובת המסירה.
@SYS17884
0
0
en-us
County of delivery address.
@SYS17885
0
0
he
מחוז כתובת המסירה.
@SYS17885
0
0
en-us
State to deliver to
@SYS27941
0
0
he
מדינה שאליה יש לבצע את המשלוח
@SYS27941
0
0
en-us
Country/region of delivery address
@SYS17886
0
0
he
מדינה/אזור של כתובת המסירה
@SYS17886
0
0
en-us
New fixed asset?
@SYS115671
0
0
he
רכוש קבוע חדש?
@SYS115671
0
0
en-us
Select this field if a new fixed asset should be created for the purchase line when a packing slip or invoice is posted
@SYS115672
0
0
he
בחר שדה זה אם יש ליצור רכוש קבוע חדש עבור שורת הרכישה בעת רישום של תעודת משלוח או חשבונית
@SYS115672
0
0
en-us
Assigned
SPLImportFolder
@BPL93
0
0
he
הועמס
SPLImportFolder
@BPL93
0
0
en-us
Charge item
@BPL125
0
0
he
פריטי חיוב
@BPL125
0
0
en-us
Selection
@SYS7678
0
0
he
בחירה
@SYS7678
0
0
en-us
Closed To Import
@BPL68
0
0
he
סגור ליבוא
@BPL68
0
0
en-us
Address
@SYS9362
0
0
he
כתובת
@SYS9362
0
0
en-us
Address selection
@SYS88672
0
0
he
בחירת כתובת
@SYS88672
0
0
en-us
Address Reference
@SYS88679
0
0
he
הפניית כתובת
@SYS88679
0
0
en-us
Attention
@SYS1593
0
0
he
שים לב
@SYS1593
0
0
en-us
Bar code
@SYS24296
0
0
he
ברקוד
@SYS24296
0
0
en-us
Blanket order
Purch
@SYS59511
0
0
he
הזמנת מסגרת
Purch
@SYS59511
0
0
en-us
Block
@SYS28075
0
0
he
חסום
@SYS28075
0
0
en-us
BOM/route
@SYS22227
0
0
he
BOM/נתיב
@SYS22227
0
0
en-us
BUS fields Israel
@BPL141
0
0
he
שדות ישראל BUS
@BPL141
0
0
en-us
Import portfolio
@BPL94
0
0
he
תיק יבוא
@BPL94
0
0
en-us
Delivery
@SYS4508
0
0
he
משלוח
@SYS4508
0
0
en-us
Delivery reference
@SYS78577
0
0
he
הפניית מסירה
@SYS78577
0
0
en-us
Dimensions
@SYS5951
0
0
he
ממדים
@SYS5951
0
0
en-us
Discount
@SYS11829
0
0
he
הנחה
@SYS11829
0
0
en-us
Fixed assets
@SYS12578
0
0
he
רכוש קבוע
@SYS12578
0
0
en-us
Foreign trade
@SYS27650
0
0
he
סחר חוץ
@SYS27650
0
0
en-us
1099 fields
@SYS24226
0
0
he
שדות 1099
@SYS24226
0
0
en-us
GST/HST
CA6
@SYP2308
0
0
he
GST/HST
CA6
@SYP2308
0
0
en-us
Identification
@SYS5711
0
0
he
זיהוי
@SYS5711
0
0
en-us
Intercompany
Intercompany used in the sense 'intra-group'.
@SYS74106
0
0
he
בין-חברתי
Intercompany used in the sense 'intra-group'.
@SYS74106
0
0
en-us
References
@SYS14018
0
0
he
אסמכתאות
@SYS14018
0
0
en-us
Original return action
Intercompany
@SYS95177
0
0
he
פעולת החזרה מקורית
Intercompany
@SYS95177
0
0
en-us
Intrastat
@SYS6530
0
0
he
סטטיסטיקה פנימית
@SYS6530
0
0
en-us
Inventory
@SYS981
0
0
he
מלאי
@SYS981
0
0
en-us
Item reference
@SYS24659
0
0
he
אסמכתת פריט
@SYS24659
0
0
en-us
Planned order
@SYS8597
0
0
he
הזמנה מתוכננת
@SYS8597
0
0
en-us
Posting
@SYS5943
0
0
he
רישום
@SYS5943
0
0
en-us
Price
@SYS11865
0
0
he
מחיר
@SYS11865
0
0
en-us
Cost price
@SYS13134
0
0
he
מחיר עלות
@SYS13134
0
0
en-us
Project identification
@SYS89920
0
0
he
זיהוי פרוייקט
@SYS89920
0
0
en-us
Sales price
@SYS5755
0
0
he
מחיר מכירה
@SYS5755
0
0
en-us
Project - sales tax
@SYS67871
0
0
he
פרוייקט - מע"מ
@SYS67871
0
0
en-us
Transaction
@SYS15191
0
0
he
תנועה
@SYS15191
0
0
en-us
Purchase quantity
@SYS11187
0
0
he
כמות רכישה
@SYS11187
0
0
en-us
Purchase Requisition
@SYS94925
0
0
he
דרישת רכש
@SYS94925
0
0
en-us
Requisition reference
@SYS110285
0
0
he
אסמכתת דרישה
@SYS110285
0
0
en-us
Requisitioner
@SYS108788
0
0
he
דורש רכש
@SYS108788
0
0
en-us
Returned order
@SYS24700
0
0
he
הזמנה שהוחזרה
@SYS24700
0
0
en-us
RFID tagging
@SYS90171
0
0
he
תיוג RFID
@SYS90171
0
0
en-us
Sales tax
Tax = Sales tax
@SYS5878
0
0
he
מע"מ
Tax = Sales tax
@SYS5878
0
0
en-us
Status
For Forms/tutorial_WebServicesDemo
@SYS25587
0
0
he
מצב
For Forms/tutorial_WebServicesDemo
@SYS25587
0
0
en-us
Table group
@SYS21958
0
0
he
קבוצת טבלאות
@SYS21958
0
0
en-us
Purchase order %1 - Item %2 : Delivery dates are not correct.
@BPL28
0
0
he
הזמנת רכש %1 - פריט %2 : תאריכי אספקה שגויים.
@BPL28
0
0
en-us
Activity does not exist.
@SYS50966
0
0
he
פעילות אינה קיימת.
@SYS50966
0
0
en-us
%1 is not associated to project %2
@SYS105858
0
0
he
%1 אינו משויך לפרוייקט %2
@SYS105858
0
0
en-us
Currency code %1 does not exist.
@SYS1458
0
0
he
קוד המטבע %1 אינו קיים.
@SYS1458
0
0
en-us
Discrepancy between currency code in the purchase line and the purchase header.
@SYS20793
0
0
he
אי התאמה של קוד מטבע בין שורת הרכישה לבין כותרת הרכישה.
@SYS20793
0
0
en-us
Delivery reference information must be the same for each delivery address.
@SYS78581
0
0
he
על המידע של הפניית המסירה להיות זהה עבור כל כתובת מסירה.
@SYS78581
0
0
en-us
Item number cannot be changed when item transactions have been generated. Delete line and create a new one with the new item number.
@SYS19376
0
0
he
לא ניתן לשנות את מספר הפריט לאחר שנוצרו תנועות הפריט. מחק את השורה וצור אחת חדשה עם מספר הפריט החדש.
@SYS19376
0
0
en-us
Item %1 is blocked from intercompany use.
Intercompany used in the sense 'intra-group'.
@SYS74812
0
0
he
הפריט %1 חסום עבור שימוש בין-חברתי.
Intercompany used in the sense 'intra-group'.
@SYS74812
0
0
en-us
Product model number %1 is not enabled for item: %2.
@SYS41402
0
0
he
מודל מוצר מספר %1 אינו זמין עבור פריט: %2.
@SYS41402
0
0
en-us
Overdelivery must be greater than zero.
@SYS26776
0
0
he
על משלוח יתר להיות גדול מאפס.
@SYS26776
0
0
en-us
Only categories of type %1 may be specified.
@SYS56468
0
0
he
ניתן לציין קטגוריות מסוג %1 בלבד.
@SYS56468
0
0
en-us
Quantity must be specified in both the purchase unit and the inventory unit in purchase line %1.
@SYS18441
0
0
he
יש לציין כמות הן ביחידת הרכישה והן ביחידת המלאי בשורת הרכישה %1.
@SYS18441
0
0
en-us
Quantity must have same sign in both the purchase unit and the inventory unit in purchase line %1.
@SYS18442
0
0
he
על סימן הכמות ביחידת הרכישה להיות זהה לסימן הכמות ביחידת המלאי בשורת הרכישה %1.
@SYS18442
0
0
en-us
Purchase type in purchase line and purchase header is inconsistent.
@SYS17095
0
0
he
סוג הרכישה בשורת הרכישה ובכותרת הרכישה אינו עקבי.
@SYS17095
0
0
en-us
Unit conversion from %1 to %2 does not exist.
@SYS28690
0
0
he
המרת יחידה מ- %1 ל- %2 אינה קיימת.
@SYS28690
0
0
en-us
Unit cannot be changed because the purchase line is partly delivered.
@SYS81896
0
0
he
אין אפשרות לשנות יחידה משום ששורת הרכישה נמסרה באופן חלקי.
@SYS81896
0
0
en-us
Unit cannot be changed on a release order.
@SYS83498
0
0
he
אין אפשרות לשנות יחידה בהזמנת שחרור.
@SYS83498
0
0
en-us
Blanket order line has release order lines attached
@SYS112340
0
0
he
לשורת הזמנת מסגרת מצורפות שורות הזמנה ששוחררה
@SYS112340
0
0
en-us
Item sales tax group %1 does not exist.
Tax = Sales tax (VAT)
@SYS21973
0
0
he
קבוצת המע"מ %1 לפריט אינה קיימת.
Tax = Sales tax (VAT)
@SYS21973
0
0
en-us
Underdelivery must be less than 100 percent.
@SYS26778
0
0
he
על משלוח חסר להיות קטן מ- 100 אחוז.
@SYS26778
0
0
en-us
Update has been canceled.
@SYS18447
0
0
he
העדכון בוטל.
@SYS18447
0
0
en-us
Part of the quantity on the purchase order has been received
@SYS89798
0
0
he
התקבל חלק מהכמות בהזמנת הרכש
@SYS89798
0
0
en-us
All quantities on the purchase order have been received
@SYS89797
0
0
he
התקבלו כל הכמויות בהזמנת הרכש
@SYS89797
0
0
en-us
The purchase order has not been received yet
@SYS99500
0
0
he
הזמנת הרכש טרם התקבלה
@SYS99500
0
0
en-us
BOM %1
@SYS25825
0
0
he
BOM %1
@SYS25825
0
0
en-us
Company: %1
Intercompany
@SYS93821
0
0
he
חברה: %1
Intercompany
@SYS93821
0
0
en-us
The intercompany sales order is being updated, and therefore you cannot add/change/delete lines.
Intercompany
@SYS93839
0
0
he
מתבצע עדכון של הזמנת המכירה הבין-חברתית ולכן אין באפשרותך להוסיף/לשנות/למחוק שורות.
Intercompany
@SYS93839
0
0
en-us
VAT number is not present. Reverse charge transactions needs a VAT number.
@SYS125406
0
0
he
לא קיים מספר מע"מ. עבור תנועות היפוך חיובים נדרש מספר מע"מ.
@SYS125406
0
0
en-us
Sales order %1 with status %2 is attached to line %3.
@SYS75609
0
0
he
הזמנת מכירה %1 עם מצב %2 מצורפת לשורה %3.
@SYS75609
0
0
en-us
Purchase order %1 with status %2 is attached to line %3.
@SYS75607
0
0
he
הזמנת הרכש %1 עם מצב %2 מצורפת לשורה %3.
@SYS75607
0
0
en-us
No update allowed : quality orders related are still opened.
@SYS113930
0
0
he
עדכונים אינם מותרים: הזמנות איכות קשורות עדיין פתוחות.
@SYS113930
0
0
en-us
Delete purchase line?
@SYS75610
0
0
he
האם למחוק שורת רכישה?
@SYS75610
0
0
***Element: DBT
; Microsoft Dynamics AX Table : VendInvoiceTrans unloaded
; --------------------------------------------------------------------------------
TABLEVERSION 1
TABLE #VendInvoiceTrans
Id 492
PROPERTIES
Name #VendInvoiceTrans
Label #@SYS27199
SearchLinkRefName #EPVendInvoiceJournalInfo
TitleField1 #ItemId
TitleField2 #Name
ConfigurationKey #LedgerBasic
SecurityKey #VendTables
MaxAccessMode #Edit
CacheLookup #Found
CreateRecIdIndex #Yes
TableGroup #Transaction
PrimaryIndex #RecId
ClusterIndex #RecId
DeveloperDocumentation #@SYS126046
ENDPROPERTIES
FIELDS
FIELD #InvoiceId
Id 1
STRING
PROPERTIES
Name #InvoiceId
Mandatory #Yes
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#VendInvoiceId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #InvoiceDate
Id 2
DATE
PROPERTIES
Name #InvoiceDate
Mandatory #Yes
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#TransDate
#
ENDARRAY
ENDPROPERTIES
FIELD #LineNum
Id 3
REAL
PROPERTIES
Name #LineNum
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#LineNum
#
ENDARRAY
ENDPROPERTIES
FIELD #InventTransId
Id 4
STRING
PROPERTIES
Name #InventTransId
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#InventTransId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #DestCountryRegionId
Id 5
STRING
PROPERTIES
Name #DestCountryRegionId
Label #@SYS17952
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#AddressCountryRegionId
#
ENDARRAY
ENDPROPERTIES
FIELD #ItemId
Id 6
STRING
PROPERTIES
Name #ItemId
Label #@SYS7407
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#ItemId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #ExternalItemId
Id 7
STRING
PROPERTIES
Name #ExternalItemId
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#PurchExternalItemId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #Name
Id 8
STRING
PROPERTIES
Name #Name
Label #@SYS6303
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#ItemFreeTxt
#
ENDARRAY
StringSize #1000
ENDPROPERTIES
FIELD #TaxGroup
Id 9
STRING
PROPERTIES
Name #TaxGroup
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#TaxGroup
#
ENDARRAY
ENDPROPERTIES
FIELD #CurrencyCode
Id 10
STRING
PROPERTIES
Name #CurrencyCode
Mandatory #Yes
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#VendCurrencyCode
#
ENDARRAY
StringSize #3
ENDPROPERTIES
FIELD #PriceUnit
Id 11
REAL
PROPERTIES
Name #PriceUnit
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#PriceUnit
#
ENDARRAY
ENDPROPERTIES
FIELD #Qty
Id 12
REAL
PROPERTIES
Name #Qty
Label #@SYS14578
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#PurchQty
#
ENDARRAY
ENDPROPERTIES
FIELD #PurchPrice
Id 13
REAL
PROPERTIES
Name #PurchPrice
Label #@SYS11770
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#PurchPrice
#
ENDARRAY
ENDPROPERTIES
FIELD #DiscPercent
Id 14
REAL
PROPERTIES
Name #DiscPercent
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#PurchDiscPercent
#
ENDARRAY
ENDPROPERTIES
FIELD #DiscAmount
Id 15
REAL
PROPERTIES
Name #DiscAmount
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#PurchDiscAmount
#
ENDARRAY
ENDPROPERTIES
FIELD #LineAmount
Id 16
REAL
PROPERTIES
Name #LineAmount
Label #@SYS6928
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#AmountCur
#
ENDARRAY
ENDPROPERTIES
FIELD #LedgerAccount
Id 17
STRING
PROPERTIES
Name #LedgerAccount
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#PurchLedgerAccount
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #TaxAmount
Id 18
REAL
PROPERTIES
Name #TaxAmount
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#TaxAmountCur
#
ENDARRAY
ENDPROPERTIES
FIELD #Dimension
Id 19
STRING
PROPERTIES
Name #Dimension
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#Dimension
#
ENDARRAY
ENDPROPERTIES
FIELD #QtyPhysical
Id 20
REAL
PROPERTIES
Name #QtyPhysical
Label #@SYS22017
HelpText #@SYS5934
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#PurchQty
#
ENDARRAY
ENDPROPERTIES
FIELD #PartDelivery
Id 21
ENUM
PROPERTIES
Name #PartDelivery
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#PartDelivery
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #InventRefId
Id 22
STRING
PROPERTIES
Name #InventRefId
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#InventRefId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #PurchID
Id 23
STRING
PROPERTIES
Name #PurchID
HelpText #@SYS8544
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#PurchId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #PurchUnit
Id 24
STRING
PROPERTIES
Name #PurchUnit
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#PurchUnit
#
ENDARRAY
ENDPROPERTIES
FIELD #PurchMarkup
Id 25
REAL
PROPERTIES
Name #PurchMarkup
Label #@SYS8371
HelpText #@SYS16914
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#PurchMarkup
#
ENDARRAY
ENDPROPERTIES
FIELD #TransactionCode
Id 26
STRING
PROPERTIES
Name #TransactionCode
HelpText #@SYS17900
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#IntrastatTransactionCodeId
#
ENDARRAY
ENDPROPERTIES
FIELD #InventRefType
Id 27
ENUM
PROPERTIES
Name #InventRefType
Table #VendInvoiceTrans
EnumType #InventRefType
ENDPROPERTIES
FIELD #InventRefTransId
Id 28
STRING
PROPERTIES
Name #InventRefTransId
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#InventRefTransId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #DestState
Id 29
STRING
PROPERTIES
Name #DestState
HelpText #@SYS17958
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#AddressStateId
#
ENDARRAY
ENDPROPERTIES
FIELD #TaxWriteCode
Id 31
STRING
PROPERTIES
Name #TaxWriteCode
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#TaxWriteCode
#
ENDARRAY
ENDPROPERTIES
FIELD #TaxAutogenerated
Id 32
ENUM
PROPERTIES
Name #TaxAutogenerated
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#TaxAutoGenerated
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #TaxItemGroup
Id 33
STRING
PROPERTIES
Name #TaxItemGroup
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#TaxItemGroup
#
ENDARRAY
ENDPROPERTIES
FIELD #Tax1099Amount
Id 34
REAL
PROPERTIES
Name #Tax1099Amount
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#Tax1099Amount
#
ENDARRAY
ENDPROPERTIES
FIELD #Tax1099Date
Id 35
DATE
PROPERTIES
Name #Tax1099Date
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#Tax1099Date
#
ENDARRAY
ENDPROPERTIES
FIELD #Tax1099Box
Id 36
STRING
PROPERTIES
Name #Tax1099Box
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#Tax1099Box
#
ENDARRAY
ENDPROPERTIES
FIELD #Tax1099Num
Id 37
STRING
PROPERTIES
Name #Tax1099Num
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#Tax1099Num
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #MultiLnDisc
Id 38
REAL
PROPERTIES
Name #MultiLnDisc
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#PurchMultiLnDisc
#
ENDARRAY
ENDPROPERTIES
FIELD #MultiLnPercent
Id 39
REAL
PROPERTIES
Name #MultiLnPercent
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#PurchMultiLnPercent
#
ENDARRAY
ENDPROPERTIES
FIELD #LineDisc
Id 40
REAL
PROPERTIES
Name #LineDisc
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#PurchLineDisc
#
ENDARRAY
ENDPROPERTIES
FIELD #LinePercent
Id 41
REAL
PROPERTIES
Name #LinePercent
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#PurchLinePercent
#
ENDARRAY
ENDPROPERTIES
FIELD #OrigPurchId
Id 42
STRING
PROPERTIES
Name #OrigPurchId
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#PurchIdOrig
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #Transport
Id 43
STRING
PROPERTIES
Name #Transport
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#IntrastatTransport
#
ENDARRAY
ENDPROPERTIES
FIELD #InternalInvoiceId
Id 44
STRING
PROPERTIES
Name #InternalInvoiceId
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#PurchInternalInvoiceId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #InterCompanyInventTransId
Id 45
STRING
PROPERTIES
Name #InterCompanyInventTransId
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#InventTransId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #numberSequenceGroup
Id 46
STRING
PROPERTIES
Name #numberSequenceGroup
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#NumberSequenceGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #InventDimId
Id 47
STRING
PROPERTIES
Name #InventDimId
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#InventDimId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #LineAmountTax
Id 48
REAL
PROPERTIES
Name #LineAmountTax
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#LineAmountTax
#
ENDARRAY
ENDPROPERTIES
FIELD #DEL_CorrectiveReason
Id 49
STRING
PROPERTIES
Name #DEL_CorrectiveReason
Visible #No
ConfigurationKey #SysDeletedObjects40
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#DEL_CustVendCorrectiveReason_ES
#
ENDARRAY
StringSize #(Memo)
ENDPROPERTIES
FIELD #Port
Id 50
STRING
PROPERTIES
Name #Port
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#IntrastatPortId
#
ENDARRAY
ENDPROPERTIES
FIELD #StatProcId
Id 51
STRING
PROPERTIES
Name #StatProcId
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#IntrastatProcId
#
ENDARRAY
ENDPROPERTIES
FIELD #InventDate
Id 52
DATE
PROPERTIES
Name #InventDate
Label #@SYS54350
HelpText #@SYS62388
AllowEditOnCreate #No
AllowEdit #No
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#TransDate
#
ENDARRAY
ENDPROPERTIES
FIELD #DestCounty
Id 53
STRING
PROPERTIES
Name #DestCounty
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#AddressCountyId
#
ENDARRAY
ENDPROPERTIES
FIELD #IntrastatDispatchId
Id 54
STRING
PROPERTIES
Name #IntrastatDispatchId
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#IntrastatDispatchId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #InventQty
Id 55
REAL
PROPERTIES
Name #InventQty
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#InventQty
#
ENDARRAY
ENDPROPERTIES
FIELD #Tax1099State
Id 56
STRING
PROPERTIES
Name #Tax1099State
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#Tax1099State
#
ENDARRAY
ENDPROPERTIES
FIELD #Tax1099StateAmount
Id 57
REAL
PROPERTIES
Name #Tax1099StateAmount
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#Tax1099StateAmount
#
ENDARRAY
ENDPROPERTIES
FIELD #SettleTax1099Amount
Id 58
REAL
PROPERTIES
Name #SettleTax1099Amount
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#SettleTax1099Amount
#
ENDARRAY
ENDPROPERTIES
FIELD #SettleTax1099StateAmount
Id 59
REAL
PROPERTIES
Name #SettleTax1099StateAmount
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#SettleTax1099StateAmount
#
ENDARRAY
ENDPROPERTIES
FIELD #LineAmountMST
Id 60
REAL
PROPERTIES
Name #LineAmountMST
Label #@SYS84859
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#AmountMST
#
ENDARRAY
ENDPROPERTIES
FIELD #ReverseChargeApplies_UK
Id 61
ENUM
PROPERTIES
Name #ReverseChargeApplies_UK
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#ReverseChargeApplies_UK
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #BPLImpFolderId
Id 20001
STRING
PROPERTIES
Name #BPLImpFolderId
ConfigurationKey #CRSEIsrael
Table #VendInvoiceTrans
ExtendedDataType
ARRAY
#BPLImpFolderId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
ENDFIELDS
GROUPS
GROUP #AutoReport
PROPERTIES
Name #AutoReport
ENDPROPERTIES
GROUPFIELDS
#PurchID
#LineAmount
#DiscAmount
#DiscPercent
#Qty
#PriceUnit
#ItemId
#InvoiceId
ENDGROUPFIELDS
ENDGROUP
GROUP #Administration
PROPERTIES
Name #Administration
Label #@SYS9853
ENDPROPERTIES
GROUPFIELDS
#PurchID
#OrigPurchId
#InvoiceDate
#Qty
#Name
#numberSequenceGroup
#InternalInvoiceId
ENDGROUPFIELDS
ENDGROUP
GROUP #Amount
PROPERTIES
Name #Amount
Label #@SYS12227
ENDPROPERTIES
GROUPFIELDS
#LineAmount
#LineAmountTax
ENDGROUPFIELDS
ENDGROUP
GROUP #AmountMST
PROPERTIES
Name #AmountMST
Label #@SYS84859
ENDPROPERTIES
GROUPFIELDS
#LineAmountMST
ENDGROUPFIELDS
ENDGROUP
GROUP #BPLAllFields
PROPERTIES
Name #BPLAllFields
Label #@BPL141
ENDPROPERTIES
GROUPFIELDS
#BPLImpFolderId
ENDGROUPFIELDS
ENDGROUP
GROUP #Discount
PROPERTIES
Name #Discount
Label #@SYS11829
ENDPROPERTIES
GROUPFIELDS
#DiscPercent
#DiscAmount
#LinePercent
#LineDisc
#MultiLnPercent
#MultiLnDisc
ENDGROUPFIELDS
ENDGROUP
GROUP #ForeignTrade
PROPERTIES
Name #ForeignTrade
Label #@SYS27650
ENDPROPERTIES
GROUPFIELDS
#TransactionCode
#Transport
#Port
#StatProcId
#DestState
#DestCounty
#IntrastatDispatchId
#DestCountryRegionId
ENDGROUPFIELDS
ENDGROUP
GROUP #Identification
PROPERTIES
Name #Identification
Label #@SYS5711
ENDPROPERTIES
GROUPFIELDS
#InvoiceId
ENDGROUPFIELDS
ENDGROUP
GROUP #InterCompany
PROPERTIES
Name #InterCompany
Label #@SYS74106
ENDPROPERTIES
GROUPFIELDS
#InterCompanyInventTransId
ENDGROUPFIELDS
ENDGROUP
GROUP #Inventory
PROPERTIES
Name #Inventory
Label #@SYS981
ENDPROPERTIES
GROUPFIELDS
#InventTransId
#InventDimId
#InventDate
ENDGROUPFIELDS
ENDGROUP
GROUP #Item
PROPERTIES
Name #Item
Label #@SYS7407
ENDPROPERTIES
GROUPFIELDS
#ItemId
#ExternalItemId
ENDGROUPFIELDS
ENDGROUP
GROUP #Ledger
PROPERTIES
Name #Ledger
Label #@SYS13356
ENDPROPERTIES
GROUPFIELDS
#LedgerAccount
#Dimension
ENDGROUPFIELDS
ENDGROUP
GROUP #MiscCharges
PROPERTIES
Name #MiscCharges
Label #@SYS8371
ENDPROPERTIES
GROUPFIELDS
#PurchMarkup
ENDGROUPFIELDS
ENDGROUP
GROUP #Other
PROPERTIES
Name #Other
Label #@SYS1284
ENDPROPERTIES
GROUPFIELDS
#InventQty
#PartDelivery
#Transport
ENDGROUPFIELDS
ENDGROUP
GROUP #Prices
PROPERTIES
Name #Prices
Label #@SYS12983
ENDPROPERTIES
GROUPFIELDS
#CurrencyCode
#PriceUnit
#PurchPrice
ENDGROUPFIELDS
ENDGROUP
GROUP #Quantity
PROPERTIES
Name #Quantity
Label #@SYS14578
ENDPROPERTIES
GROUPFIELDS
#QtyPhysical
#PurchUnit
ENDGROUPFIELDS
ENDGROUP
GROUP #Reference
PROPERTIES
Name #Reference
Label #@SYS15217
ENDPROPERTIES
GROUPFIELDS
#InventRefType
#InventRefId
#InventRefTransId
ENDGROUPFIELDS
ENDGROUP
GROUP #ReverseCharge_UK
PROPERTIES
Name #ReverseCharge_UK
Label #@SYS118818
ENDPROPERTIES
GROUPFIELDS
#ReverseChargeApplies_UK
ENDGROUPFIELDS
ENDGROUP
GROUP #SalesTax
PROPERTIES
Name #SalesTax
Label #@SYS5878
ENDPROPERTIES
GROUPFIELDS
#TaxAutogenerated
#TaxWriteCode
#TaxItemGroup
#TaxGroup
#TaxAmount
ENDGROUPFIELDS
ENDGROUP
GROUP #Tax1099
PROPERTIES
Name #Tax1099
Label #@SYS24226
ENDPROPERTIES
GROUPFIELDS
#Tax1099Date
#Tax1099Num
#Tax1099Box
#Tax1099Amount
#SettleTax1099Amount
#Tax1099State
#Tax1099StateAmount
#SettleTax1099StateAmount
ENDGROUPFIELDS
ENDGROUP
GROUP #Transaction
PROPERTIES
Name #Transaction
Label #@SYS15191
ENDPROPERTIES
GROUPFIELDS
ENDGROUPFIELDS
ENDGROUP
GROUP #VendorInvoiceLines
PROPERTIES
Name #VendorInvoiceLines
Label #@SYS27199
ENDPROPERTIES
GROUPFIELDS
#LineNum
ENDGROUPFIELDS
ENDGROUP
ENDGROUPS
INDICES
#InvoiceIdx
Id 1
PROPERTIES
Name #InvoiceIdx
ENDPROPERTIES
INDEXFIELDS
#PurchID
#InvoiceDate
#InvoiceId
#LineNum
#numberSequenceGroup
#InternalInvoiceId
ENDINDEXFIELDS
#TransIdIdx
Id 2
PROPERTIES
Name #TransIdIdx
ENDPROPERTIES
INDEXFIELDS
#InventTransId
ENDINDEXFIELDS
#ItemIdIdx
Id 3
PROPERTIES
Name #ItemIdIdx
ENDPROPERTIES
INDEXFIELDS
#ItemId
#InvoiceDate
ENDINDEXFIELDS
ENDINDICES
REFERENCES
REFERENCE #VendInvoiceJour
PROPERTIES
Name #VendInvoiceJour
Table #VendInvoiceJour
EntityRelationshipRole #@SYS126047
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #PurchID
RelatedField #PurchId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #InvoiceId
RelatedField #InvoiceId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #InvoiceDate
RelatedField #InvoiceDate
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #numberSequenceGroup
RelatedField #numberSequenceGroup
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #InternalInvoiceId
RelatedField #InternalInvoiceId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
ENDREFERENCES
DELETEACTIONS
#MarkupTrans
PROPERTIES
Table #MarkupTrans
DeleteAction #Cascade
ENDPROPERTIES
#CustVendCreditInvoicingTrans
PROPERTIES
Table #CustVendCreditInvoicingTrans
DeleteAction #Cascade
ENDPROPERTIES
ENDDELETEACTIONS
METHODS
Version: 3
SOURCE #Address
#//BP Deviation Documented
#display Addressing address()
#{
# return this.vendTable_InvoiceAccount().Address;
#
#}
#
ENDSOURCE
SOURCE #costValue
#//BP Deviation Documented
#server display CostAmount costValue()
#{
# return this.inventCostAmount();
#}
#
ENDSOURCE
SOURCE #ExchRate
#//BP Deviation Documented
#display VendExchRate exchRate()
#{
# return this.vendInvoiceJour().ExchRate;
#}
ENDSOURCE
SOURCE #GrossAmount
#//BP Deviation Documented
#display AmountCur grossAmount()
#{
# Percent cashDiscPercent;
# AmountCur grossAmount=0;
#
# if (this.Qty)
# {
# grossAmount = PriceDisc::price2Amount(this.PurchPrice,
# this.PriceUnit,
# 0.0,
# this.Qty, // sales deliver now
# this.Qty, // sales qty
# this.PurchMarkup,
# 0.0,
# this.CurrencyCode,
# this.LineAmount);
# }
#
# if (this.vendInvoiceJour().InclTax)
# {
# if (TaxParameters::find().TaxLessCashDisc)
# {
# cashDiscPercent = CashDisc::find(this.vendInvoiceJour().CashDiscCode).Percent;
# }
#
# grossAmount = Tax::baseAmountExclTax(this.TaxGroup,
# this.TaxItemGroup,
# this.InvoiceDate,
# this.CurrencyCode,
# grossAmount,
# TaxModuleType::Purch,
# this.Qty,
# this.PurchUnit,
# this.ItemId,
# TaxDirection::OutgoingTax,
# cashDiscPercent);
#
# }
#
# return grossAmount;
#
#}
ENDSOURCE
SOURCE #grossAmountMST
#//BP Deviation Documented
#display AmountMST grossAmountMST()
#{
# return this.vendInvoiceJour().amountMST(this.grossAmount());
#}
#
ENDSOURCE
SOURCE #initFromLedgerJournalTrans
#public void initFromLedgerJournalTrans(LedgerJournalTrans _ledgerJournalTrans)
#{
# ;
# this.LineNum = _ledgerJournalTrans.LineNum;
# this.Qty = _ledgerJournalTrans.Qty;
# this.Name = _ledgerJournalTrans.Txt;
# this.TaxGroup = _ledgerJournalTrans.TaxGroup;
# this.Dimension = _ledgerJournalTrans.Dimension;
# this.TaxItemGroup = _ledgerJournalTrans.TaxItemGroup;
# this.TaxWriteCode = TaxTable::find(_ledgerJournalTrans.TaxCode).PrintCode;
#}
#
ENDSOURCE
SOURCE #InitFromPurchLine
#public void initFromPurchLine(PurchLine purchLine,
# PurchParmLine _purchParmLine = null)
#{
# this.OrigPurchId = purchLine.PurchId;
# this.InventTransId = purchLine.InventTransId;
# this.InventDimId = purchLine.InventDimId;
# this.ItemId = purchLine.ItemId;
# this.LineNum = purchLine.LineNum;
# this.ExternalItemId = purchLine.ExternalItemId;
# this.Name = purchLine.Name;
# this.TaxGroup = purchLine.TaxGroup;
# this.TaxItemGroup = purchLine.TaxItemGroup;
# this.Tax1099Box = purchLine.Tax1099Box;
# this.CurrencyCode = purchLine.CurrencyCode;
# this.PurchUnit = purchLine.PurchUnit;
# this.PriceUnit = purchLine.PriceUnit;
# this.Qty = purchLine.PurchReceivedNow;
# this.PurchPrice = purchLine.PurchPrice;
# this.PurchMarkup = purchLine.PurchMarkup;
# this.DiscPercent = purchLine.discPercent();
# this.DiscAmount = purchLine.discAmount();
# this.LineDisc = purchLine.LineDisc;
# this.LinePercent = purchLine.LinePercent;
# this.MultiLnDisc = purchLine.MultiLnDisc;
# this.MultiLnPercent = purchLine.MultiLnPercent;
# this.LedgerAccount = purchLine.LedgerAccount;
# this.Tax1099Amount = purchLine.Tax1099Amount;
# this.Tax1099State = purchLine.Tax1099State;
# this.Tax1099StateAmount = purchLine.Tax1099StateAmount;
# this.QtyPhysical = 0;
# this.PartDelivery = 0;
#
# this.Dimension = purchLine.Dimension;
# this.TransactionCode = purchLine.TransactionCode;
# this.Transport = purchLine.Transport;
# this.Port = purchLine.Port;
# this.StatProcId = purchLine.StatProcId;
#
# this.InventRefType = purchLine.ItemRefType;
# this.InventRefId = purchLine.InventRefId;
# this.InventRefTransId = purchLine.InventRefTransId;
# if (ReverseChargeParameters_UK::find().rcEnabled)
# {
# if (ReverseCharge_invoice_UK::reverseChargePurchItem(purchLine))
# {
# if (ReverseCharge_invoice_UK::isPurchReverseChargedApplicable(purchLine))
# {
# if ((_purchParmLine.LineAmount >= ReverseCharge_invoice_UK::reverseChargePurchItem(purchLine).rcItemLineThresholdAmount) ||
# ((ReverseChargeParameters_UK::find().rcInvoiceThreshold) &&
# (ReverseCharge_invoice_UK::reverseChargePurchTotal(purchLine.PurchId,_purchParmLine.ParmId,_purchParmLine.TableRefId)>=ReverseChargeParameters_UK::find().rcInvoiceThresholdAmount)))
# {
# if (ReverseCharge_invoice_UK::isPurchDomestic(PurchTable::find(purchLine.PurchId)))
# {
# this.ReverseChargeApplies_UK = NoYes::Yes;
# }
# }
# }
# }
# }
# this.InterCompanyInventTransId = purchLine.InterCompanyInventTransId;
#
# if (isConfigurationkeyEnabled(configurationkeynum(TradeMultiShipTo)))
# {
#
# this.DestState = purchLine.DeliveryState;
# this.DestCountryRegionId = purchLine.DeliveryCountryRegionId;
# this.DestCounty = purchLine.DeliveryCounty;
# }
# else
# {
# this.initFromPurchTable(purchLine.purchTable());
# }
# // Israel-Localisation-Prodware-ImportFolder-Begin
# this.BPLImpFolderId = purchLine.BPLImpFolderId;
# // Israel-Localisation-Prodware-ImportFolder-End
#}
ENDSOURCE
SOURCE #initFromPurchParmLine
#public void initFromPurchParmLine(PurchParmLine purchParmLine)
#{
# this.LineAmount = purchParmLine.LineAmount;
# this.DiscAmount = purchParmLine.discAmount();
# this.DiscPercent = purchParmLine.discPercent();
# this.PurchMarkup = purchParmLine.PurchMarkup;
# this.PurchPrice = purchParmLine.PurchPrice;
# this.PriceUnit = purchParmLine.PriceUnit;
# this.LineDisc = purchParmLine.LineDisc;
# this.LinePercent = purchParmLine.LinePercent;
# this.MultiLnDisc = purchParmLine.MultiLnDisc;
# this.MultiLnPercent = purchParmLine.MultiLnPercent;
# this.Qty = purchParmLine.ReceiveNow;
#}
ENDSOURCE
SOURCE #initFromPurchParmTable
#public void initFromPurchParmTable(PurchParmTable _purchParmTable)
#{
# this.InventDate = _purchParmTable.TransDate;
#}
ENDSOURCE
SOURCE #initFromPurchTable
#void initFromPurchTable(PurchTable purchTable)
#{
# ;
# this.DestState = purchTable.DlvState;
# this.DestCountryRegionId = purchTable.DlvCountryRegionId;
# this.DestCounty = purchTable.DlvCounty;
#}
ENDSOURCE
SOURCE #initFromVendInvoiceJour
#public void initFromVendInvoiceJour(VendInvoiceJour _vendInvoiceJour)
#{
# ;
# this.PurchID = _vendInvoiceJour.PurchId;
# this.InvoiceId = _vendInvoiceJour.InvoiceId;
# this.InvoiceDate = _vendInvoiceJour.InvoiceDate;
# this.NumberSequenceGroup = _vendInvoiceJour.NumberSequenceGroup;
# this.CurrencyCode = _vendInvoiceJour.CurrencyCode;
# this.InternalInvoiceId = _vendInvoiceJour.InternalInvoiceId;
#}
ENDSOURCE
SOURCE #interCompanySourceTable
#public Common interCompanySourceTable(boolean interCompanySource = true)
#{;
# if (interCompanySource)
# return SalesLine::findInventTransId(this.InterCompanyInventTransId).salesTable();
# else
# return SalesLine::findInventTransId(this.InventRefTransId).salesTable();
#}
#
ENDSOURCE
SOURCE #InventCostAmount
#//BP Deviation Documented
#server display CostAmount inventCostAmount()
#{
# return InventTrans::invoiceCostAmount(this.InventTransId,this.InventDate,this.InvoiceId);
#}
ENDSOURCE
SOURCE #InventDim
#public InventDim inventDim(boolean update = false)
#{
# return InventDim::find(this.InventDimId, update);
#}
ENDSOURCE
SOURCE #InventQty
#//BP Deviation Documented
#server display InventQty inventQty()
#{
# return InventTrans::qtyInvoiceSold(this.InventTransId,this.InvoiceDate,this.InvoiceId)+
# InventTrans::qtyInvoicePurchased(this.InventTransId,this.InvoiceDate,this.InvoiceId);
#}
ENDSOURCE
SOURCE #inventQtyPhysical
#//BP Deviation Documented
#server display InventQty inventQtyPhysical()
#{
# return InventTrans::qtyInvoiceDeducted(this.InventTransId,this.InvoiceDate,this.InvoiceId)+
# InventTrans::qtyInvoiceReceived(this.InventTransId,this.InvoiceDate,this.InvoiceId);
#}
ENDSOURCE
SOURCE #inventTable
#public InventTable inventTable(
# ItemId itemId = this.ItemId,
# boolean update = false)
#{
# return InventTable::find(itemId, update);
#}
ENDSOURCE
SOURCE #ItemName
#//BP Deviation Documented
#display ItemNameDisplay itemName()
#{
# return InventTable::find(this.ItemId).itemName(this.inventDim());
#}
#
ENDSOURCE
SOURCE #lineAmountInclTax
#//BP Deviation Documented
#display LineAmount lineAmountInclTax()
#{
# return this.LineAmount + this.LineAmountTax;
#}
ENDSOURCE
SOURCE #Name
#//BP Deviation Documented
#display VendName name()
#{
# return this.vendTable_InvoiceAccount().Name;
#
#}
#
ENDSOURCE
SOURCE #PurchLine
#public PurchLine purchLine()
#{
# PurchLine purchLine;
# ;
#
# select purchLine
# where purchLine.PurchId == this.PurchID &&
# purchLine.InventTransId == this.InventTransId;
#
# return purchLine;
#}
ENDSOURCE
SOURCE #purchUnitTxt
#//BP Deviation Documented
#display UnitIDTxt purchUnitTxt()
#{
# VendInvoiceJour vendInvoiceJour = this.vendInvoiceJour();
# PurchTable purchTable;
# VendTable vendTable;
# ;
#
# if (vendInvoiceJour.LanguageId)
# return UnitTxt::languageUnitId(this.PurchUnit, vendInvoiceJour.LanguageId);
#
# purchTable = PurchTable::find(this.PurchID);
# if (purchTable.LanguageId)
# return UnitTxt::languageUnitId(this.PurchUnit, purchTable.LanguageId);
#
# vendTable = VendTable::find(this.vendInvoiceJour().InvoiceAccount);
# if (vendTable.LanguageId)
# return UnitTxt::languageUnitId(this.PurchUnit, vendTable.LanguageId);
#
# return UnitTxt::languageUnitId(this.PurchUnit);
#}
#
#
#
#
ENDSOURCE
SOURCE #returnLineAmount
#public LineAmount returnLineAmount(Qty _qtyNow)
#{
# LineAmount returnAmount;
# PurchMarkup purchMarkup;
# PurchDiscAmount purchDiscAmount;
# ;
#
# purchMarkup = _qtyNow >= 0 ? this.PurchMarkup : -this.PurchMarkup;
#
# if (this.PurchPrice)
# {
# if (this.PriceUnit)
# {
# returnAmount = _qtyNow * (this.PurchPrice / this.PriceUnit);
# }
# else
# {
# returnAmount = _qtyNow * (this.PurchPrice / 1);
# }
# }
# else
# {
# returnAmount = this.LineAmount;
# }
#
# purchDiscAmount = _qtyNow * (this.DiscAmount/1);
# returnAmount = (returnAmount + purchMarkup - purchDiscAmount) * (1-(this.DiscPercent/100));
#
# returnAmount = Currency::amount(returnAmount, this.CurrencyCode);
#
# return returnAmount;
#}
#
#
ENDSOURCE
SOURCE #reverseChargeApplies_UK
#//BP Deviation Documented
#display char reverseChargeApplies_UK()
#{
# #define.Asterisk('*')
# str remark;
# ;
# if(this.ReverseChargeApplies_UK == NoYes::Yes)
# {
# remark = #Asterisk;
# }
# return remark;
#}
#
#
ENDSOURCE
SOURCE #setLinenum
#public void setLineNum(LineNum lineNum)
#{
# this.LineNum = lineNum;
#}
ENDSOURCE
SOURCE #Tax1099FieldNum
#//BP Deviation Documented
#display Tax1099FieldNum tax1099FieldNum()
#{
# return Tax1099Fields::find(this.Tax1099Box).Tax1099FieldNum;
#
#}
ENDSOURCE
SOURCE #Tax1099RegNum
#//BP Deviation Documented
#display VATNum tax1099RegNum()
#{
# return this.vendTable_InvoiceAccount().Tax1099RegNum;
#
#}
#
ENDSOURCE
SOURCE #VendInvoiceJour
#public VendInvoiceJour vendInvoiceJour()
#{
# return VendInvoiceJour::findFromVendInvoiceTrans(this.PurchID,
# this.InvoiceId,
# this.InvoiceDate,
# this.NumberSequenceGroup,
# this.InternalInvoiceId);
#}
ENDSOURCE
SOURCE #vendTable_InvoiceAccount
#public VendTable vendTable_InvoiceAccount()
#{
# return this.vendInvoiceJour().vendTable_InvoiceAccount();
#}
ENDSOURCE
SOURCE #checkExist
#public static boolean checkExist(InventTransId inventTransId )
#{
# boolean ret = true;
# ;
#
# if (!VendInvoiceTrans::exist(inventTransId))
# {
# ret = checkFailed(strfmt(VendInvoiceTrans::txtNotExist(), inventTransId));
# }
#
# return ret;
#}
ENDSOURCE
SOURCE #exist
#public static boolean exist(InventTransId inventTransId )
#{
# boolean found;
# ;
#
# found = (select firstonly
# RecId
# from
# vendInvoiceTrans
# where
# vendInvoiceTrans.InventTransId == inventTransId).RecId != 0;
#
# return found;
#}
ENDSOURCE
SOURCE #find
#public static VendInvoiceTrans find(
# InventTransId inventTransId,
# boolean _forupdate = false,
# ConcurrencyModel _concurrencyModel = ConcurrencyModel::Auto)
#{
# VendInvoiceTrans vendInvoiceTrans;
# ;
#
# vendInvoiceTrans.selectForUpdate(_forupdate);
# if (_forupdate && _concurrencyModel != ConcurrencyModel::Auto)
# {
# vendInvoiceTrans.concurrencyModel(_concurrencyModel);
# }
#
# select firstonly
# vendInvoiceTrans
# where
# vendInvoiceTrans.InventTransId == inventTransId;
#
# return vendInvoiceTrans;
#}
ENDSOURCE
SOURCE #findInventTransid
#public static VendInvoiceTrans findInventTransId(
# InventTransId inventTransId,
# boolean update = false)
#{
# VendInvoiceTrans vendInvoiceTrans;
# ;
#
# vendInvoiceTrans.selectForUpdate(update);
#
# select vendInvoiceTrans
# index hint TransIdIdx
# where vendInvoiceTrans.InventTransId == inventTransId;
#
# return vendInvoiceTrans;
#}
#
ENDSOURCE
SOURCE #findRecId
#public static VendInvoiceTrans findRecId(
# recId _recId,
# boolean _forUpdate = false)
#{
# VendInvoiceTrans vendInvoiceTrans;
# ;
#
# if (_recId)
# {
# vendInvoiceTrans.selectForUpdate(_forUpdate);
#
# select vendInvoiceTrans
# where vendInvoiceTrans.RecId == _recId;
# }
# return vendInvoiceTrans;
#}
ENDSOURCE
SOURCE #findVendInvoiceTrans
#static VendInvoiceTrans findVendInvoiceTrans(PurchId _purchId,
# InvoiceId _invoiceId,
# InvoiceDate _invoiceDate,
# NumberSequenceGroupId _numberSeqGrp,
# PurchInternalInvoiceId _internalInvoiceId,
# InventTransId _inventTransId)
#{
# VendInvoiceTrans vendInvoiceTrans;
# ;
#
# select vendInvoiceTrans
# index hint InvoiceIdx
# where vendInvoiceTrans.PurchID == _purchId &&
# vendInvoiceTrans.InvoiceId == _invoiceId &&
# vendInvoiceTrans.InvoiceDate == _invoiceDate &&
# vendInvoiceTrans.NumberSequenceGroup == _numberSeqGrp &&
# vendInvoiceTrans.InternalInvoiceId == _internalInvoiceId &&
# vendInvoiceTrans.InventTransId == _inventTransId;
#
# return vendInvoiceTrans;
#}
#
#
#
ENDSOURCE
SOURCE #txtNotExist
#public static TxtNotExist txtNotExist()
#{
# return "@SYS102262";
#}
ENDSOURCE
ENDMETHODS
ENDTABLE
en-us
Vendor invoice lines
@SYS27199
0
0
he
שורות של חשבונית ספק
@SYS27199
0
0
en-us
The VendInvoiceTrans table contains posted vendor invoice lines.
{locked}
@SYS126046
0
0
he
The VendInvoiceTrans table contains posted vendor invoice lines.
{locked}
@SYS126046
0
0
en-us
Country/region for delivery
@SYS17952
0
0
he
מדינה/אזור למשלוח
@SYS17952
0
0
en-us
Item
@SYS7407
0
0
he
פריט
@SYS7407
0
0
en-us
Description
@SYS6303
0
0
he
תיאור
@SYS6303
0
0
en-us
Quantity
@SYS14578
0
0
he
כמות
@SYS14578
0
0
en-us
Unit price
Replaces price each
@SYS11770
0
0
he
מחיר יחידה
Replaces price each
@SYS11770
0
0
en-us
Amount
@SYS6928
0
0
he
סכום
@SYS6928
0
0
en-us
Physical quantity
@SYS22017
0
0
he
כמות פיזית
@SYS22017
0
0
en-us
Quantity received without packing slip
@SYS5934
0
0
he
הכמות שהתקבלה ללא תעודת משלוח
@SYS5934
0
0
en-us
Purchase that the current line is attached to.
@SYS8544
0
0
he
הרכישה שאליה מצורפת השורה הנוכחית.
@SYS8544
0
0
en-us
Misc. charges
@SYS8371
0
0
he
חיובים שונים
@SYS8371
0
0
en-us
Fixed misc. charges on purchase price, which are independent of quantity.
@SYS16914
0
0
he
חיובים שונים קבועים על מחיר רכישה, שאינם תלויים בכמות.
@SYS16914
0
0
en-us
Specify transaction code for the current line.
@SYS17900
0
0
he
ציין את קוד התנועה עבור השורה הנוכחית.
@SYS17900
0
0
en-us
Specify state for delivery of the item
@SYS17958
0
0
he
ציין מדינה למסירת הפריט
@SYS17958
0
0
en-us
Inventory date
@SYS54350
0
0
he
תאריך מלאי
@SYS54350
0
0
en-us
Date of inventory transactions
@SYS62388
0
0
he
תאריך תנועות מלאי
@SYS62388
0
0
en-us
Amount in default currency
@SYS84859
0
0
he
הסכום במטבע ברירת המחדל
@SYS84859
0
0
en-us
Administration
@SYS9853
0
0
he
ניהול
@SYS9853
0
0
en-us
Amount
@SYS12227
0
0
he
סכום
@SYS12227
0
0
en-us
BUS fields Israel
@BPL141
0
0
he
שדות ישראל BUS
@BPL141
0
0
en-us
Discount
@SYS11829
0
0
he
הנחה
@SYS11829
0
0
en-us
Foreign trade
@SYS27650
0
0
he
סחר חוץ
@SYS27650
0
0
en-us
Identification
@SYS5711
0
0
he
זיהוי
@SYS5711
0
0
en-us
Intercompany
Intercompany used in the sense 'intra-group'.
@SYS74106
0
0
he
בין-חברתי
Intercompany used in the sense 'intra-group'.
@SYS74106
0
0
en-us
Inventory
@SYS981
0
0
he
מלאי
@SYS981
0
0
en-us
Ledger
@SYS13356
0
0
he
ספר ראשי
@SYS13356
0
0
en-us
Other
@SYS1284
0
0
he
אחר
@SYS1284
0
0
en-us
Prices
@SYS12983
0
0
he
מחירים
@SYS12983
0
0
en-us
Reference
Used very many places, among other as book title in the online help system.
@SYS15217
0
0
he
אסמכתא
Used very many places, among other as book title in the online help system.
@SYS15217
0
0
en-us
Reverse charge
@SYS118818
0
0
he
היפוך חיוב
@SYS118818
0
0
en-us
Sales tax
Tax = Sales tax
@SYS5878
0
0
he
מע"מ
Tax = Sales tax
@SYS5878
0
0
en-us
1099 fields
@SYS24226
0
0
he
שדות 1099
@SYS24226
0
0
en-us
Transaction
@SYS15191
0
0
he
תנועה
@SYS15191
0
0
en-us
Posted vendor invoice
{locked}
@SYS126047
0
0
he
Posted vendor invoice
{locked}
@SYS126047
0
0
en-us
A record with InventTransId %1 does not exist.
@SYS102262
0
0
he
רשומה עם InventTransId %1 אינה קיימת.
@SYS102262
0
0
***Element: DBT
; Microsoft Dynamics AX Table : VendPackingSlipTrans unloaded
; --------------------------------------------------------------------------------
TABLEVERSION 1
TABLE #VendPackingSlipTrans
Id 501
PROPERTIES
Name #VendPackingSlipTrans
Label #@SYS55350
SearchLinkRefName #EPVendPackingSlipJournalInfo
TitleField1 #ItemId
TitleField2 #Name
ConfigurationKey #LogisticsBasic
SecurityKey #VendTables
MaxAccessMode #Edit
CacheLookup #Found
CreateRecIdIndex #Yes
TableGroup #Transaction
PrimaryIndex #RecId
ClusterIndex #RecId
DeveloperDocumentation #@SYS124495
ENDPROPERTIES
FIELDS
FIELD #PackingSlipId
Id 1
STRING
PROPERTIES
Name #PackingSlipId
Mandatory #Yes
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#PackingSlipId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #DeliveryDate
Id 2
DATE
PROPERTIES
Name #DeliveryDate
HelpText #@SYS16056
Mandatory #Yes
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#TransDate
#
ENDARRAY
ENDPROPERTIES
FIELD #LineNum
Id 3
REAL
PROPERTIES
Name #LineNum
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#LineNum
#
ENDARRAY
ENDPROPERTIES
FIELD #InventTransId
Id 4
STRING
PROPERTIES
Name #InventTransId
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#InventTransId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #DestCountryRegionId
Id 5
STRING
PROPERTIES
Name #DestCountryRegionId
Label #@SYS17952
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#AddressCountryRegionId
#
ENDARRAY
ENDPROPERTIES
FIELD #ItemId
Id 6
STRING
PROPERTIES
Name #ItemId
Label #@SYS7407
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#ItemId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #ExternalItemId
Id 7
STRING
PROPERTIES
Name #ExternalItemId
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#PurchExternalItemId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #Name
Id 8
STRING
PROPERTIES
Name #Name
Label #@SYS6303
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#ItemFreeTxt
#
ENDARRAY
StringSize #1000
ENDPROPERTIES
FIELD #Ordered
Id 9
REAL
PROPERTIES
Name #Ordered
Label #@SYS16279
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#PurchQty
#
ENDARRAY
ENDPROPERTIES
FIELD #Qty
Id 10
REAL
PROPERTIES
Name #Qty
Label #@SYS4465
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#PurchDeliveredQty
#
ENDARRAY
ENDPROPERTIES
FIELD #Remain
Id 11
REAL
PROPERTIES
Name #Remain
Label #@SYS8459
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#PurchQty
#
ENDARRAY
ENDPROPERTIES
FIELD #Purchaser
Id 12
STRING
PROPERTIES
Name #Purchaser
Label #@SYS16389
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#EmplId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #PriceUnit
Id 13
REAL
PROPERTIES
Name #PriceUnit
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#PriceUnit
#
ENDARRAY
ENDPROPERTIES
FIELD #Dimension
Id 14
STRING
PROPERTIES
Name #Dimension
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#Dimension
#
ENDARRAY
ENDPROPERTIES
FIELD #ValueMST
Id 15
REAL
PROPERTIES
Name #ValueMST
Label #@SYS13685
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#AmountMST
#
ENDARRAY
ENDPROPERTIES
FIELD #PartDelivery
Id 16
ENUM
PROPERTIES
Name #PartDelivery
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#PartDelivery
#
ENDARRAY
EnumType #NoYes
ENDPROPERTIES
FIELD #InventRefId
Id 17
STRING
PROPERTIES
Name #InventRefId
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#InventRefId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #InventRefType
Id 18
ENUM
PROPERTIES
Name #InventRefType
Table #VendPackingSlipTrans
EnumType #InventRefType
ENDPROPERTIES
FIELD #purchId
Id 19
STRING
PROPERTIES
Name #purchId
HelpText #@SYS8544
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#PurchId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #PurchUnit
Id 20
STRING
PROPERTIES
Name #PurchUnit
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#PurchUnit
#
ENDARRAY
ENDPROPERTIES
FIELD #TransactionCode
Id 21
STRING
PROPERTIES
Name #TransactionCode
Label #@SYS17877
HelpText #@SYS17887
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#IntrastatTransactionCodeId
#
ENDARRAY
ENDPROPERTIES
FIELD #InventRefTransId
Id 22
STRING
PROPERTIES
Name #InventRefTransId
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#InventRefTransId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #InterCompanyInventTransId
Id 23
STRING
PROPERTIES
Name #InterCompanyInventTransId
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#InventTransId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #DestState
Id 24
STRING
PROPERTIES
Name #DestState
HelpText #@SYS17958
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#AddressStateId
#
ENDARRAY
ENDPROPERTIES
FIELD #OrigPurchid
Id 27
STRING
PROPERTIES
Name #OrigPurchid
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#PurchIdOrig
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #ReturnActionId
Id 28
STRING
PROPERTIES
Name #ReturnActionId
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#ReturnActionId
#
ENDARRAY
ENDPROPERTIES
FIELD #Transport
Id 29
STRING
PROPERTIES
Name #Transport
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#IntrastatTransport
#
ENDARRAY
ENDPROPERTIES
FIELD #InternalPackingSlipId
Id 30
STRING
PROPERTIES
Name #InternalPackingSlipId
Mandatory #Yes
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#PurchInternalPackingSlipId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #InventDimId
Id 31
STRING
PROPERTIES
Name #InventDimId
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#InventDimId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #StatProcId
Id 32
STRING
PROPERTIES
Name #StatProcId
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#IntrastatProcId
#
ENDARRAY
ENDPROPERTIES
FIELD #Port
Id 33
STRING
PROPERTIES
Name #Port
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#IntrastatPortId
#
ENDARRAY
ENDPROPERTIES
FIELD #InventDate
Id 34
DATE
PROPERTIES
Name #InventDate
Label #@SYS54350
HelpText #@SYS62388
AllowEditOnCreate #No
AllowEdit #No
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#TransDate
#
ENDARRAY
ENDPROPERTIES
FIELD #NumberSequenceGroup
Id 35
STRING
PROPERTIES
Name #NumberSequenceGroup
AllowEditOnCreate #No
AllowEdit #No
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#NumberSequenceGroupId
#
ENDARRAY
ENDPROPERTIES
FIELD #DestCounty
Id 36
STRING
PROPERTIES
Name #DestCounty
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#AddressCountyId
#
ENDARRAY
ENDPROPERTIES
FIELD #IntrastatDispatchId
Id 37
STRING
PROPERTIES
Name #IntrastatDispatchId
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#IntrastatDispatchId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #InventQty
Id 38
REAL
PROPERTIES
Name #InventQty
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#InventQty
#
ENDARRAY
ENDPROPERTIES
FIELD #BPLImpFolderId
Id 20001
STRING
PROPERTIES
Name #BPLImpFolderId
ConfigurationKey #CRSEIsrael
Table #VendPackingSlipTrans
ExtendedDataType
ARRAY
#BPLImpFolderId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
ENDFIELDS
GROUPS
GROUP #AutoReport
PROPERTIES
Name #AutoReport
ENDPROPERTIES
GROUPFIELDS
#PackingSlipId
#ItemId
#Qty
#Ordered
#Remain
ENDGROUPFIELDS
ENDGROUP
GROUP #Amount
PROPERTIES
Name #Amount
Label #@SYS12227
ENDPROPERTIES
GROUPFIELDS
#ValueMST
ENDGROUPFIELDS
ENDGROUP
GROUP #BPLAllFields
PROPERTIES
Name #BPLAllFields
Label #@BPL141
ENDPROPERTIES
GROUPFIELDS
#BPLImpFolderId
ENDGROUPFIELDS
ENDGROUP
GROUP #Dimension
PROPERTIES
Name #Dimension
Label #@SYS14926
ENDPROPERTIES
GROUPFIELDS
#Dimension
ENDGROUPFIELDS
ENDGROUP
GROUP #ForeignTrade
PROPERTIES
Name #ForeignTrade
Label #@SYS27650
ENDPROPERTIES
GROUPFIELDS
#TransactionCode
#Transport
#Port
#StatProcId
#DestState
#DestCounty
#IntrastatDispatchId
#DestCountryRegionId
ENDGROUPFIELDS
ENDGROUP
GROUP #InterCompany
PROPERTIES
Name #InterCompany
Label #@SYS74106
ENDPROPERTIES
GROUPFIELDS
#InterCompanyInventTransId
ENDGROUPFIELDS
ENDGROUP
GROUP #Inventory
PROPERTIES
Name #Inventory
Label #@SYS981
ENDPROPERTIES
GROUPFIELDS
#InventTransId
#InventDimId
#InventDate
ENDGROUPFIELDS
ENDGROUP
GROUP #PackingSlip
PROPERTIES
Name #PackingSlip
Label #@SYS11549
ENDPROPERTIES
GROUPFIELDS
#PackingSlipId
#DeliveryDate
#InternalPackingSlipId
#NumberSequenceGroup
ENDGROUPFIELDS
ENDGROUP
GROUP #Price
PROPERTIES
Name #Price
Label #@SYS11865
ENDPROPERTIES
GROUPFIELDS
#PriceUnit
ENDGROUPFIELDS
ENDGROUP
GROUP #PurchaseLines
PROPERTIES
Name #PurchaseLines
Label #@SYS9664
ENDPROPERTIES
GROUPFIELDS
#purchId
#LineNum
#ExternalItemId
#Name
#Purchaser
#OrigPurchid
#ReturnActionId
ENDGROUPFIELDS
ENDGROUP
GROUP #PurchaseQuantity
PROPERTIES
Name #PurchaseQuantity
Label #@SYS11187
ENDPROPERTIES
GROUPFIELDS
#Ordered
#Qty
#Remain
#PurchUnit
#PartDelivery
#InventQty
#unpostedInvoicePurchQty
ENDGROUPFIELDS
ENDGROUP
GROUP #Reference
PROPERTIES
Name #Reference
Label #@SYS15217
ENDPROPERTIES
GROUPFIELDS
#InventRefType
#InventRefId
#InventRefTransId
ENDGROUPFIELDS
ENDGROUP
GROUP #TableGroup
PROPERTIES
Name #TableGroup
Label #@SYS21958
ENDPROPERTIES
GROUPFIELDS
#ItemId
ENDGROUPFIELDS
ENDGROUP
ENDGROUPS
INDICES
#PackingSlipIdx
Id 1
PROPERTIES
Name #PackingSlipIdx
ENDPROPERTIES
INDEXFIELDS
#purchId
#DeliveryDate
#PackingSlipId
#LineNum
#InternalPackingSlipId
ENDINDEXFIELDS
#TransIdIdx
Id 2
PROPERTIES
Name #TransIdIdx
ENDPROPERTIES
INDEXFIELDS
#InventTransId
ENDINDEXFIELDS
ENDINDICES
REFERENCES
REFERENCE #VendPckSlpJour
PROPERTIES
Name #VendPckSlpJour
Table #VendPackingSlipJour
Validate #No
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #purchId
RelatedField #PurchId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #PackingSlipId
RelatedField #PackingSlipId
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #DeliveryDate
RelatedField #DeliveryDate
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #InternalPackingSlipId
RelatedField #InternalPackingSlipId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
ENDREFERENCES
DELETEACTIONS
ENDDELETEACTIONS
METHODS
Version: 3
SOURCE #InitFromPurchLine
#void initFromPurchLine(PurchLine purchLine)
#{
# this.OrigPurchid = purchLine.PurchId;
# this.InventTransId = purchLine.InventTransId;
# this.ItemId = purchLine.ItemId;
# this.LineNum = purchLine.LineNum;
# this.InventDimId = purchLine.InventDimId;
# this.PurchUnit = purchLine.PurchUnit;
# this.Name = purchLine.Name;
# this.ExternalItemId = purchLine.ExternalItemId;
# this.PriceUnit = purchLine.PriceUnit;
# this.Qty = purchLine.PurchReceivedNow;
# this.Dimension = purchLine.Dimension;
# this.PartDelivery = (purchLine.PurchReceivedNow != purchLine.PurchQty);
# this.ReturnActionId = purchLine.ReturnActionId;
# this.TransactionCode = purchLine.TransactionCode;
# this.DeliveryDate = purchLine.deliveryDate();
# this.Transport = purchLine.Transport;
# this.Port = purchLine.Port;
# this.StatProcId = purchLine.StatProcId;
# this.InventRefType = purchLine.ItemRefType;
# this.InventRefId = purchLine.InventRefId;
# this.InventRefTransId = purchLine.InventRefTransId;
# this.InterCompanyInventTransId = purchLine.InterCompanyInventTransId;
#
# this.Ordered = purchLine.PurchQty - purchLine.receivedInTotal();
# this.Ordered = sign(purchLine.PurchQty) < 0 ? min(0.0, this.Ordered) : max(0.0, this.Ordered);
#
# if (isConfigurationkeyEnabled(configurationkeynum(TradeMultiShipTo)))
# {
#
# this.DestState = purchLine.DeliveryState;
# this.DestCountryRegionId = purchLine.DeliveryCountryRegionId;
# this.DestCounty = purchLine.DeliveryCounty;
#
# }
# else
# {
# this.initFromPurchTable(purchLine.purchTable());
# }
#
#}
#
ENDSOURCE
SOURCE #initFromPurchParmTable
#void initFromPurchParmTable(PurchParmTable _purchParmTable)
#{
# this.InventDate = _purchParmTable.TransDate;
#}
ENDSOURCE
SOURCE #initFromPurchTable
#void initFromPurchTable(PurchTable purchTable)
#{
# ;
# this.DestState = purchTable.DlvState;
# this.DestCountryRegionId = purchTable.DlvCountryRegionId;
# this.DestCounty = purchTable.DlvCounty;
#}
ENDSOURCE
SOURCE #InitFromVendPackingSlipJour
#void initFromVendPackingSlipJour(VendPackingSlipJour vendPackingSlipJour)
#{
# ;
# this.PurchId = vendPackingSlipJour.PurchId;
# this.PackingSlipId = vendPackingSlipJour.PackingSlipId;
# this.DeliveryDate = vendPackingSlipJour.DeliveryDate;
# this.NumberSequenceGroup = vendPackingSlipJour.NumberSequenceGroup;
#}
ENDSOURCE
SOURCE #interCompanySourceTable
#Common interCompanySourceTable(boolean interCompanySource = true)
#{;
# if (interCompanySource)
# return SalesLine::findInventTransId(this.InterCompanyInventTransId).salesTable();
# else
# return SalesLine::findInventTransId(this.InventRefTransId).salesTable();
#}
#
ENDSOURCE
SOURCE #inventDate
#server TransDate inventDate()
#{
# InventTrans inventTrans;
# ;
#
# select firstonly inventTrans
# where inventTrans.InventTransId == this.InventTransId &&
# inventTrans.DatePhysical == this.DeliveryDate &&
# inventTrans.PackingSlipId == this.PackingSlipId;
#
# if (!inventTrans.RecId)
# {
# select firstonly inventTrans
# where inventTrans.InventTransId == this.InventTransId &&
# inventTrans.PackingSlipId == this.PackingSlipId;
# }
#
# if (inventTrans.RecId)
# return inventTrans.DatePhysical;
#
# return this.DeliveryDate;
#}
ENDSOURCE
SOURCE #InventDim
#InventDim inventDim(boolean update = false)
#{
# return InventDim::find(this.InventDimId, update);
#}
ENDSOURCE
SOURCE #InventQty
#server InventQty inventQty()
#{
# InventQty qty;
# InventTrans inventTrans;
# ;
#
# while select sum(Qty) from inventTrans
# where inventTrans.InventTransId == this.InventTransId &&
# inventTrans.DatePhysical == this.InventDate &&
# inventTrans.PackingSlipId == this.PackingSlipId &&
# inventTrans.Qty != 0 &&
# inventTrans.PackingSlipReturned == 0
# {
# qty += inventTrans.Qty;
# }
#
# return qty;
#}
ENDSOURCE
SOURCE #invoicedInventQty
#///
#/// Returns the invoiced quantity in inventory U of M for the current record.
#///
#///
#/// The total invoiced quantity in inventory U of M for the current record.
#///
#public InventQty invoicedInventQty()
#{
# //Given a PSline, how many are invoiced in invent U of m
# VendPackingSlipJour vendPackingSlipJour = this.vendPackingslipJour();
# InventTrans inventTrans;
# ;
#
# select sum(Qty) from inventTrans
# where inventTrans.PackingSlipId == this.PackingSlipId &&
# inventTrans.InventTransId == this.InventTransId &&
# inventTrans.VoucherPhysical == vendPackingSlipJour.LedgerVoucher &&
# inventTrans.Voucher; //Invoice ledger voucher
#
# return inventTrans.Qty;
#}
#
ENDSOURCE
SOURCE #invoicedPurchQty
#///
#/// Returns the invoiced quantity in purchasing U of M for the current record.
#///
#///
#/// The total invoiced quantity in purchasing U of M for the current record.
#///
#public PurchQty invoicedPurchQty()
#{
# //Given a PSline, how many are invoiced in purch U of m
# VendPackingSlipJour vendPackingSlipJour = this.vendPackingslipJour();
# InventTrans inventTrans;
# PurchQty purchQty;
# ;
#
# select sum(Qty) from inventTrans
# where inventTrans.PackingSlipId == this.PackingSlipId &&
# inventTrans.InventTransId == this.InventTransId &&
# inventTrans.VoucherPhysical == vendPackingSlipJour.LedgerVoucher &&
# inventTrans.Voucher; //Invoice ledger voucher
#
# purchQty = inventTrans.Qty;
#
# select firstonly * from inventTrans
# where inventTrans.PackingSlipId == this.PackingSlipId &&
# inventTrans.InventTransId == this.InventTransId &&
# inventTrans.VoucherPhysical == vendPackingSlipJour.LedgerVoucher &&
# inventTrans.Voucher; //Invoice ledger voucher
#
# return UnitConvert::qty(purchQty, inventTrans.inventUnit(),this.purchLine().PurchUnit, this.ItemId);
#}
#
ENDSOURCE
SOURCE #isReserved
#///
#/// Determines whether current record is reserved by an invoice line.
#///
#///
#/// true if current record is reserved; otherwise, false.
#///
#public boolean isReserved()
#{
# VendInvoiceInfoSubLine vendInvoiceInfoSubLine;
# PurchParmSubLine purchParmSubLine;
# ;
#
# select firstonly RecId from vendInvoiceInfoSubLine
# where
# vendInvoiceInfoSubLine.JournalRefTableId == this.TableId &&
# vendInvoiceInfoSubLine.JournalRefRecId == this.RecId;
#
# if (vendInvoiceInfoSubLine.RecId != 0)
# {
# return true;
# }
#
# select firstonly RecId from purchParmSubLine
# where
# purchParmSubLine.JournalRefTableId == this.TableId &&
# purchParmSubLine.JournalRefRecId == this.RecId;
#
# if (purchParmSubLine.RecId != 0)
# {
# return true;
# }
#
# return false;
#}
#
ENDSOURCE
SOURCE #isReservedbyOtherPurchParmLine
#///
#/// Determines whether current record is reserved by a different PurchParmLine exclusive of the provided PurchParmLine.
#///
#///
#/// records beloning to the given redId will be left out of the calculation;
#///
#///
#/// true if current record is reserved by a different PurchParmLine; otherwise, false.
#///
#public boolean isReservedbyOtherPurchParmLine(recId _excludeRecId)
#{
# PurchParmSubLine purchParmSubLine;
# ;
#
# select firstonly RecId from purchParmSubLine
# where
# purchParmSubLine.JournalRefTableId == this.TableId &&
# purchParmSubLine.JournalRefRecId == this.RecId &&
# purchParmSubLine.LineRefRecId != _excludeRecId;
#
# if (purchParmSubLine.RecId != 0)
# {
# return true;
# }
#
# return false;
#}
#
ENDSOURCE
SOURCE #itemName
#//BP Deviation Documented
#display ItemNameDisplay itemName()
#{
# return InventTable::find(this.ItemId).itemName(this.inventDim());
#}
#
ENDSOURCE
SOURCE #purchLine
#PurchLine purchLine(boolean _update = false)
#{
# return PurchLine::findInventTransId(this.InventTransId, _update);
#}
#
ENDSOURCE
SOURCE #purchUnitTxt
#//BP Deviation Documented
#display UnitIDTxt purchUnitTxt()
#{
# VendPackingSlipJour vendPackingSlipJour = this.vendPackingslipJour();
# PurchTable purchTable;
# VendTable vendTable;
# ;
#
# if (vendPackingSlipJour.LanguageId)
# return UnitTxt::languageUnitId(this.PurchUnit, vendPackingSlipJour.LanguageId);
#
# purchTable = PurchTable::find(this.PurchId);
# if (purchTable.LanguageId)
# return UnitTxt::languageUnitId(this.PurchUnit, purchTable.LanguageId);
#
# vendTable = VendTable::find(this.vendPackingslipJour().InvoiceAccount);
# if (vendTable.LanguageId)
# return UnitTxt::languageUnitId(this.PurchUnit, vendTable.LanguageId);
#
# return UnitTxt::languageUnitId(this.PurchUnit);
#}
#
#
#
#
ENDSOURCE
SOURCE #remainInventFinancial
#///
#/// Returns the remaining invoiced quantity in inventory U of M for the current record.
#///
#///
#/// records beloning to the given parmId will be left out of the calculation; optional
#///
#///
#/// The total remaining invoiced quantity for the current packing slip expressed in inventory U of M.
#///
#
#//BP Deviation Documented
#display InventQty remainInventFinancial(ParmId _excludeParmId = '')
#{
# ;
#
# return this.InventQty - this.invoicedInventQty() - this.unpostedInvoiceInventQty(_excludeParmId);
#
#}
ENDSOURCE
SOURCE #remainPurchFinancial
#///
#/// Returns the remaining invoiced quantity in purchasing U of M for the current record.
#///
#///
#/// records beloning to the given parmId will be left out of the calculation; optional
#///
#///
#/// The total remaining invoiced quantity for the current packing slip expressed in purchasing U of M.
#///
#
#//BP Deviation Documented
#display PurchQty remainPurchFinancial(ParmId _excludeParmId = '')
#{
# ;
#
# return this.Qty - this.invoicedPurchQty() - this.unpostedInvoicePurchQty(_excludeParmId);
#
#}
ENDSOURCE
SOURCE #setLinenum
#void setLinenum(LineNum lineNum)
#{
# this.LineNum = lineNum;
#}
ENDSOURCE
SOURCE #unpostedInvoiceInventQty
#///
#/// Returns the unposted invoiced quantity in inventory U of M for the current record.
#///
#///
#/// A parmId value that identifies the records that are to be excluded from the calculation; optional.
#///
#///
#/// The total unposted invoiced quantity for the current packing slip expressed in inventory U of M.
#///
#// BP deviation documented
#public display UnpostedInvoiceInventQty unpostedInvoiceInventQty(ParmId _excludeParmId = '')
#{
# return this.unpostedInvoiceInventQtyServer(_excludeParmId);
#}
#
ENDSOURCE
SOURCE #unpostedInvoiceInventQtyServer
#private server UnpostedInvoiceInventQty unpostedInvoiceInventQtyServer(ParmId _excludeParmId = '')
#{
# PurchParmTable purchParmTable;
# PurchParmLine purchParmLine;
# PurchParmSubLine purchParmSubLine;
# VendInvoiceInfoLine vendInvoiceInfoLine;
# VendInvoiceInfoSubLine vendInvoiceInfoSubLine;
# UnpostedInvoiceInventQty unpostedInvoiceInventQty;
# ;
#
# // Includes unposted invoices saved in batches or in the process of being edited as well as those actually saved as pending.
#
# // Total the quantity from PurchParm* first
# select sum(InventNow) from purchParmSubLine
# where purchParmSubLine.JournalRefTableId == this.TableId &&
# purchParmSubLine.JournalRefRecId == this.RecId &&
# (!_excludeParmId || purchParmSubLine.ParmId != _excludeParmId)
# exists join purchParmLine
# where purchParmLine.RecId == purchParmSubLine.LineRefRecId
# exists join purchParmTable
# where purchParmTable.ParmId == purchParmLine.ParmId &&
# purchParmTable.TableRefId == purchParmLine.TableRefId &&
# (purchParmTable.Ordering == DocumentStatus::Invoice ||
# purchParmTable.Ordering == DocumentStatus::ApproveJournal) &&
# purchParmTable.ParmJobStatus == ParmJobStatus::Waiting;
#
# unpostedInvoiceInventQty = purchParmSubLine.InventNow;
#
#
# // Add in the quantity from VendInvoiceInfo* but don't include the quantity that is duplicated by PurchParm*
# purchParmLine = null;
# select sum(InventNow) from vendInvoiceInfoSubLine
# where vendInvoiceInfoSubLine.JournalRefRecId == this.RecId &&
# vendInvoiceInfoSubLine.JournalRefTableId == this.TableId
# exists join vendInvoiceInfoLine
# where vendInvoiceInfoLine.RecId == vendInvoiceInfoSubLine.LineRefRecId
# notexists join purchParmLine
# where purchParmLine.InvoiceInfoTableRefId == vendInvoiceInfoLine.TableRefId;
#
# unpostedInvoiceInventQty += vendInvoiceInfoSubLine.InventNow;
#
# return unpostedInvoiceInventQty;
#}
ENDSOURCE
SOURCE #unpostedInvoicePurchQty
#///
#/// Returns the unposted invoiced quantity in purchasing U of M for the current record.
#///
#///
#/// A parmId value that identifies the records that are to be excluded from the calculation; optional.
#///
#///
#/// The total unposted invoiced quantity for the current packing slip expressed in purchasing U of M.
#///
#// BP deviation documented
#public display UnpostedInvoicePurchQty unpostedInvoicePurchQty(ParmId _excludeParmId = '')
#{
# return this.unpostedInvoicePurchQtyServer(_excludeParmId);
#}
ENDSOURCE
SOURCE #unpostedInvoicePurchQtyServer
#private server UnpostedInvoicePurchQty unpostedInvoicePurchQtyServer(ParmId _excludeParmId = '')
#{
# PurchParmTable purchParmTable;
# PurchParmLine purchParmLine;
# PurchParmSubLine purchParmSubLine;
# VendInvoiceInfoLine vendInvoiceInfoLine;
# VendInvoiceInfoSubLine vendInvoiceInfoSubLine;
# UnpostedInvoicePurchQty unpostedInvoicePurchQty;
# ;
#
# // Includes unposted invoices saved in batches or in the process of being edited as well as those actually saved as pending.
#
# // Total the quantity from PurchParm* first
# select sum(ReceiveNow) from purchParmSubLine
# where purchParmSubLine.JournalRefTableId == this.TableId &&
# purchParmSubLine.JournalRefRecId == this.RecId &&
# (!_excludeParmId || purchParmSubLine.ParmId != _excludeParmId)
# exists join purchParmLine
# where purchParmLine.RecId == purchParmSubLine.LineRefRecId
# exists join purchParmTable
# where purchParmTable.ParmId == purchParmLine.ParmId &&
# purchParmTable.TableRefId == purchParmLine.TableRefId &&
# (purchParmTable.Ordering == DocumentStatus::Invoice ||
# purchParmTable.Ordering == DocumentStatus::ApproveJournal) &&
# purchParmTable.ParmJobStatus == ParmJobStatus::Waiting;
#
# unpostedInvoicePurchQty = purchParmSubLine.ReceiveNow;
#
#
# // Add in the quantity from VendInvoiceInfo* but don't include the quantity that is duplicated by PurchParm*
# purchParmLine = null;
# select sum(ReceiveNow) from vendInvoiceInfoSubLine
# where vendInvoiceInfoSubLine.JournalRefRecId == this.RecId &&
# vendInvoiceInfoSubLine.JournalRefTableId == this.TableId
# exists join vendInvoiceInfoLine
# where vendInvoiceInfoLine.RecId == vendInvoiceInfoSubLine.LineRefRecId
# notexists join purchParmLine
# where purchParmLine.InvoiceInfoTableRefId == vendInvoiceInfoLine.TableRefId;
#
# unpostedInvoicePurchQty += vendInvoiceInfoSubLine.ReceiveNow;
#
# return unpostedInvoicePurchQty;
#}
ENDSOURCE
SOURCE #VendPackingslipJour
#VendPackingSlipJour vendPackingslipJour(boolean update = false)
#{
# return VendPackingSlipJour::findFromVendPackingSlipTrans(this.PurchId, this.PackingSlipId, this.DeliveryDate, this.InternalPackingSlipId,update);
#}
ENDSOURCE
SOURCE #findRecId
#static VendPackingSlipTrans findRecId(recId _recId,
# boolean _forUpdate = false)
#{
# VendPackingSlipTrans vendPackingSlipTrans;
# ;
#
# vendPackingSlipTrans.selectForUpdate(_forUpdate);
#
# select vendPackingSlipTrans
# where vendPackingSlipTrans.RecId == _recId;
#
# return vendPackingSlipTrans;
#}
ENDSOURCE
ENDMETHODS
ENDTABLE
en-us
Vendor - Packing slip lines
@SYS55350
0
0
he
ספק - שורות תעודת משלוח
@SYS55350
0
0
en-us
The VendPackingSlipTrans table contains posted packing slip lines.
{locked}
@SYS124495
0
0
he
The VendPackingSlipTrans table contains posted packing slip lines.
{locked}
@SYS124495
0
0
en-us
Delivery date
@SYS16056
0
0
he
תאריך מסירה
@SYS16056
0
0
en-us
Country/region for delivery
@SYS17952
0
0
he
מדינה/אזור למשלוח
@SYS17952
0
0
en-us
Item
@SYS7407
0
0
he
פריט
@SYS7407
0
0
en-us
Description
@SYS6303
0
0
he
תיאור
@SYS6303
0
0
en-us
Ordered
@SYS16279
0
0
he
הוזמן
@SYS16279
0
0
en-us
Received
@SYS4465
0
0
he
התקבל/ו
@SYS4465
0
0
en-us
Remaining quantity
Pertains to the meaning of remaining numbers
@SYS8459
0
0
he
כמות שנותרה
Pertains to the meaning of remaining numbers
@SYS8459
0
0
en-us
Purchaser
@SYS16389
0
0
he
רוכש
@SYS16389
0
0
en-us
Value %1
@SYS13685
0
0
he
ערך %1
@SYS13685
0
0
en-us
Purchase that the current line is attached to.
@SYS8544
0
0
he
הרכישה שאליה מצורפת השורה הנוכחית.
@SYS8544
0
0
en-us
Trade
@SYS17877
0
0
he
סחר
@SYS17877
0
0
en-us
Specify transaction code for the current order line.
@SYS17887
0
0
he
ציין קוד תנועה עבור שורת ההזמנה הנוכחית.
@SYS17887
0
0
en-us
Specify state for delivery of the item
@SYS17958
0
0
he
ציין מדינה למסירת הפריט
@SYS17958
0
0
en-us
Inventory date
@SYS54350
0
0
he
תאריך מלאי
@SYS54350
0
0
en-us
Date of inventory transactions
@SYS62388
0
0
he
תאריך תנועות מלאי
@SYS62388
0
0
en-us
Amount
@SYS12227
0
0
he
סכום
@SYS12227
0
0
en-us
BUS fields Israel
@BPL141
0
0
he
שדות ישראל BUS
@BPL141
0
0
en-us
Dimension
@SYS14926
0
0
he
ממד
@SYS14926
0
0
en-us
Foreign trade
@SYS27650
0
0
he
סחר חוץ
@SYS27650
0
0
en-us
Intercompany
Intercompany used in the sense 'intra-group'.
@SYS74106
0
0
he
בין-חברתי
Intercompany used in the sense 'intra-group'.
@SYS74106
0
0
en-us
Inventory
@SYS981
0
0
he
מלאי
@SYS981
0
0
en-us
Packing slip
@SYS11549
0
0
he
תעודת משלוח
@SYS11549
0
0
en-us
Price
@SYS11865
0
0
he
מחיר
@SYS11865
0
0
en-us
Purchase lines
@SYS9664
0
0
he
שורות רכישה
@SYS9664
0
0
en-us
Purchase quantity
@SYS11187
0
0
he
כמות רכישה
@SYS11187
0
0
en-us
Reference
Used very many places, among other as book title in the online help system.
@SYS15217
0
0
he
אסמכתא
Used very many places, among other as book title in the online help system.
@SYS15217
0
0
en-us
Table group
@SYS21958
0
0
he
קבוצת טבלאות
@SYS21958
0
0
***Element: DBT
; Microsoft Dynamics AX Table : BPLImpLinesTrans unloaded
; --------------------------------------------------------------------------------
TABLEVERSION 1
TABLE #BPLImpLinesTrans
Id 20007
PROPERTIES
Name #BPLImpLinesTrans
ConfigurationKey #CRSEIsrael
SecurityKey #VendTables
TableGroup #Transaction
PrimaryIndex #ImpLineTransIdx
ClusterIndex #ImpLineTransIdx
ENDPROPERTIES
FIELDS
FIELD #ImpLineRecId
Id 20001
INT64
PROPERTIES
Name #ImpLineRecId
Table #BPLImpLinesTrans
ExtendedDataType
ARRAY
#recId
#
ENDARRAY
ENDPROPERTIES
FIELD #TransRecId
Id 20002
INT64
PROPERTIES
Name #TransRecId
Table #BPLImpLinesTrans
ExtendedDataType
ARRAY
#recId
#
ENDARRAY
ENDPROPERTIES
FIELD #TransTableId
Id 20003
INT
PROPERTIES
Name #TransTableId
Table #BPLImpLinesTrans
ExtendedDataType
ARRAY
#tableId
#
ENDARRAY
ENDPROPERTIES
ENDFIELDS
GROUPS
GROUP #Identification
PROPERTIES
Name #Identification
Label #@SYS36186
ENDPROPERTIES
GROUPFIELDS
#TransTableId
#ImpLineRecId
#TransRecId
ENDGROUPFIELDS
ENDGROUP
ENDGROUPS
INDICES
#ImpLineTransIdx
Id 20001
PROPERTIES
Name #ImpLineTransIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#ImpLineRecId
#TransTableId
#TransRecId
ENDINDEXFIELDS
ENDINDICES
REFERENCES
ENDREFERENCES
DELETEACTIONS
ENDDELETEACTIONS
METHODS
Version: 3
SOURCE #findByImpRecId
#public static BPLImpLinesTrans findByImpRecId (RecId _ImpLineRecId, boolean _forupdate = false)
#{
# BPLImpLinesTrans BPLImpLinesTrans;
# ;
# if (_ImpLineRecId)
# {
# BPLImpLinesTrans.selectForUpdate(_forupdate);
# select firstOnly BPLImpLinesTrans
# index ImpLineTransIdx
# where BPLImpLinesTrans.ImpLineRecId == _ImpLineRecId;
# }
#
# return BPLImpLinesTrans;
#}
ENDSOURCE
ENDMETHODS
ENDTABLE
en-us
Identification
@SYS36186
0
0
he
זיהוי
@SYS36186
0
0
***Element: DBT
; Microsoft Dynamics AX Table : BPLImpFolderLine unloaded
; --------------------------------------------------------------------------------
TABLEVERSION 1
TABLE #BPLImpFolderLine
Id 20004
PROPERTIES
Name #BPLImpFolderLine
Label #@BPL63
ConfigurationKey #CRSEIsrael
SecurityKey #VendTables
TableGroup #WorksheetLine
PrimaryIndex #FolderPurchIdx
ClusterIndex #FolderPurchIdx
ModifiedDateTime #Yes
ModifiedBy #Yes
CreatedDateTime #Yes
CreatedBy #Yes
ENDPROPERTIES
FIELDS
FIELD #FolderId
Id 20001
STRING
PROPERTIES
Name #FolderId
Table #BPLImpFolderLine
ExtendedDataType
ARRAY
#BPLImpFolderId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #InventTransId
Id 20002
STRING
PROPERTIES
Name #InventTransId
Table #BPLImpFolderLine
ExtendedDataType
ARRAY
#InventTransId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #Qty
Id 20003
REAL
PROPERTIES
Name #Qty
Table #BPLImpFolderLine
ExtendedDataType
ARRAY
#BPLImpLineQty
#
ENDARRAY
ENDPROPERTIES
FIELD #PSlipRecId
Id 20004
INT64
PROPERTIES
Name #PSlipRecId
Table #BPLImpFolderLine
ExtendedDataType
ARRAY
#recId
#
ENDARRAY
ENDPROPERTIES
FIELD #AllocationPercent
Id 20005
REAL
PROPERTIES
Name #AllocationPercent
Table #BPLImpFolderLine
ExtendedDataType
ARRAY
#BPLAllocationPercent
#
ENDARRAY
ENDPROPERTIES
FIELD #AllocationAmount
Id 20006
REAL
PROPERTIES
Name #AllocationAmount
AllowEditOnCreate #No
AllowEdit #No
Table #BPLImpFolderLine
ExtendedDataType
ARRAY
#BPLAllocationAmount
#
ENDARRAY
ENDPROPERTIES
FIELD #AllocationCur
Id 20007
STRING
PROPERTIES
Name #AllocationCur
AllowEditOnCreate #No
AllowEdit #No
Table #BPLImpFolderLine
ExtendedDataType
ARRAY
#CurrencyCode
#
ENDARRAY
StringSize #3
ENDPROPERTIES
ENDFIELDS
GROUPS
GROUP #Identification
PROPERTIES
Name #Identification
Label #@SYS36186
ENDPROPERTIES
GROUPFIELDS
#FolderId
#InventTransId
ENDGROUPFIELDS
ENDGROUP
ENDGROUPS
INDICES
#FolderPurchIdx
Id 20001
PROPERTIES
Name #FolderPurchIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#FolderId
#InventTransId
ENDINDEXFIELDS
#InventTransIdx
Id 20002
PROPERTIES
Name #InventTransIdx
ENDPROPERTIES
INDEXFIELDS
#InventTransId
ENDINDEXFIELDS
ENDINDICES
REFERENCES
REFERENCE #LinesTrans
PROPERTIES
Name #LinesTrans
Table #BPLImpLinesTrans
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #RecId
RelatedField #ImpLineRecId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
ENDREFERENCES
DELETEACTIONS
#BPLImpLinesTrans
PROPERTIES
Table #BPLImpLinesTrans
DeleteAction #Cascade
ENDPROPERTIES
ENDDELETEACTIONS
METHODS
Version: 3
SOURCE #BPLDisplFolderAndQty
#display str 40 BPLDisplFolderAndQty()
#{
# ;
# return strfmt("@BPL62",this.folderId);
#}
ENDSOURCE
SOURCE #calcLineAmount
#display AmountCur calcLineAmount()
#{
# return PurchLine::findInventTransId(this.InventTransId).calcLineAmount(this.Qty);
#}
ENDSOURCE
SOURCE #delete
#public void delete()
#{
# super();
#
# this.UpdClosedPurchLine();
#}
ENDSOURCE
SOURCE #firstPurchLine
#PurchLine firstPurchLine()
#{
# PurchLine purchLine;
# BPLImpFolderLine impFolderLine;
# ;
#
# select firstonly impFolderLine
# where impFolderLine.FolderId == this.FolderId
# join purchLine
# where purchLine.InventTransId == impFolderLine.InventTransId
# && purchLine.BPLAppCharge == NoYes::No;
#
# return purchLine;
#}
ENDSOURCE
SOURCE #grossVolume
#// 04/08/2010-SSN-BPLImportFolder
#display Volume grossVolume()
#{
# return this.TransQty() * InventTable::find(PurchLine::findInventTransId(this.InventTransId).ItemId).grossVolume();
#}
ENDSOURCE
SOURCE #grossWeight
#display ItemGrossWeight grossWeight()
#{
# return this.TransQty() * InventTable::find(PurchLine::findInventTransId(this.InventTransId).ItemId).grossWeight();
#}
#
ENDSOURCE
SOURCE #insert
#public void insert()
#{
# super();
#
# this.UpdClosedPurchLine();
#}
ENDSOURCE
SOURCE #lineAmountMST
#display AmountMST lineAmountMST()
#{
# AmountMST amountMST;
# BPLImpLinesTrans impLinesTrans;
# VendPackingSlipTrans vendPackingSlipTrans
# ;
# select sum(ValueMST) from vendPackingSlipTrans
# join impLinesTrans
# where impLinesTrans.TransRecId == vendPackingSlipTrans.RecId
# && impLinesTrans.ImpLineRecId == this.RecId;
#
# return vendPackingSlipTrans.ValueMST;
#}
ENDSOURCE
SOURCE #QtyInTheWay
#display public BPLImpLineQty QtyInTheWay()
#{
# ;
# return this.Qty - this.TransQty();
#}
ENDSOURCE
SOURCE #TransQty
#display PurchDeliveredQty TransQty()
#{
# return BPLImpFolderLine::getTransQty(this.RecId);
#}
ENDSOURCE
SOURCE #update
#public void update()
#{
# super();
#
# this.UpdClosedPurchLine();
#}
ENDSOURCE
SOURCE #UpdClosedPurchLine
#void UpdClosedPurchLine()
#{
# PurchLine purchLine;
# ;
# purchLine = PurchLine::findInventTransId(this.InventTransId, true);
# if (purchLine)
# {
# ttsbegin;
#
# if (purchLine.BPLImpLineQtyRemain() == 0)
# purchLine.BPLClosedToImpFolder = NoYes::Yes;
# else
# purchLine.BPLClosedToImpFolder = NoYes::No;
# purchLine.update();
# ttscommit;
# }
#}
ENDSOURCE
SOURCE #find
#static BPLImpFolderLine find(InventTransId _InventTransId, BPLImpFolderId _impFolderId, boolean _forupdate = false)
#{
# BPLImpFolderLine ImpFolderLine;
#
# if (_InventTransId && _impfolderid)
# {
# ImpFolderLine.selectForUpdate(_forupdate);
# select firstonly ImpFolderLine
# index FolderPurchIdx
# where ImpFolderLine.FolderId == _impfolderid &&
# ImpFolderLine.InventTransId == _InventTransId;
# }
#
# return ImpFolderLine;
#}
ENDSOURCE
SOURCE #findInventTransId
#// 04/08/2010-SH-BPLImportFolder
#static BPLImpFolderLine findInventTransId(InventTransId _InventTransId, boolean _forupdate = false)
#{
# BPLImpFolderLine ImpFolderLine;
#
# if (_InventTransId)
# {
# ImpFolderLine.selectForUpdate(_forupdate);
# select firstonly ImpFolderLine
# index InventTransIdx
# where ImpFolderLine.InventTransId == _InventTransId;
# }
#
# return ImpFolderLine;
#}
ENDSOURCE
SOURCE #getTransQty
#public static PurchDeliveredQty GetTransQty(RecId _impRecId)
#{
# VendPackingSlipTrans vendPackingSlipTrans;
# BPLImpLinesTrans impLinesTrans;
# ;
# select sum(Qty) from vendPackingSlipTrans
# join impLinesTrans
# index ImpLineTransIdx
# where impLinesTrans.ImpLineRecId == _impRecId
# && impLinesTrans.TransTableId == vendPackingSlipTrans.TableId
# && impLinesTrans.TransRecId == vendPackingSlipTrans.RecId;
#
# return vendPackingSlipTrans.Qty;
#}
#
ENDSOURCE
SOURCE #InsertImpFolderLine
#static void InsertImpFolderLine(InventTransId _InventTransId, BPLImpFolderId _impFolderId, BPLImpLineQty _impQty)
#{
# BPLImpFolderLine ImpFolderLine;
#
# if (_InventTransId && _impFolderId && ! BPLImpFolderLine::find(_InventTransId,_impFolderId))
# {
# ImpFolderLine.clear();
# ImpFolderLine.InventTransId = _InventTransId;
# ImpFolderLine.FolderId = _impfolderid;
# ImpFolderLine.Qty = _impQty;
# ImpFolderLine.insert();
# }
#
# return;
#}
ENDSOURCE
SOURCE #SumQtyInTheWay
#static public BPLImpLineQty SumQtyInTheWay(InventTransId _InventTransId)
#{
# BPLImpFolderLine BPLImpFolderLine;
# Amount qty;
# PurchDeliveredQty qtyTrans;
# ;
# while select * from BPLImpFolderLine
# index hint InventTransIdx
# where BPLImpFolderLine.InventTransId == _InventTransId
# {
# qty += BPLImpFolderLine.Qty;
# qtyTrans += BPLImpFolderLine::getTransQty(BPLImpFolderLine.RecId);
# }
# return qty - qtyTrans;
#}
ENDSOURCE
ENDMETHODS
ENDTABLE
en-us
Import portfolios lines
@BPL63
0
0
he
שורות תיקי יבוא
@BPL63
0
0
en-us
Identification
@SYS36186
0
0
he
זיהוי
@SYS36186
0
0
en-us
===== Import portfolios : %1
@BPL62
0
0
he
תיק יבוא : %1 =====
@BPL62
0
0
***Element: DBT
; Microsoft Dynamics AX Table : BPLChangeDlvReasonHistory unloaded
; --------------------------------------------------------------------------------
TABLEVERSION 1
TABLE #BPLChangeDlvReasonHistory
Id 20002
PROPERTIES
Name #BPLChangeDlvReasonHistory
Label #@BPL29
TitleField1 #PurchId
TitleField2 #createdDateTime
ConfigurationKey #CRSEIsrael
SecurityKey #VendTables
MaxAccessMode #View
PrimaryIndex #BPLChangeDlvReasonHistoryIdx
ClusterIndex #BPLChangeDlvReasonHistoryIdx
ModifiedDateTime #Yes
ModifiedBy #Yes
ENDPROPERTIES
FIELDS
FIELD #PurchId
Id 20001
STRING
PROPERTIES
Name #PurchId
Mandatory #Yes
AllowEdit #No
Table #BPLChangeDlvReasonHistory
ExtendedDataType
ARRAY
#PurchId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #LineNum
Id 20002
REAL
PROPERTIES
Name #LineNum
Table #BPLChangeDlvReasonHistory
ExtendedDataType
ARRAY
#LineNum
#
ENDARRAY
ENDPROPERTIES
FIELD #OldDeliveryDate
Id 20003
DATE
PROPERTIES
Name #OldDeliveryDate
HelpText #Pre value
Table #BPLChangeDlvReasonHistory
ExtendedDataType
ARRAY
#DlvDate
#
ENDARRAY
ENDPROPERTIES
FIELD #OldVendorConfirmedDlvDate
Id 20004
DATE
PROPERTIES
Name #OldVendorConfirmedDlvDate
HelpText #Pre value
Table #BPLChangeDlvReasonHistory
ExtendedDataType
ARRAY
#BPLVendorConfirmedDlvDate
#
ENDARRAY
ENDPROPERTIES
FIELD #NewDeliveryDate
Id 20005
DATE
PROPERTIES
Name #NewDeliveryDate
HelpText #Post value
Table #BPLChangeDlvReasonHistory
ExtendedDataType
ARRAY
#DlvDate
#
ENDARRAY
ENDPROPERTIES
FIELD #NewVendorConfirmedDlvDate
Id 20006
DATE
PROPERTIES
Name #NewVendorConfirmedDlvDate
HelpText #Post value
Table #BPLChangeDlvReasonHistory
ExtendedDataType
ARRAY
#BPLVendorConfirmedDlvDate
#
ENDARRAY
ENDPROPERTIES
FIELD #ChangeDlvReasonId
Id 20007
STRING
PROPERTIES
Name #ChangeDlvReasonId
Table #BPLChangeDlvReasonHistory
ExtendedDataType
ARRAY
#BPLChangeDlvReasonId
#
ENDARRAY
ENDPROPERTIES
FIELD #NewBPLRequestedDlvDate
Id 20008
DATE
PROPERTIES
Name #NewBPLRequestedDlvDate
Table #BPLChangeDlvReasonHistory
ExtendedDataType
ARRAY
#BPLRequestedDlvDate
#
ENDARRAY
ENDPROPERTIES
FIELD #OldBPLRequestedDlvDate
Id 20009
DATE
PROPERTIES
Name #OldBPLRequestedDlvDate
Table #BPLChangeDlvReasonHistory
ExtendedDataType
ARRAY
#BPLRequestedDlvDate
#
ENDARRAY
ENDPROPERTIES
ENDFIELDS
GROUPS
GROUP #AutoReport
PROPERTIES
Name #AutoReport
ENDPROPERTIES
GROUPFIELDS
#PurchId
#LineNum
#ChangeDlvReasonId
#createdDateTime
#createdBy
ENDGROUPFIELDS
ENDGROUP
GROUP #AutoLookup
PROPERTIES
Name #AutoLookup
ENDPROPERTIES
GROUPFIELDS
#PurchId
#LineNum
#ChangeDlvReasonId
#createdDateTime
#createdBy
ENDGROUPFIELDS
ENDGROUP
GROUP #New
PROPERTIES
Name #New
Label #@SYS40496
ENDPROPERTIES
GROUPFIELDS
#NewBPLRequestedDlvDate
#NewVendorConfirmedDlvDate
#NewDeliveryDate
ENDGROUPFIELDS
ENDGROUP
GROUP #Old
PROPERTIES
Name #Old
Label #@SYS40495
ENDPROPERTIES
GROUPFIELDS
#OldBPLRequestedDlvDate
#OldVendorConfirmedDlvDate
#OldDeliveryDate
ENDGROUPFIELDS
ENDGROUP
GROUP #Reference
PROPERTIES
Name #Reference
Label #@SYS112248
ENDPROPERTIES
GROUPFIELDS
#PurchId
#LineNum
ENDGROUPFIELDS
ENDGROUP
GROUP #Update
PROPERTIES
Name #Update
Label #@SYS71207
ENDPROPERTIES
GROUPFIELDS
#ChangeDlvReasonId
#ChangeDlvReasonName
#modifiedDateTime
#modifiedBy
ENDGROUPFIELDS
ENDGROUP
ENDGROUPS
INDICES
#BPLChangeDlvReasonHistoryIdx
Id 20001
PROPERTIES
Name #BPLChangeDlvReasonHistoryIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#RecId
ENDINDEXFIELDS
ENDINDICES
REFERENCES
REFERENCE #PurchLine
PROPERTIES
Name #PurchLine
Table #PurchLine
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #LineNum
RelatedField #LineNum
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #PurchId
RelatedField #PurchId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
REFERENCE #PurchTable
PROPERTIES
Name #PurchTable
Table #PurchTable
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE THISFIXED
PROPERTIES
Table #BPLChangeDlvReasonHistory
Field #LineNum
ENDPROPERTIES
REFERENCETYPE NORMAL
PROPERTIES
Field #PurchId
RelatedField #PurchId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
ENDREFERENCES
DELETEACTIONS
ENDDELETEACTIONS
METHODS
Version: 3
SOURCE #ChangeDlvReasonName
#display Description ChangeDlvReasonName()
#{
# return BPLChangeDlvReason::find(this.ChangeDlvReasonId).Name;
#}
ENDSOURCE
SOURCE #initFromPurchLine
#void initFromPurchLine(PurchLine _oldPurchLine, PurchLine _newPurchLine)
#{
#;
# this.PurchId = _newPurchLine.PurchId;
# this.LineNum = _newPurchLine.LineNum;
# this.NewBPLRequestedDlvDate = _newPurchLine.BPLRequestedDlvDate;
# this.NewDeliveryDate = _newPurchLine.DeliveryDate;
# this.NewVendorConfirmedDlvDate = _newPurchLine.BPLVendorConfirmedDlvDate;
# this.OldBPLRequestedDlvDate = _oldPurchLine.BPLRequestedDlvDate;
# this.OldDeliveryDate = _oldPurchLine.DeliveryDate;
# this.OldVendorConfirmedDlvDate = _oldPurchLine.BPLVendorConfirmedDlvDate;
#}
ENDSOURCE
SOURCE #initFromPurchTable
#void initFromPurchTable(PurchTable _oldPurchTable, PurchTable _newPurchTable)
#{
#;
# this.PurchId = _newPurchTable.PurchId;
# this.NewDeliveryDate = _newPurchTable.BPLRequestedDlvDate;
# this.NewDeliveryDate = _newPurchTable.DeliveryDate;
# this.NewVendorConfirmedDlvDate = _newPurchTable.BPLVendorConfirmedDlvDate;
# this.OldDeliveryDate = _oldPurchTable.BPLRequestedDlvDate;
# this.OldDeliveryDate = _oldPurchTable.DeliveryDate;
# this.OldVendorConfirmedDlvDate = _oldPurchTable.BPLVendorConfirmedDlvDate;
#}
ENDSOURCE
ENDMETHODS
ENDTABLE
en-us
Change delivery history
@BPL29
0
0
he
היסטורית שנויי אספקה
@BPL29
0
0
en-us
Post value
@SYS40496
0
0
he
ערך אחרי
@SYS40496
0
0
en-us
Pre value
@SYS40495
0
0
he
ערך לפני
@SYS40495
0
0
en-us
Reference
@SYS112248
0
0
he
אסמכתא
@SYS112248
0
0
en-us
Update
@SYS71207
0
0
he
עדכון
@SYS71207
0
0
***Element: DBT
; Microsoft Dynamics AX Table : BPLChangeDlvReason unloaded
; --------------------------------------------------------------------------------
TABLEVERSION 1
TABLE #BPLChangeDlvReason
Id 20001
PROPERTIES
Name #BPLChangeDlvReason
Label #@BPL26
FormRef #BPLDelayDlvReason
ConfigurationKey #CRSEIsrael
SecurityKey #VendTables
CacheLookup #EntireTable
TableGroup #Group
ENDPROPERTIES
FIELDS
FIELD #Name
Id 20001
STRING
PROPERTIES
Name #Name
Table #BPLChangeDlvReason
ExtendedDataType
ARRAY
#Name
#
ENDARRAY
StringSize #60
ENDPROPERTIES
FIELD #ChangeDlvReasonId
Id 20002
STRING
PROPERTIES
Name #ChangeDlvReasonId
Mandatory #Yes
AllowEdit #No
Table #BPLChangeDlvReason
ExtendedDataType
ARRAY
#BPLChangeDlvReasonId
#
ENDARRAY
ENDPROPERTIES
ENDFIELDS
GROUPS
GROUP #AutoReport
PROPERTIES
Name #AutoReport
ENDPROPERTIES
GROUPFIELDS
#ChangeDlvReasonId
#Name
ENDGROUPFIELDS
ENDGROUP
GROUP #AutoLookup
PROPERTIES
Name #AutoLookup
ENDPROPERTIES
GROUPFIELDS
#ChangeDlvReasonId
#Name
ENDGROUPFIELDS
ENDGROUP
GROUP #Description
PROPERTIES
Name #Description
Label #@SYS81325
ENDPROPERTIES
GROUPFIELDS
#Name
ENDGROUPFIELDS
ENDGROUP
GROUP #Identification
PROPERTIES
Name #Identification
Label #@SYS36186
ENDPROPERTIES
GROUPFIELDS
#ChangeDlvReasonId
ENDGROUPFIELDS
ENDGROUP
ENDGROUPS
INDICES
#DelayDlvReasonIdIdx
Id 20001
PROPERTIES
Name #DelayDlvReasonIdIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#ChangeDlvReasonId
ENDINDEXFIELDS
ENDINDICES
REFERENCES
ENDREFERENCES
DELETEACTIONS
ENDDELETEACTIONS
METHODS
Version: 3
SOURCE #find
#public static BPLChangeDlvReason find(BPLChangeDlvReasonId _ChangeDlvReasonId, boolean _forUpdate = false)
#{
# BPLChangeDlvReason BPLChangeDlvReason;
# ;
#
# BPLChangeDlvReason.selectForUpdate(_forUpdate);
#
# if (_ChangeDlvReasonId)
# {
# select firstonly BPLChangeDlvReason
# where BPLChangeDlvReason.ChangeDlvReasonId == _ChangeDlvReasonId;
# }
#
# return BPLChangeDlvReason;
#}
#
ENDSOURCE
ENDMETHODS
ENDTABLE
en-us
Delivery change reasons
@BPL26
0
0
he
סיבות שינוי אספקה
@BPL26
0
0
en-us
Description
CRM business sector description
@SYS81325
0
0
he
תיאור
CRM business sector description
@SYS81325
0
0
en-us
Identification
@SYS36186
0
0
he
זיהוי
@SYS36186
0
0
***Element: DBT
; Microsoft Dynamics AX Table : BPLVendDlvLeadTime unloaded
; --------------------------------------------------------------------------------
TABLEVERSION 1
TABLE #BPLVendDlvLeadTime
Id 20009
PROPERTIES
Name #BPLVendDlvLeadTime
Label #@BPL17
FormRef #BPLVendDlvLeadTime
TitleField1 #VendAccount
TitleField2 #DlvMode
ConfigurationKey #CRSEIsrael
SecurityKey #VendTables
PrimaryIndex #BPLVendDlvLeadTimeIdx
ClusterIndex #BPLVendDlvLeadTimeIdx
ENDPROPERTIES
FIELDS
FIELD #VendAccount
Id 20001
STRING
PROPERTIES
Name #VendAccount
Mandatory #Yes
AllowEdit #No
Table #BPLVendDlvLeadTime
ExtendedDataType
ARRAY
#VendAccount
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #DlvMode
Id 20002
STRING
PROPERTIES
Name #DlvMode
Mandatory #Yes
AllowEdit #No
Table #BPLVendDlvLeadTime
ExtendedDataType
ARRAY
#VendDlvModeId
#
ENDARRAY
ENDPROPERTIES
FIELD #LeadTime
Id 20003
INT
PROPERTIES
Name #LeadTime
Mandatory #Yes
Table #BPLVendDlvLeadTime
ExtendedDataType
ARRAY
#LeadTimePurchDefault
#
ENDARRAY
ENDPROPERTIES
ENDFIELDS
GROUPS
GROUP #AutoReport
PROPERTIES
Name #AutoReport
ENDPROPERTIES
GROUPFIELDS
#VendAccount
#DlvMode
#LeadTime
ENDGROUPFIELDS
ENDGROUP
GROUP #AutoLookup
PROPERTIES
Name #AutoLookup
ENDPROPERTIES
GROUPFIELDS
#VendAccount
#DlvMode
#LeadTime
ENDGROUPFIELDS
ENDGROUP
GROUP #DlvMode
PROPERTIES
Name #DlvMode
Label #@SYS76373
ENDPROPERTIES
GROUPFIELDS
#DlvMode
#DlvModeName
ENDGROUPFIELDS
ENDGROUP
GROUP #LeadTime
PROPERTIES
Name #LeadTime
Label #@SYS14679
ENDPROPERTIES
GROUPFIELDS
#LeadTime
ENDGROUPFIELDS
ENDGROUP
GROUP #Vendor
PROPERTIES
Name #Vendor
Label #@SYS123524
ENDPROPERTIES
GROUPFIELDS
#VendAccount
#VendName
ENDGROUPFIELDS
ENDGROUP
ENDGROUPS
INDICES
#BPLVendDlvLeadTimeIdx
Id 20001
PROPERTIES
Name #BPLVendDlvLeadTimeIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#VendAccount
#DlvMode
ENDINDEXFIELDS
ENDINDICES
REFERENCES
ENDREFERENCES
DELETEACTIONS
ENDDELETEACTIONS
METHODS
Version: 3
SOURCE #DlvModeName
#display VendDlvModeName DlvModeName()
#{
# return DlvMode::find(this.DlvMode).Txt;
#}
ENDSOURCE
SOURCE #VendName
#display VendName VendName()
#{
# return VendTable::find(this.VendAccount).Name;
#}
ENDSOURCE
SOURCE #calcPurchLineDlvDate
#static PurchLineDlvDate calcPurchLineDlvDate(PurchLineDlvDate _dlvDate, PurchId _purchId)
#{
# PurchTable purchTable = PurchTable::find(_purchId);
#
# return _dlvDate + BPLVendDlvLeadTime::find(purchTable.OrderAccount, purchTable.DlvMode).LeadTime;
#}
ENDSOURCE
SOURCE #find
#public static BPLVendDlvLeadTime find(VendAccount _vendAccount, VendDlvModeId _DlvMode, boolean _forUpdate = false)
#{
# BPLVendDlvLeadTime DlvLeadTime;
# ;
#
# DlvLeadTime.selectForUpdate(_forUpdate);
#
# if (_vendAccount && _DlvMode)
# {
# select firstonly DlvLeadTime
# index hint BPLVendDlvLeadTimeIdx
# where DlvLeadTime.VendAccount ==_vendAccount && DlvLeadTime.DlvMode == _DlvMode;
# }
#
# return DlvLeadTime;
#}
#
ENDSOURCE
ENDMETHODS
ENDTABLE
en-us
Transportation lead times
@BPL17
0
0
he
זמני אספקת ההובלה
@BPL17
0
0
en-us
Delivery mode
@SYS76373
0
0
he
אופן מסירה
@SYS76373
0
0
en-us
Lead time
@SYS14679
0
0
he
זמן אספקה
@SYS14679
0
0
en-us
Vendor
{locked}
@SYS123524
0
0
he
Vendor
{locked}
@SYS123524
0
0
***Element: DBT
; Microsoft Dynamics AX Table : BPLPurchImpFolderLink unloaded
; --------------------------------------------------------------------------------
TABLEVERSION 1
TABLE #BPLPurchImpFolderLink
Id 20008
PROPERTIES
Name #BPLPurchImpFolderLink
ConfigurationKey #CRSEIsrael
SecurityKey #VendTables
ENDPROPERTIES
FIELDS
FIELD #ImpFolderId
Id 20001
STRING
PROPERTIES
Name #ImpFolderId
Table #BPLPurchImpFolderLink
ExtendedDataType
ARRAY
#BPLImpFolderId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #PurchId
Id 20002
STRING
PROPERTIES
Name #PurchId
Table #BPLPurchImpFolderLink
ExtendedDataType
ARRAY
#PurchId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
ENDFIELDS
GROUPS
ENDGROUPS
INDICES
#PurchIdImpFolderIdx
Id 20001
PROPERTIES
Name #PurchIdImpFolderIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#PurchId
#ImpFolderId
ENDINDEXFIELDS
ENDINDICES
REFERENCES
REFERENCE #PurchTable
PROPERTIES
Name #PurchTable
Table #PurchTable
ENDPROPERTIES
FIELDREFERENCES
REFERENCETYPE NORMAL
PROPERTIES
Field #PurchId
RelatedField #PurchId
ENDPROPERTIES
ENDFIELDREFERENCES
ENDREFERENCE
ENDREFERENCES
DELETEACTIONS
ENDDELETEACTIONS
METHODS
Version: 3
SOURCE #EditSelectAllLines
#edit NoYes editSelectAllLines(boolean set, BPLPurchImpFolderLink _BPLPurchImpFolderLink, NoYes _SelectAll)
#{
# NoYesId ret = NoYes::No;
# PurchId purchId = this.PurchId;
#
# if (purchId)
# {
# if (set)
# {
# BPLPurchImpFolderLink::MarkUnMarkAll(this.ImpFolderId, _SelectAll, purchId);
# ret = _SelectAll;
# }
# else
# {
# if (BPLPurchImpFolderLink::AllMarked(this.ImpFolderId, purchId))
# ret = NoYes::Yes;
# }
# }
# return ret;
#}
ENDSOURCE
SOURCE #TotalAmount
#display AmountMST totalAmount()
#{
# PurchLine MarkedLines;
# BPLImpFolderLine impFolderLine;
# ;
# select sum(AllocationAmount) from impFolderLine order by FolderId
# where impFolderLine.FolderId == this.ImpFolderId
# join MarkedLines
# where MarkedLines.InventTransId == impFolderLine.InventTransId
# && MarkedLines.BPLMarked == NoYes::Yes;
#
# return impFolderLine.AllocationAmount;
#}
ENDSOURCE
SOURCE #TotalPercent
#display BPLAllocationPercent totalPercent()
#{
# PurchLine MarkedLines;
# BPLImpFolderLine impFolderLine;
# ;
# select sum(AllocationPercent) from impFolderLine order by FolderId
# where impFolderLine.FolderId == this.ImpFolderId
# join MarkedLines
# where MarkedLines.InventTransId == impFolderLine.InventTransId
# && MarkedLines.BPLMarked == NoYes::Yes;
#
# return impFolderLine.AllocationPercent;
#}
ENDSOURCE
SOURCE #AllMarked
#static boolean AllMarked(BPLImpFolderId _impfolder, PurchId _purchId = "")
#{
# PurchLine purchLine;
# PurchLine purchLine2;
# BPLImpFolderLine impFolderLine, impFolderLine2;
#
# if (_impfolder)
# {
# if (_purchId)
# {
# select firstonly purchLine
# where purchLine.BPLMarked == NoYes::No &&
# purchLine.PurchId == _purchId &&
# !purchLine.BPLAppCharge
# join impFolderLine
# where impFolderLine.InventTransId == purchLine.InventTransId
# && impFolderLine.FolderId == _impfolder;
#
# select firstonly purchLine2
# where purchLine2.PurchId == _purchId &&
# !purchLine.BPLAppCharge
# join impFolderLine2
# where impFolderLine2.InventTransId == purchLine2.InventTransId
# && impFolderLine2.FolderId == _impfolder;
# }
# else
# {
# select firstonly purchLine
# where purchLine.BPLMarked == NoYes::No &&
# !purchLine.BPLAppCharge
# join impFolderLine
# where impFolderLine.InventTransId == purchLine.InventTransId
# && impFolderLine.FolderId == _impfolder;
# select firstonly purchLine2
# where !purchLine.BPLAppCharge
# join impFolderLine2
# where impFolderLine2.InventTransId == purchLine2.InventTransId
# && impFolderLine2.FolderId == _impfolder;
# }
# }
# return (purchLine.RecId == 0 && purchLine2.RecId != 0);
#}
ENDSOURCE
SOURCE #CalcAndShowResult
#static boolean calcAndShowResult(BPLAppChargeAllocate _method,BPLImpFolderId _folderid,PurchLine _fromPurchLine, boolean _recalcPercent = true)
#{
# PurchLine MarkedLines /*,MaxLine*/ ;
# InventTable inventTable;
# BPLImpFolderLine impFolderLine, MaxLine;
# real Total = 0;
# boolean ret = true;
# real linepercent,MaxValue,Diff;
# amountMST MaxAmount,PurchLineAmount,DiffAmount,AllAmount;
# CurrencyCode FromCurrency;
#
# if (_folderid)
# {
# // Calcul de la somme totale et remise à blanc des % sur les lignes marquées.
#
# ttsbegin;
#
# while select forupdate impFolderLine order By FolderId
# where impFolderLine.FolderId == _folderid
# join MarkedLines
# where MarkedLines.InventTransId == impFolderLine.InventTransId
# && MarkedLines.BPLMarked == NoYes::Yes
# join inventTable order by ItemId
# where inventTable.ItemId == MarkedLines.ItemId
# {
# if (_recalcPercent)
# {
# if (inventTable.grossWeight() == 0 && _method == BPLAppChargeAllocate::GrossWeight)
# {
# infolog.add(Exception::Error,strfmt("@BPL77", MarkedLines.PurchId, MarkedLines.ItemId));
# ret = false;
# break;
# }
#
# if (inventTable.grossVolume() == 0 && _method == BPLAppChargeAllocate::Volume)
# {
# infolog.add(Exception::Error,strfmt("@BPL83", MarkedLines.PurchId, MarkedLines.ItemId));
# ret = false;
# break;
# }
#
# if (impFolderLine.lineAmountMST() == 0 && _method == BPLAppChargeAllocate::NetAmount)
# {
# infolog.add(Exception::Error,strfmt("@BPL107", MarkedLines.PurchId, MarkedLines.ItemId));
# ret = false;
# break;
# }
#
# if (impFolderLine.TransQty() == 0)
# {
# infolog.add(Exception::Error,strfmt("@BPL51", MarkedLines.PurchId, MarkedLines.ItemId));
# ret = false;
# break;
# }
#
# switch (_method)
# {
# case BPLAppChargeAllocate::GrossWeight:
# Total+= impFolderLine.TransQty() * inventTable.grossWeight();
# break;
# case BPLAppChargeAllocate::NetAmount:
# Total+= impFolderLine.lineAmountMST();
# break;
# case BPLAppChargeAllocate::Volume:
# Total+= impFolderLine.TransQty() * inventTable.grossVolume();
# break;
# }
# impFolderLine.AllocationPercent = 0;
# }
# impFolderLine.AllocationAmount = 0;
# impFolderLine.doUpdate();
# }
#
# ttscommit;
#
# if (ret)
# {
# // Calcul des pourcentages et des montants pour chaque ligne
#
# Diff = 100;
# MaxValue = -1;
# FromCurrency = _fromPurchLine.CurrencyCode;
# PurchLineAmount = _fromPurchLine.LineAmount;
# DiffAmount = PurchLineAmount;
# MaxAmount = -1;
#
# ttsbegin;
#
# while select forupdate impFolderLine order By FolderId
# where impFolderLine.FolderId == _folderid
# join MarkedLines
# where MarkedLines.InventTransId == impFolderLine.InventTransId
# && MarkedLines.BPLMarked == NoYes::Yes
# join inventTable order by ItemId
# where inventTable.ItemId == MarkedLines.ItemId
# {
# if (_recalcPercent)
# {
# switch (_method)
# {
# case BPLAppChargeAllocate::GrossWeight:
# LinePercent = decround((impFolderLine.TransQty() * inventTable.grossWeight() * 100) / Total,2);
# break;
# case BPLAppChargeAllocate::NetAmount:
# LinePercent = decround((impFolderLine.lineAmountMST() * 100) / Total,2);
# break;
# case BPLAppChargeAllocate::Volume:
# LinePercent = decround((impFolderLine.TransQty() * inventTable.grossVolume() * 100) / Total,2);
# break;
# }
#
# impFolderLine.AllocationPercent = LinePercent;
# }
# else
# {
# LinePercent = impFolderLine.AllocationPercent;
# }
#
# AllAmount = (PurchLineAmount * LinePercent) / 100;
# impFolderLine.AllocationAmount = Currency::amount(AllAmount,FromCurrency);
# impFolderLine.AllocationCur = FromCurrency;
# impFolderLine.doUpdate();
#
# Diff -= LinePercent;
# DiffAmount -= AllAmount;
#
# if (LinePercent > MaxValue)
# {
# MaxValue = LinePercent;
# MaxLine.data(impFolderLine);
# }
# }
#
# if (DiffAmount != 0)
# {
# impFolderLine = BPLImpFolderLine::find(MaxLine.InventTransId,MaxLine.FolderId,true);
#
# impFolderLine.AllocationPercent += Diff;
# impFolderLine.AllocationAmount += Currency::amount(DiffAmount,FromCurrency);
# impFolderLine.doUpdate();
# }
#
# ttscommit;
# }
#
# }
# else
# {
# infolog.add(Exception::Error,"@BPL17");
# ret = false;
# }
#
#
# return ret;
#}
ENDSOURCE
SOURCE #DeletePurchImportLink
#static void DeletePurchImportLink(PurchLine _purchLine, BPLImpFolderId _impFolderId)
#{
# BPLPurchImpFolderLink ImpLink;
# PurchLine PurchLine;
# BPLImpFolderLine ImpFolderLine;
#
# if (_impFolderId && BPLPurchImpFolderLink::find(_purchLine.PurchId, _impFolderId))
# {
# select firstonly purchLine order by PurchId
# where purchLine.PurchId == _purchLine.PurchId &&
# purchLine.RecId != _purchLine.RecId
# Join ImpFolderLine
# where ImpFolderLine.InventTransId == purchLine.InventTransId
# && ImpFolderLine.FolderId == _impFolderId;
#
# if (!purchLine.RecId)
# {
# ttsbegin;
# ImpLink = BPLPurchImpFolderLink::find(_purchLine.PurchId, _impFolderId, true);
# ImpLink.delete();
# ttscommit;
# }
# }
#
# return;
#}
ENDSOURCE
SOURCE #find
#static BPLPurchImpFolderLink find(PurchId _purchId, BPLImpFolderId _impFolderId, boolean _forupdate = false)
#{
# BPLPurchImpFolderLink ImpLink;
#
# if (_purchId && _impfolderid)
# {
# ImpLink.selectForUpdate(_forupdate);
# select firstonly ImpLink order by PurchId, ImpFolderId
# where ImpLink.PurchId == _purchId &&
# ImpLink.ImpFolderId == _impFolderId;
# }
#
# return ImpLink;
#}
ENDSOURCE
SOURCE #insertPurchImportLink
#static void InsertPurchImportLink(PurchId _purchId, BPLImpFolderId _impFolderId)
#{
# BPLPurchImpFolderLink ImpLink;
#
# if (_purchId && _impFolderId && ! BPLPurchImpFolderLink::find(_purchId,_impFolderId))
# {
# ImpLink.clear();
# ImpLink.PurchId = _purchId;
# ImpLink.ImpFolderId = _impfolderid;
# ImpLink.insert();
# }
#
# return;
#}
ENDSOURCE
SOURCE #markUnMarkAll
#static void MarkUnMarkAll(BPLImpFolderId _impfolder, NoYes _mark, PurchId _PurchId = "")
#{
# PurchLine purchLine;
# BPLImpFolderLine impFolderLine;
#
# if (_impfolder)
# {
# ttsbegin;
# if (_PurchId)
# {
# update_recordset purchLine setting BPLMarked = _mark
# where purchLine.PurchId == _PurchId &&
# !purchLine.BPLAppCharge
# join impFolderLine
# where impFolderLine.InventTransId == purchLine.InventTransId
# && impFolderLine.FolderId == _impfolder;
# }
# else
# {
# update_recordset purchLine setting BPLMarked = _mark
# where !purchLine.BPLAppCharge
# join impFolderLine
# where impFolderLine.InventTransId == purchLine.InventTransId
# && impFolderLine.FolderId == _impfolder;
# }
# ttscommit;
# }
#}
ENDSOURCE
ENDMETHODS
ENDTABLE
en-us
Check items weight for PO %1 - Item %2.
SPLImportFolder
@BPL77
0
0
he
בדוק משקל הפריט להזמנה %1 פריט %2.
SPLImportFolder
@BPL77
0
0
en-us
Check items volume for PO %1 - Item %2.
SPLImportFolder
@BPL83
0
0
he
בדוק נפח הפריט להזמנה %1 פריט %2.
SPLImportFolder
@BPL83
0
0
en-us
Check items Net Amount MST for PO %1 - Item %2 and check for packing slip
@BPL107
0
0
he
בדוק סה"כ שורה להזמנה %1 פריט %2 ובדוק אם יש תעודת משלוח
@BPL107
0
0
en-us
Check items Import Qty for PO %1 - Item %2.
@BPL51
0
0
he
בדוק סה"כ כמות יבוא להזמנה %1 פריט %2.
@BPL51
0
0
en-us
Transportation lead times
@BPL17
0
0
he
זמני אספקת ההובלה
@BPL17
0
0
***Element: DBT
; Microsoft Dynamics AX Table : BPLImpFolderTable unloaded
; --------------------------------------------------------------------------------
TABLEVERSION 1
TABLE #BPLImpFolderTable
Id 20006
PROPERTIES
Name #BPLImpFolderTable
Label #@BPL10
FormRef #BPLImpFolderTable
ReportRef #BPLImpFolderTable
TitleField1 #FolderId
TitleField2 #Description
TableContents #Base data
ConfigurationKey #CRSEIsrael
SecurityKey #VendTables
TableGroup #WorksheetHeader
PrimaryIndex #FolderIdx
ClusterIndex #FolderIdx
ModifiedDateTime #Yes
ModifiedBy #Yes
CreatedDateTime #Yes
CreatedBy #Yes
ENDPROPERTIES
FIELDS
FIELD #AcceptedAmount
Id 20001
REAL
PROPERTIES
Name #AcceptedAmount
Table #BPLImpFolderTable
ExtendedDataType
ARRAY
#BPLAcceptedAmount
#
ENDARRAY
ENDPROPERTIES
FIELD #InsuranceRate
Id 20002
REAL
PROPERTIES
Name #InsuranceRate
Table #BPLImpFolderTable
ExtendedDataType
ARRAY
#BPLInsuranceRate
#
ENDARRAY
ENDPROPERTIES
FIELD #FolderId
Id 20003
STRING
PROPERTIES
Name #FolderId
Mandatory #Yes
AllowEditOnCreate #No
AllowEdit #No
Table #BPLImpFolderTable
ExtendedDataType
ARRAY
#BPLImpFolderId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #Description
Id 20004
STRING
PROPERTIES
Name #Description
Mandatory #Yes
Table #BPLImpFolderTable
ExtendedDataType
ARRAY
#BPLImpFolderDescription
#
ENDARRAY
StringSize #60
ENDPROPERTIES
FIELD #Closed
Id 20005
ENUM
PROPERTIES
Name #Closed
Label #@SYS67267
Table #BPLImpFolderTable
EnumType #NoYes
ENDPROPERTIES
FIELD #OpeningDate
Id 20006
DATE
PROPERTIES
Name #OpeningDate
Label #@SYS58186
HelpText #@BPL5
Table #BPLImpFolderTable
ExtendedDataType
ARRAY
#TransDate
#
ENDARRAY
ENDPROPERTIES
FIELD #PortIdStart
Id 20007
STRING
PROPERTIES
Name #PortIdStart
Label #@BPL118
Table #BPLImpFolderTable
ExtendedDataType
ARRAY
#IntrastatPortId
#
ENDARRAY
ENDPROPERTIES
FIELD #PortIdEnd
Id 20008
STRING
PROPERTIES
Name #PortIdEnd
Label #@BPL119
Table #BPLImpFolderTable
ExtendedDataType
ARRAY
#IntrastatPortId
#
ENDARRAY
ENDPROPERTIES
FIELD #SenderAccountNum
Id 20009
STRING
PROPERTIES
Name #SenderAccountNum
Label #@BPL97
Table #BPLImpFolderTable
ExtendedDataType
ARRAY
#VendAccount
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #BrokerAccountNum
Id 20010
STRING
PROPERTIES
Name #BrokerAccountNum
Label #@BPL96
Table #BPLImpFolderTable
ExtendedDataType
ARRAY
#VendAccount
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #SenderReference
Id 20011
STRING
PROPERTIES
Name #SenderReference
Table #BPLImpFolderTable
ExtendedDataType
ARRAY
#BPLImpFolderReference
#
ENDARRAY
StringSize #30
ENDPROPERTIES
FIELD #DlvMode
Id 20012
STRING
PROPERTIES
Name #DlvMode
Mandatory #Yes
Table #BPLImpFolderTable
ExtendedDataType
ARRAY
#VendDlvModeId
#
ENDARRAY
ENDPROPERTIES
FIELD #MainBillOfLadingNumber
Id 20013
STRING
PROPERTIES
Name #MainBillOfLadingNumber
Label #@BPL98
Table #BPLImpFolderTable
ExtendedDataType
ARRAY
#BPLBillOfLadingNumber
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #InternalBillOfLadingNumber
Id 20014
STRING
PROPERTIES
Name #InternalBillOfLadingNumber
Label #@BPL99
Table #BPLImpFolderTable
ExtendedDataType
ARRAY
#BPLBillOfLadingNumber
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #InternalBillOfLadingDate
Id 20015
DATE
PROPERTIES
Name #InternalBillOfLadingDate
Label #@BPL100
Table #BPLImpFolderTable
ExtendedDataType
ARRAY
#BPLBillOfLadingDate
#
ENDARRAY
ENDPROPERTIES
FIELD #CountryRegionIdOrigin
Id 20016
STRING
PROPERTIES
Name #CountryRegionIdOrigin
Label #@BPL105
Table #BPLImpFolderTable
ExtendedDataType
ARRAY
#AddressCountryRegionId
#
ENDARRAY
ENDPROPERTIES
FIELD #BoatPlaneCompany
Id 20017
STRING
PROPERTIES
Name #BoatPlaneCompany
Label #@BPL108
Table #BPLImpFolderTable
ExtendedDataType
ARRAY
#BPLImpFolderReference
#
ENDARRAY
StringSize #30
ENDPROPERTIES
FIELD #BoatPlaneNumber
Id 20018
STRING
PROPERTIES
Name #BoatPlaneNumber
Label #@BPL109
Table #BPLImpFolderTable
ExtendedDataType
ARRAY
#BPLImpFolderReference
#
ENDARRAY
StringSize #30
ENDPROPERTIES
FIELD #BrokerRemarks
Id 20019
STRING
PROPERTIES
Name #BrokerRemarks
Table #BPLImpFolderTable
ExtendedDataType
ARRAY
#BPLRemarks
#
ENDARRAY
StringSize #(Memo)
ENDPROPERTIES
FIELD #CurrentStatusId
Id 20020
STRING
PROPERTIES
Name #CurrentStatusId
Label #@SYS33664
AllowEditOnCreate #No
AllowEdit #No
Table #BPLImpFolderTable
ExtendedDataType
ARRAY
#BPLImpFolderStatusId
#
ENDARRAY
ENDPROPERTIES
FIELD #ImportEntryNumber
Id 20021
STRING
PROPERTIES
Name #ImportEntryNumber
Label #@BPL115
Table #BPLImpFolderTable
ExtendedDataType
ARRAY
#BPLImpFolderReference
#
ENDARRAY
StringSize #30
ENDPROPERTIES
FIELD #ImportEntryDate
Id 20022
DATE
PROPERTIES
Name #ImportEntryDate
Label #@BPL116
Table #BPLImpFolderTable
ExtendedDataType
ARRAY
#BPLBillOfLadingDate
#
ENDARRAY
ENDPROPERTIES
FIELD #PackMaterialCode
Id 20023
STRING
PROPERTIES
Name #PackMaterialCode
Table #BPLImpFolderTable
ExtendedDataType
ARRAY
#InventPackingMaterialCode
#
ENDARRAY
ENDPROPERTIES
FIELD #Weight
Id 20024
REAL
PROPERTIES
Name #Weight
Table #BPLImpFolderTable
ExtendedDataType
ARRAY
#InventPackagingWeight
#
ENDARRAY
ENDPROPERTIES
FIELD #WeightUnitId
Id 20025
STRING
PROPERTIES
Name #WeightUnitId
HelpText #@SYS14532
Table #BPLImpFolderTable
ExtendedDataType
ARRAY
#UnitID
#
ENDARRAY
ENDPROPERTIES
FIELD #Volume
Id 20026
REAL
PROPERTIES
Name #Volume
Table #BPLImpFolderTable
ExtendedDataType
ARRAY
#ItemVolume
#
ENDARRAY
ENDPROPERTIES
FIELD #VolumeUnitId
Id 20027
STRING
PROPERTIES
Name #VolumeUnitId
HelpText #@SYS14532
Table #BPLImpFolderTable
ExtendedDataType
ARRAY
#UnitID
#
ENDARRAY
ENDPROPERTIES
FIELD #InventPackingUnitQty
Id 20028
REAL
PROPERTIES
Name #InventPackingUnitQty
Table #BPLImpFolderTable
ExtendedDataType
ARRAY
#UnitQty
#
ENDARRAY
ENDPROPERTIES
FIELD #VendAccount
Id 20029
STRING
PROPERTIES
Name #VendAccount
Table #BPLImpFolderTable
ExtendedDataType
ARRAY
#VendAccount
#
ENDARRAY
StringSize #20
ENDPROPERTIES
ENDFIELDS
GROUPS
GROUP #AutoReport
PROPERTIES
Name #AutoReport
ENDPROPERTIES
GROUPFIELDS
#FolderId
#Description
#CurrentStatusId
#CurrentStatusDescription
#PortIdStart
#PortIdEnd
ENDGROUPFIELDS
ENDGROUP
GROUP #AutoLookup
PROPERTIES
Name #AutoLookup
ENDPROPERTIES
GROUPFIELDS
#FolderId
#Description
#CurrentStatusId
#CurrentStatusDescription
#PortIdStart
#PortIdEnd
ENDGROUPFIELDS
ENDGROUP
GROUP #Broker
PROPERTIES
Name #Broker
Label #@BPL96
ENDPROPERTIES
GROUPFIELDS
#BrokerAccountNum
#BrokerRemarks
ENDGROUPFIELDS
ENDGROUP
GROUP #Delivery
PROPERTIES
Name #Delivery
Label #@SYS4508
ENDPROPERTIES
GROUPFIELDS
#DlvMode
#MainBillOfLadingNumber
#InternalBillOfLadingNumber
#InternalBillOfLadingDate
#PortIdStart
#PortIdEnd
#CountryRegionIdOrigin
#BoatPlaneCompany
#BoatPlaneNumber
ENDGROUPFIELDS
ENDGROUP
GROUP #Description
PROPERTIES
Name #Description
Label #@SYS81325
ENDPROPERTIES
GROUPFIELDS
#Description
ENDGROUPFIELDS
ENDGROUP
GROUP #Identification
PROPERTIES
Name #Identification
Label #@SYS36186
ENDPROPERTIES
GROUPFIELDS
#FolderId
ENDGROUPFIELDS
ENDGROUP
GROUP #ImportEntry
PROPERTIES
Name #ImportEntry
Label #@BPL114
ENDPROPERTIES
GROUPFIELDS
#ImportEntryNumber
#ImportEntryDate
#PackMaterialCode
#InventPackingUnitQty
#Volume
#VolumeUnitId
#Weight
#WeightUnitId
#InsuranceRate
#AcceptedAmount
ENDGROUPFIELDS
ENDGROUP
GROUP #ImportEntryRef
PROPERTIES
Name #ImportEntryRef
Label #@BPL114
ENDPROPERTIES
GROUPFIELDS
#ImportEntryNumber
#ImportEntryDate
#PackMaterialCode
#InventPackingUnitQty
ENDGROUPFIELDS
ENDGROUP
GROUP #InsuranceCosts
PROPERTIES
Name #InsuranceCosts
Label #@BPL80
ENDPROPERTIES
GROUPFIELDS
#AcceptedAmount
#InsuranceRate
#totalInsuranceCosts
ENDGROUPFIELDS
ENDGROUP
GROUP #Overview
PROPERTIES
Name #Overview
Label #@SYS34991
ENDPROPERTIES
GROUPFIELDS
#FolderId
#Description
#ImpVendorName
#OpeningDate
#CurrentStatusId
#CurrentStatusDescription
#CurrentStatusDateExpected
#CurrentStatusDateRealized
ENDGROUPFIELDS
ENDGROUP
GROUP #Sender
PROPERTIES
Name #Sender
Label #@BPL97
ENDPROPERTIES
GROUPFIELDS
#SenderAccountNum
#SenderReference
ENDGROUPFIELDS
ENDGROUP
GROUP #Status
PROPERTIES
Name #Status
Label #@SYS80127
ENDPROPERTIES
GROUPFIELDS
#OpeningDate
#CurrentStatusId
#CurrentStatusDescription
ENDGROUPFIELDS
ENDGROUP
GROUP #Volume
PROPERTIES
Name #Volume
Label #@SYS50537
ENDPROPERTIES
GROUPFIELDS
#Volume
#VolumeUnitId
ENDGROUPFIELDS
ENDGROUP
GROUP #Weight
PROPERTIES
Name #Weight
Label #@SYS11575
ENDPROPERTIES
GROUPFIELDS
#Weight
#WeightUnitId
ENDGROUPFIELDS
ENDGROUP
ENDGROUPS
INDICES
#FolderIdx
Id 20001
PROPERTIES
Name #FolderIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#FolderId
ENDINDEXFIELDS
ENDINDICES
REFERENCES
ENDREFERENCES
DELETEACTIONS
#BPLImpFolderLine
PROPERTIES
Table #BPLImpFolderLine
DeleteAction #Restricted
ENDPROPERTIES
#MarkupTrans
PROPERTIES
Table #MarkupTrans
DeleteAction #Restricted
ENDPROPERTIES
#PurchLine
PROPERTIES
Table #PurchLine
DeleteAction #Restricted
ENDPROPERTIES
#VendPackingSlipTrans
PROPERTIES
Table #VendPackingSlipTrans
DeleteAction #Restricted
ENDPROPERTIES
#BPLImpFolderHistory
PROPERTIES
Table #BPLImpFolderHistory
DeleteAction #Cascade
ENDPROPERTIES
ENDDELETEACTIONS
METHODS
Version: 3
SOURCE #BrokerName
#display VendName BrokerName()
#{
# return VendTable::find(this.BrokerAccountNum).Name;
#}
ENDSOURCE
SOURCE #CurrentImpFolderHistory
#BPLImpFolderHistory CurrentImpFolderHistory()
#{
# return BPLImpFolderHistory::find(this.FolderId,this.CurrentStatusId);
#}
ENDSOURCE
SOURCE #CurrentStatusDateExpected
#display DateExpected CurrentStatusDateExpected()
#{
# return BPLImpFolderHistory::find(this.FolderId,this.CurrentStatusId).DateExpected;
#}
ENDSOURCE
SOURCE #CurrentStatusDateRealized
#display BPLDateRealized CurrentStatusDateRealized()
#{
# return BPLImpFolderHistory::find(this.FolderId,this.CurrentStatusId).DateRealized;
#}
ENDSOURCE
SOURCE #CurrentStatusDescription
#display BPLImpFolderStatusDescription CurrentStatusDescription()
#{
# return BPLImpFolderStatus::find(this.CurrentStatusId).Description;
#}
ENDSOURCE
SOURCE #firstPurchLine
#PurchLine firstPurchLine()
#{
# PurchLine purchLine;
# BPLImpFolderLine impFolderLine;
# ;
#
# select firstonly impFolderLine
# where impFolderLine.FolderId == this.FolderId
# join purchLine
# where purchLine.InventTransId == impFolderLine.InventTransId
# && purchLine.BPLAppCharge == NoYes::No;
#
# return purchLine;
#}
ENDSOURCE
SOURCE #ImpVendorName
#display VendName ImpVendorName()
#{
# return VendTable::find(this.VendAccount).Name;
#}
ENDSOURCE
SOURCE #initValue
#public void initValue()
#{
#
#// NumberSequenceReference NumberSequenceReference;
#;
# super();
#
#// NumberSequenceReference = NumberSeqReference::findReference(typeId2ExtendedTypeId(typeid(BPLImpFolderId)));
#
#// if (!this.FolderId)
#// this.FolderId = NumberSeq::newGetNum(NumberSequenceReference).num();
# this.OpeningDate = systemdateget();
#// this.CurrentStatusId = BPLImpFolderStatus::firststatus();
#}
ENDSOURCE
SOURCE #insert
#public void insert()
#{
# BPLImpFolderHistory BPLImpFolderHistory;
#
# super();
#
# BPLImpFolderHistory.clear();
# BPLImpFolderHistory.initValue();
# BPLImpFolderHistory.FolderId = this.FolderId;
# BPLImpFolderHistory.initFromBPLImpFolderStatus(BPLImpFolderStatus::FirstStatus());
# BPLImpFolderHistory.insert();
#
# BPLImpFolderHistory.clear();
# BPLImpFolderHistory.initValue();
# BPLImpFolderHistory.FolderId = this.FolderId;
# BPLImpFolderHistory.initFromBPLImpFolderStatus(BPLImpFolderStatus::LastStatus());
# BPLImpFolderHistory.insert();
#
#}
#
ENDSOURCE
SOURCE #LastStatusDateExpected
#display DateExpected LastStatusDateExpected()
#{
# return BPLImpFolderHistory::find(this.FolderId, BPLImpFolderStatus::LastStatus()).DateExpected;
#}
ENDSOURCE
SOURCE #LastStatusDateRealized
#display BPLDateRealized LastStatusDateRealized()
#{
# return BPLImpFolderHistory::find(this.FolderId, BPLImpFolderStatus::LastStatus()).DateRealized;
#}
ENDSOURCE
SOURCE #SenderName
#display VendName SenderName()
#{
# return VendTable::find(this.SenderAccountNum).Name;
#}
ENDSOURCE
SOURCE #totalInsuranceCosts
#display BPLInsuranceCost totalInsuranceCosts()
#{
# ;
# return this.AcceptedAmount * (this.InsuranceRate / 100.0);
#}
ENDSOURCE
SOURCE #exist
#static boolean exist(BPLImpFolderId _folderid)
#{
# ;
# return _folderid && (select Recid from BPLImpFolderTable order by FolderId
# where BPLImpFolderTable.FolderId == _folderid).RecId != 0;
#}
ENDSOURCE
SOURCE #find
#static BPLImpFolderTable find(BPLImpFolderId _folderid,boolean _forupdate = false)
#{
# BPLImpFolderTable BPLimpfoldertable;
#
# if (_folderid)
# {
# BPLimpfoldertable.selectForUpdate(_forupdate);
#
# select firstonly BPLimpfoldertable order by FolderId
# where BPLimpfoldertable.FolderId == _folderid;
# }
#
# return BPLimpfoldertable;
#}
ENDSOURCE
ENDMETHODS
ENDTABLE
en-us
Import portfolios
SPLImportFolder
@BPL10
0
0
he
תיקי יבוא
SPLImportFolder
@BPL10
0
0
en-us
Closed
@SYS67267
0
0
he
סגור
@SYS67267
0
0
en-us
Opening date
@SYS58186
0
0
he
תאריך פתיחה
@SYS58186
0
0
en-us
Opening date of the Import portfolio
@BPL5
0
0
he
תאריך יצירת תיק ייבוא
@BPL5
0
0
en-us
Loading port
@BPL118
0
0
he
נמל טעינה
SPLImportFolder
@BPL118
0
0
en-us
Unloading port
@BPL119
0
0
he
נמל פריקה
SPLImportFolder
@BPL119
0
0
en-us
Sender
BPLImportFolder
@BPL97
0
0
he
משלח
BPLImportFolder
@BPL97
0
0
en-us
Customs broker
@BPL96
0
0
he
עמיל מכס
@BPL96
0
0
en-us
Main bill of lading number
@BPL98
0
0
he
מספר שטר מטען ראשי
SPLImportFolder
@BPL98
0
0
en-us
Internal bill of lading number
@BPL99
0
0
he
מספר שטר מטען פנימי
SPLImportFolder
@BPL99
0
0
en-us
Internal bill of lading date
@BPL100
0
0
he
תאריך שטר מטען פנימי
@BPL100
0
0
en-us
Country of origin
@BPL105
0
0
he
ארץ מוצא
@BPL105
0
0
en-us
Boat/plane company
@BPL108
0
0
he
אוניה/חב' תעופה
SPLImportFolder
@BPL108
0
0
en-us
Boat/plane number
@BPL109
0
0
he
מספר הפלגה/טיסה
SPLImportFolder
@BPL109
0
0
en-us
Current status
@SYS33664
0
0
he
מצב נוכחי
@SYS33664
0
0
en-us
Import entry number
@BPL115
0
0
he
מספר רשומון ייבוא
SPLImportFolder
@BPL115
0
0
en-us
Import entry date
@BPL116
0
0
he
תאריך רשומון ייבוא
SPLImportFolder
@BPL116
0
0
en-us
Unit which the module is run in
@SYS14532
0
0
he
היחידה שבה פועל המודול
@SYS14532
0
0
en-us
Delivery
@SYS4508
0
0
he
משלוח
@SYS4508
0
0
en-us
Description
CRM business sector description
@SYS81325
0
0
he
תיאור
CRM business sector description
@SYS81325
0
0
en-us
Identification
@SYS36186
0
0
he
זיהוי
@SYS36186
0
0
en-us
Import entry
@BPL114
0
0
he
רשומון ייבוא
SPLImportFolder
@BPL114
0
0
en-us
Insurance Costs
@BPL80
0
0
he
עלויות ביטוח
@BPL80
0
0
en-us
Overview
@SYS34991
0
0
he
מבט כולל
@SYS34991
0
0
en-us
Status
@SYS80127
0
0
he
מצב
@SYS80127
0
0
en-us
Volume
@SYS50537
0
0
he
נפח
@SYS50537
0
0
en-us
Weight
@SYS11575
0
0
he
משקל
@SYS11575
0
0
***Element: DBT
; Microsoft Dynamics AX Table : BPLImpFolderHistory unloaded
; --------------------------------------------------------------------------------
TABLEVERSION 1
TABLE #BPLImpFolderHistory
Id 20003
PROPERTIES
Name #BPLImpFolderHistory
Label #@BPL120
FormRef #BPLImpFolderHistory
TitleField1 #FolderId
TitleField2 #StatusId
ConfigurationKey #CRSEIsrael
SecurityKey #VendTables
PrimaryIndex #FolderIdStatusIdx
ClusterIndex #FolderIdStatusIdx
ENDPROPERTIES
FIELDS
FIELD #StatusId
Id 20001
STRING
PROPERTIES
Name #StatusId
Mandatory #Yes
AllowEdit #No
Table #BPLImpFolderHistory
ExtendedDataType
ARRAY
#BPLImpFolderStatusId
#
ENDARRAY
ENDPROPERTIES
FIELD #FolderId
Id 20002
STRING
PROPERTIES
Name #FolderId
Mandatory #Yes
AllowEditOnCreate #No
AllowEdit #No
Table #BPLImpFolderHistory
ExtendedDataType
ARRAY
#BPLImpFolderId
#
ENDARRAY
StringSize #20
ENDPROPERTIES
FIELD #DateExpected
Id 20003
DATE
PROPERTIES
Name #DateExpected
Table #BPLImpFolderHistory
ExtendedDataType
ARRAY
#DateExpected
#
ENDARRAY
ENDPROPERTIES
FIELD #DateRealized
Id 20004
DATE
PROPERTIES
Name #DateRealized
AllowEditOnCreate #No
AllowEdit #No
Table #BPLImpFolderHistory
ExtendedDataType
ARRAY
#BPLDateRealized
#
ENDARRAY
ENDPROPERTIES
FIELD #Rank
Id 20005
INT
PROPERTIES
Name #Rank
Label #@SYS105634
Mandatory #Yes
AllowEditOnCreate #No
AllowEdit #No
Table #BPLImpFolderHistory
ExtendedDataType
ARRAY
#Integer
#
ENDARRAY
ENDPROPERTIES
FIELD #Reference
Id 20006
STRING
PROPERTIES
Name #Reference
Table #BPLImpFolderHistory
ExtendedDataType
ARRAY
#BPLImpFolderReference
#
ENDARRAY
StringSize #30
ENDPROPERTIES
FIELD #Remarks
Id 20007
STRING
PROPERTIES
Name #Remarks
Table #BPLImpFolderHistory
ExtendedDataType
ARRAY
#BPLRemarks
#
ENDARRAY
StringSize #(Memo)
ENDPROPERTIES
ENDFIELDS
GROUPS
GROUP #AutoReport
PROPERTIES
Name #AutoReport
ENDPROPERTIES
GROUPFIELDS
#FolderId
#StatusId
#DateExpected
#DateRealized
ENDGROUPFIELDS
ENDGROUP
GROUP #AutoLookup
PROPERTIES
Name #AutoLookup
ENDPROPERTIES
GROUPFIELDS
#FolderId
#StatusId
#DateExpected
#DateRealized
ENDGROUPFIELDS
ENDGROUP
GROUP #Dates
PROPERTIES
Name #Dates
Label #@SYS80293
ENDPROPERTIES
GROUPFIELDS
#DateExpected
#DateRealized
ENDGROUPFIELDS
ENDGROUP
GROUP #Identification
PROPERTIES
Name #Identification
Label #@SYS36186
ENDPROPERTIES
GROUPFIELDS
#FolderId
#StatusId
#statusDescription
ENDGROUPFIELDS
ENDGROUP
GROUP #Overview
PROPERTIES
Name #Overview
Label #@SYS34991
ENDPROPERTIES
GROUPFIELDS
#FolderId
#StatusId
#statusDescription
#DateExpected
#DateRealized
ENDGROUPFIELDS
ENDGROUP
GROUP #Reference
PROPERTIES
Name #Reference
Label #@SYS112248
ENDPROPERTIES
GROUPFIELDS
#Reference
ENDGROUPFIELDS
ENDGROUP
GROUP #Remarks
PROPERTIES
Name #Remarks
Label #@BPL110
ENDPROPERTIES
GROUPFIELDS
#Remarks
ENDGROUPFIELDS
ENDGROUP
ENDGROUPS
INDICES
#FolderIdStatusIdx
Id 20001
PROPERTIES
Name #FolderIdStatusIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#FolderId
#StatusId
ENDINDEXFIELDS
#FolderIdRankIdx
Id 20002
PROPERTIES
Name #FolderIdRankIdx
ENDPROPERTIES
INDEXFIELDS
#FolderId
#Rank
ENDINDEXFIELDS
ENDINDICES
REFERENCES
ENDREFERENCES
DELETEACTIONS
ENDDELETEACTIONS
METHODS
Version: 3
SOURCE #initFromBPLImpFolderStatus
#void initFromBPLImpFolderStatus(BPLImpFolderStatusId _statusId = this.StatusId)
#{
# this.StatusId = _statusId;
# this.Rank = BPLImpFolderStatus::find(_statusId).Rank;
#}
ENDSOURCE
SOURCE #insert
#public void insert()
#{
# super();
#
# if (this.DateExpected && this.StatusId == BPLImpFolderStatus::LastStatus())
# this.updatePurchLine();
#}
ENDSOURCE
SOURCE #StatusDescription
#display BPLImpFolderStatusDescription statusDescription()
#{
# return BPLImpFolderStatus::find(this.statusId).Description;
#}
ENDSOURCE
SOURCE #update
#public void update()
#{
# boolean updatePurchLine = false;
#;
# if ((this.DateExpected && this.DateExpected != this.orig().DateExpected) &&
# this.StatusId == BPLImpFolderStatus::LastStatus())
# updatePurchLine = true;
#
# super();
#
# if (updatePurchLine)
# this.updatePurchLine();
#
#}
ENDSOURCE
SOURCE #updatePurchLine
#void updatePurchLine()
#{
# PurchLine purchLine;
#
#// ttsbegin;
#//
#// while select forupdate purchLine
#// where purchLine.BPLImpFolderId == this.FolderId &&
#// purchline.BPLAppCharge == NoYes::No
#// {
#// purchLine.ConfirmedDlv = this.DateExpected;
#// purchLine.validateWrite();
#// purchLine.update();
#// }
#//
#// ttscommit;
#}
ENDSOURCE
SOURCE #validateDelete
#public boolean validateDelete()
#{
# boolean ret;
#
# ret = super();
#
# ret = (ret && this.DateRealized == datenull());
#
# return ret;
#}
ENDSOURCE
SOURCE #validateField
#public boolean validateField(fieldId _fieldId)
#{
# boolean ret;
#
#
# ret = super(_fieldId);
#
# switch (_fieldId)
# {
# case fieldnum(BPLImpFolderHistory, StatusId):
# this.initFromBPLImpFolderStatus();
# break;
# }
# return ret;
#}
ENDSOURCE
SOURCE #validateWrite
#public boolean validateWrite()
#{
# BPLImpFolderHistory BPLImpFolderHistory;
# boolean ret;
#
# ret = super();
#
# if (ret && this.DateExpected)
# {
# select firstonly BPLImpFolderHistory
# index hint FolderIdRankIdx
# where BPLImpFolderHistory.FolderId == this.FolderId &&
# BPLImpFolderHistory.Rank < this.Rank &&
# BPLImpFolderHistory.DateExpected > this.DateExpected &&
# BPLImpFolderHistory.DateExpected;
#
#
# if (BPLImpFolderHistory.RecId)
# ret = checkfailed(strfmt("@BPL136",BPLImpFolderHistory.StatusId,BPLImpFolderHistory.DateExpected));
#
# select firstonly BPLImpFolderHistory
# index hint FolderIdRankIdx
# where BPLImpFolderHistory.FolderId == this.FolderId &&
# BPLImpFolderHistory.Rank > this.Rank &&
# BPLImpFolderHistory.DateExpected < this.DateExpected &&
# BPLImpFolderHistory.DateExpected;
#
#
# if (BPLImpFolderHistory.RecId)
# ret = checkfailed(strfmt("@BPL137",BPLImpFolderHistory.StatusId,BPLImpFolderHistory.DateExpected));
# }
#
# if (ret && this.DateRealized)
# {
# select firstonly BPLImpFolderHistory
# index hint FolderIdRankIdx
# where BPLImpFolderHistory.FolderId == this.FolderId &&
# BPLImpFolderHistory.Rank < this.Rank &&
# BPLImpFolderHistory.DateRealized > this.DateRealized &&
# BPLImpFolderHistory.DateRealized;
#
#
# if (BPLImpFolderHistory.RecId)
# ret = checkfailed(strfmt("@BPL138",BPLImpFolderHistory.StatusId,BPLImpFolderHistory.DateRealized));
#
# select firstonly BPLImpFolderHistory
# index hint FolderIdRankIdx
# where BPLImpFolderHistory.FolderId == this.FolderId &&
# BPLImpFolderHistory.Rank > this.Rank &&
# BPLImpFolderHistory.DateRealized < this.DateRealized &&
# BPLImpFolderHistory.DateRealized;
#
# if (BPLImpFolderHistory.RecId)
# ret = checkfailed(strfmt("@BPL137",BPLImpFolderHistory.StatusId,BPLImpFolderHistory.DateRealized));
# }
# return ret;
#}
ENDSOURCE
SOURCE #find
#public static BPLImpFolderHistory find(BPLImpFolderId _FolderId, BPLImpFolderStatusId _FolderStatusId, boolean _forUpdate = false)
#{
# BPLImpFolderHistory ImpFolderHistory;
# ;
#
# ImpFolderHistory.selectForUpdate(_forUpdate);
#
# if (_FolderId && _FolderStatusId)
# {
# select firstonly ImpFolderHistory
# where ImpFolderHistory.FolderId == _FolderId &&
# ImpFolderHistory.StatusId == _FolderStatusId;
# }
#
# return ImpFolderHistory;
#}
#
ENDSOURCE
SOURCE #findNextHistory
#public static BPLImpFolderHistory findNextHistory(BPLImpFolderId _FolderId, Integer _Rank, boolean _forUpdate = false)
#{
# BPLImpFolderHistory ImpFolderHistory;
# ;
#
# ImpFolderHistory.selectForUpdate(_forUpdate);
#
# if (_FolderId && _Rank)
# {
# select firstonly ImpFolderHistory
# where ImpFolderHistory.FolderId == _FolderId &&
# ImpFolderHistory.Rank > _Rank;
# }
#
# return ImpFolderHistory;
#}
#
ENDSOURCE
SOURCE #findPreviousHistory
#public static BPLImpFolderHistory findPreviousHistory(BPLImpFolderId _FolderId, Integer _Rank, boolean _forUpdate = false)
#{
# BPLImpFolderHistory ImpFolderHistory;
# ;
#
# ImpFolderHistory.selectForUpdate(_forUpdate);
#
# if (_FolderId && _Rank)
# {
# select firstonly ImpFolderHistory
# where ImpFolderHistory.FolderId == _FolderId &&
# ImpFolderHistory.Rank > _Rank;
# }
#
# return ImpFolderHistory;
#}
#
ENDSOURCE
ENDMETHODS
ENDTABLE
en-us
Import portfolio history
@BPL120
0
0
he
היסטוריית תיקי היבוא
SPLImportFolder
@BPL120
0
0
en-us
Rank
@SYS105634
0
0
he
דרגה
@SYS105634
0
0
en-us
Dates
@SYS80293
0
0
he
תאריכים
@SYS80293
0
0
en-us
Identification
@SYS36186
0
0
he
זיהוי
@SYS36186
0
0
en-us
Overview
@SYS34991
0
0
he
מבט כולל
@SYS34991
0
0
en-us
Reference
@SYS112248
0
0
he
אסמכתא
@SYS112248
0
0
en-us
Remarks
@BPL110
0
0
he
הערות
SPLImportFolder
@BPL110
0
0
en-us
The status %1 has an inferior rank and is expected on %2
@BPL136
0
0
he
למצב %1 יש דירוג מוקדם והוא צריך להיות ב %2
@BPL136
0
0
en-us
The status %1 has an superior rank and is realized on %2
@BPL137
0
0
he
למצב %1 יש דירוג מאוחר למרות שנמצא ב %2
@BPL137
0
0
en-us
The status %1 has an inferior rank and is realized on %2
@BPL138
0
0
he
למצב %1 יש דירוג מוקדם למרות שנמצא ב %2
@BPL138
0
0
***Element: DBT
; Microsoft Dynamics AX Table : BPLImpFolderStatus unloaded
; --------------------------------------------------------------------------------
TABLEVERSION 1
TABLE #BPLImpFolderStatus
Id 20005
PROPERTIES
Name #BPLImpFolderStatus
Label #@BPL101
FormRef #BPLImpFolderStatus
TitleField1 #StatusId
TitleField2 #Description
ConfigurationKey #CRSEIsrael
SecurityKey #VendTables
CacheLookup #EntireTable
TableGroup #Group
PrimaryIndex #ImpFolderRankIdx
ClusterIndex #ImpFolderRankIdx
ENDPROPERTIES
FIELDS
FIELD #Description
Id 20001
STRING
PROPERTIES
Name #Description
Table #BPLImpFolderStatus
ExtendedDataType
ARRAY
#BPLImpFolderStatusDescription
#
ENDARRAY
StringSize #60
ENDPROPERTIES
FIELD #StatusId
Id 20002
STRING
PROPERTIES
Name #StatusId
Mandatory #Yes
AllowEdit #No
Table #BPLImpFolderStatus
ExtendedDataType
ARRAY
#BPLImpFolderStatusId
#
ENDARRAY
ENDPROPERTIES
FIELD #Rank
Id 20003
INT
PROPERTIES
Name #Rank
Label #@SYS105634
Mandatory #Yes
Table #BPLImpFolderStatus
ExtendedDataType
ARRAY
#Integer
#
ENDARRAY
ENDPROPERTIES
ENDFIELDS
GROUPS
GROUP #AutoReport
PROPERTIES
Name #AutoReport
ENDPROPERTIES
GROUPFIELDS
#StatusId
#Description
ENDGROUPFIELDS
ENDGROUP
GROUP #AutoLookup
PROPERTIES
Name #AutoLookup
ENDPROPERTIES
GROUPFIELDS
#StatusId
#Description
#Rank
ENDGROUPFIELDS
ENDGROUP
GROUP #Description
PROPERTIES
Name #Description
Label #@SYS81325
ENDPROPERTIES
GROUPFIELDS
#Description
ENDGROUPFIELDS
ENDGROUP
GROUP #Identification
PROPERTIES
Name #Identification
Label #@SYS36186
ENDPROPERTIES
GROUPFIELDS
#StatusId
#Rank
ENDGROUPFIELDS
ENDGROUP
ENDGROUPS
INDICES
#ImpFolderStatusIdIdx
Id 20001
PROPERTIES
Name #ImpFolderStatusIdIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#StatusId
ENDINDEXFIELDS
#ImpFolderRankIdx
Id 20002
PROPERTIES
Name #ImpFolderRankIdx
AllowDuplicates #No
ENDPROPERTIES
INDEXFIELDS
#Rank
ENDINDEXFIELDS
ENDINDICES
REFERENCES
ENDREFERENCES
DELETEACTIONS
ENDDELETEACTIONS
METHODS
Version: 3
SOURCE #validateWrite
#public boolean validateWrite()
#{
# Recid recId;
#;
# recId = BPLImpFolderStatus::findRank(this.Rank).RecId;
# if (recId && recId != this.RecId )
# return checkFailed(strfmt("@BPL134", this.Rank));
#
# return super();
#}
ENDSOURCE
SOURCE #find
#public static BPLImpFolderStatus find(BPLImpFolderStatusId _ImpFolderStatusId, boolean _forUpdate = false)
#{
# BPLImpFolderStatus ImpFolderStatus;
# ;
#
# ImpFolderStatus.selectForUpdate(_forUpdate);
#
# if (_ImpFolderStatusId)
# {
# select firstonly ImpFolderStatus
# where ImpFolderStatus.StatusId == _ImpFolderStatusId;
# }
#
# return ImpFolderStatus;
#}
#
ENDSOURCE
SOURCE #findRank
#public static BPLImpFolderStatus findRank(Integer _Rank, boolean _forUpdate = false)
#{
# BPLImpFolderStatus ImpFolderStatus;
# ;
#
# ImpFolderStatus.selectForUpdate(_forUpdate);
#
# if (_Rank)
# {
# select firstonly ImpFolderStatus
# index hint ImpFolderRankIdx
# where ImpFolderStatus.Rank == _Rank;
# }
#
# return ImpFolderStatus;
#}
#
ENDSOURCE
SOURCE #firststatus
#public static BPLImpFolderStatusId FirstStatus()
#{
# BPLImpFolderStatus impFolderStatus;
# ;
#
# select firstonly impFolderStatus
# index hint impFolderRankIdx;
#
# return impFolderStatus.StatusId;
#}
#
ENDSOURCE
SOURCE #LastStatus
#public static BPLImpFolderStatusId LastStatus()
#{
# BPLImpFolderStatus impFolderStatus;
# ;
#
# select firstonly reverse impFolderStatus
# index hint impFolderRankIdx;
#
# return impFolderStatus.StatusId;
#}
#
ENDSOURCE
ENDMETHODS
ENDTABLE
en-us
Table 'Import portfolio status' is not filled in correctly.
@BPL101
0
0
he
טבלת מצב תיק יבוא אינה מוגדרת כראוי.
@BPL101
0
0
en-us
Rank
@SYS105634
0
0
he
דרגה
@SYS105634
0
0
en-us
Description
CRM business sector description
@SYS81325
0
0
he
תיאור
CRM business sector description
@SYS81325
0
0
en-us
Identification
@SYS36186
0
0
he
זיהוי
@SYS36186
0
0
en-us
A status with the same rank %1 already exists
@BPL134
0
0
he
מצב בעל דירוג זהה (%1) כבר קיים
@BPL134
0
0
***Element: UTR
; Microsoft Dynamics AX Real: BPLInsuranceCost unloaded
; --------------------------------------------------------------------------------
USERTYPEVERSION 6
USERTYPE #BPLInsuranceCost
Id 20024
REAL
PROPERTIES
Name #BPLInsuranceCost
Label #@BPL143
HelpText #@BPL143
Extends #RealBase
ENDPROPERTIES
TYPEELEMENTS
ENDTYPEELEMENTS
TYPEREFERENCES
ENDTYPEREFERENCES
ENDUSERTYPE
en-us
Insurance cost
@BPL143
0
0
he
סכום הוצאות ביטוח
@BPL143
0
0
***Element: UTR
; Microsoft Dynamics AX Real: BPLAcceptedAmount unloaded
; --------------------------------------------------------------------------------
USERTYPEVERSION 6
USERTYPE #BPLAcceptedAmount
Id 20023
REAL
PROPERTIES
Name #BPLAcceptedAmount
Label #@BPL142
HelpText #@BPL142
Extends #RealBase
ENDPROPERTIES
TYPEELEMENTS
ENDTYPEELEMENTS
TYPEREFERENCES
ENDTYPEREFERENCES
ENDUSERTYPE
en-us
Accepted amount
@BPL142
0
0
he
ערך מקובל
@BPL142
0
0
***Element: UTR
; Microsoft Dynamics AX Real: BPLInsuranceRate unloaded
; --------------------------------------------------------------------------------
USERTYPEVERSION 6
USERTYPE #BPLInsuranceRate
Id 20025
REAL
PROPERTIES
Name #BPLInsuranceRate
Label #@BPL144
HelpText #@BPL144
Extends #Percent
ENDPROPERTIES
TYPEELEMENTS
ENDTYPEELEMENTS
TYPEREFERENCES
ENDTYPEREFERENCES
ENDUSERTYPE
en-us
Insurance rate
BPL
@BPL144
0
0
he
% הוצאות ביטוח
@BPL144
0
0
***Element: UTR
; Microsoft Dynamics AX Real: BPLImpLineQty unloaded
; --------------------------------------------------------------------------------
USERTYPEVERSION 6
USERTYPE #BPLImpLineQty
Id 20018
REAL
PROPERTIES
Name #BPLImpLineQty
Label #@BPL47
HelpText #@BPL48
ConfigurationKey #CRSEIsrael
Extends #UnitQty
AllowNegative #Yes
ENDPROPERTIES
TYPEELEMENTS
ENDTYPEELEMENTS
TYPEREFERENCES
ENDTYPEREFERENCES
ENDUSERTYPE
en-us
Import Qty
@BPL47
0
0
he
כמות יבוא
@BPL47
0
0
en-us
Update import line quantity
@BPL48
0
0
he
עדכן כמות בשורת תיק יבוא
@BPL48
0
0
***Element: UTR
; Microsoft Dynamics AX Real: BPLLineNumShort unloaded
; --------------------------------------------------------------------------------
USERTYPEVERSION 6
USERTYPE #BPLLineNumShort
Id 20019
REAL
PROPERTIES
Name #BPLLineNumShort
DisplayLength #5
ConfigurationKey #CRSEIsrael
Extends #LineNum
NoOfDecimals #2
ENDPROPERTIES
TYPEELEMENTS
ENDTYPEELEMENTS
TYPEREFERENCES
ENDTYPEREFERENCES
ENDUSERTYPE
***Element: UTS
; Microsoft Dynamics AX String: BPLChangeDlvReasonId unloaded
; --------------------------------------------------------------------------------
USERTYPEVERSION 6
USERTYPE #BPLChangeDlvReasonId
Id 20010
STRING
PROPERTIES
Name #BPLChangeDlvReasonId
Label #@BPL22
HelpText #@BPL27
ConfigurationKey #CRSEIsrael
ENDPROPERTIES
TYPEELEMENTS
ENDTYPEELEMENTS
TYPEREFERENCES
TYPEREFERENCETYPE DATASET
PROPERTIES
Table #BPLChangeDlvReason
RelatedField #ChangeDlvReasonId
ENDPROPERTIES
ENDTYPEREFERENCES
ENDUSERTYPE
en-us
Delivery change reason
@BPL22
0
0
he
סיבת שינוי אספקה
@BPL22
0
0
en-us
Identification of the delivery change reason
@BPL27
0
0
he
מזהה סיבת שינוי תאריך אספקה
@BPL27
0
0
***Element: UTD
; Microsoft Dynamics AX Date: BPLRequestedDlvDate unloaded
; --------------------------------------------------------------------------------
USERTYPEVERSION 6
USERTYPE #BPLRequestedDlvDate
Id 20021
DATE
PROPERTIES
Name #BPLRequestedDlvDate
Label #@BPL20
HelpText #@BPL21
ConfigurationKey #CRSEIsrael
Extends #PurchLineDlvDate
ENDPROPERTIES
TYPEELEMENTS
ENDTYPEELEMENTS
TYPEREFERENCES
ENDTYPEREFERENCES
ENDUSERTYPE
en-us
Requested delivery
Delivery Date
@BPL20
0
0
he
תאריך אספקה מבוקש
תאריך אספקה
@BPL20
0
0
en-us
Date requested for delivery.
@BPL21
0
0
he
תאריךמבוקש עבור המשלוח
@BPL21
0
0
***Element: UTD
; Microsoft Dynamics AX Date: BPLVendorConfirmedDlvDate unloaded
; --------------------------------------------------------------------------------
USERTYPEVERSION 6
USERTYPE #BPLVendorConfirmedDlvDate
Id 20022
DATE
PROPERTIES
Name #BPLVendorConfirmedDlvDate
Label #@BPL19
HelpText #@SYS931
ConfigurationKey #CRSEIsrael
Extends #PurchLineDlvDate
ENDPROPERTIES
TYPEELEMENTS
ENDTYPEELEMENTS
TYPEREFERENCES
ENDTYPEREFERENCES
ENDUSERTYPE
en-us
Confirmed by vendor
@BPL19
0
0
he
אושר ע"י הספק
@BPL19
0
0
en-us
Date for confirmed delivery.
@SYS931
0
0
he
תאריך עבור משלוח מאושר.
@SYS931
0
0
***Element: UTD
; Microsoft Dynamics AX Date: BPLBillOfLadingDate unloaded
; --------------------------------------------------------------------------------
USERTYPEVERSION 6
USERTYPE #BPLBillOfLadingDate
Id 20008
DATE
PROPERTIES
Name #BPLBillOfLadingDate
ConfigurationKey #CRSEIsrael
Extends #TransDate
ENDPROPERTIES
TYPEELEMENTS
ENDTYPEELEMENTS
TYPEREFERENCES
ENDTYPEREFERENCES
ENDUSERTYPE
***Element: UTS
; Microsoft Dynamics AX String: BPLBillOfLadingNumber unloaded
; --------------------------------------------------------------------------------
USERTYPEVERSION 6
USERTYPE #BPLBillOfLadingNumber
Id 20009
STRING
PROPERTIES
Name #BPLBillOfLadingNumber
ConfigurationKey #CRSEIsrael
StringSize #20
ENDPROPERTIES
TYPEELEMENTS
ENDTYPEELEMENTS
TYPEREFERENCES
ENDTYPEREFERENCES
ENDUSERTYPE
***Element: UTD
; Microsoft Dynamics AX Date: BPLDateRealized unloaded
; --------------------------------------------------------------------------------
USERTYPEVERSION 6
USERTYPE #BPLDateRealized
Id 20012
DATE
PROPERTIES
Name #BPLDateRealized
Label #@SYS73236
ConfigurationKey #CRSEIsrael
Extends #DateExecuted
ENDPROPERTIES
TYPEELEMENTS
ENDTYPEELEMENTS
TYPEREFERENCES
ENDTYPEREFERENCES
ENDUSERTYPE
en-us
Update date
The date of the update.
@SYS73236
0
0
he
תאריך עדכון
The date of the update.
@SYS73236
0
0
***Element: UTS
; Microsoft Dynamics AX String: BPLImpFolderStatusId unloaded
; --------------------------------------------------------------------------------
USERTYPEVERSION 6
USERTYPE #BPLImpFolderStatusId
Id 20017
STRING
PROPERTIES
Name #BPLImpFolderStatusId
Label #@BPL113
HelpText #@BPL112
FormHelp #BPLimpFolderstatuslookup
ConfigurationKey #CRSEIsrael
ENDPROPERTIES
TYPEELEMENTS
ENDTYPEELEMENTS
TYPEREFERENCES
TYPEREFERENCETYPE DATASET
PROPERTIES
Table #BPLImpFolderStatus
RelatedField #StatusId
ENDPROPERTIES
ENDTYPEREFERENCES
ENDUSERTYPE
en-us
Import portfolio status
EDT
@BPL113
0
0
he
מצב תיק יבוא
EDT
@BPL113
0
0
en-us
Identification of the Import portfolio status
@BPL112
0
0
he
מזהה מצב תיק יבוא
@BPL112
0
0
***Element: UTS
; Microsoft Dynamics AX String: BPLImpFolderStatusDescription unloaded
; --------------------------------------------------------------------------------
USERTYPEVERSION 6
USERTYPE #BPLImpFolderStatusDescription
Id 20016
STRING
PROPERTIES
Name #BPLImpFolderStatusDescription
Label #@BPL117
ConfigurationKey #CRSEIsrael
Extends #Description
StringSize #60
ENDPROPERTIES
TYPEELEMENTS
ENDTYPEELEMENTS
TYPEREFERENCES
TYPEREFERENCETYPE DATASET
PROPERTIES
Table #BPLImpFolderStatus
RelatedField #Description
ENDPROPERTIES
ENDTYPEREFERENCES
ENDUSERTYPE
en-us
Status description
@BPL117
0
0
he
תאור מצב
SPLImportFolder
@BPL117
0
0
***Element: UTS
; Microsoft Dynamics AX String: BPLImpFolderReference unloaded
; --------------------------------------------------------------------------------
USERTYPEVERSION 6
USERTYPE #BPLImpFolderReference
Id 20015
STRING
PROPERTIES
Name #BPLImpFolderReference
Label #@SYS40441
ConfigurationKey #CRSEIsrael
StringSize #30
ENDPROPERTIES
TYPEELEMENTS
ENDTYPEELEMENTS
TYPEREFERENCES
ENDTYPEREFERENCES
ENDUSERTYPE
en-us
Reference
@SYS40441
0
0
he
אסמכתא
@SYS40441
0
0
***Element: UTR
; Microsoft Dynamics AX Real: BPLAllocationAmount unloaded
; --------------------------------------------------------------------------------
USERTYPEVERSION 6
USERTYPE #BPLAllocationAmount
Id 20005
REAL
PROPERTIES
Name #BPLAllocationAmount
Label #@SYS59630
ConfigurationKey #CRSEIsrael
Extends #AmountCur
ENDPROPERTIES
TYPEELEMENTS
ENDTYPEELEMENTS
TYPEREFERENCES
ENDTYPEREFERENCES
ENDUSERTYPE
en-us
Allocated amount
@SYS59630
0
0
he
כמות שהוקצתה
@SYS59630
0
0
***Element: UTD
; Microsoft Dynamics AX Date: BPLAllocationDate unloaded
; --------------------------------------------------------------------------------
USERTYPEVERSION 6
USERTYPE #BPLAllocationDate
Id 20006
DATE
PROPERTIES
Name #BPLAllocationDate
Label #@BPL95
ConfigurationKey #CRSEIsrael
ENDPROPERTIES
TYPEELEMENTS
ENDTYPEELEMENTS
TYPEREFERENCES
ENDTYPEREFERENCES
ENDUSERTYPE
en-us
Allocation date
@BPL95
0
0
he
תאריך העמסה
@BPL95
0
0
***Element: UTR
; Microsoft Dynamics AX Real: BPLAllocationPercent unloaded
; --------------------------------------------------------------------------------
USERTYPEVERSION 6
USERTYPE #BPLAllocationPercent
Id 20007
REAL
PROPERTIES
Name #BPLAllocationPercent
Label #@BPL53
ConfigurationKey #CRSEIsrael
Extends #Percent
ENDPROPERTIES
TYPEELEMENTS
ENDTYPEELEMENTS
TYPEREFERENCES
ENDTYPEREFERENCES
ENDUSERTYPE
en-us
Allocated %
SPLImportFolder
@BPL53
0
0
he
% מועמס
SPLImportFolder
@BPL53
0
0
***Element: UTS
; Microsoft Dynamics AX String: BPLImpFolderDescription unloaded
; --------------------------------------------------------------------------------
USERTYPEVERSION 6
USERTYPE #BPLImpFolderDescription
Id 20013
STRING
PROPERTIES
Name #BPLImpFolderDescription
ConfigurationKey #CRSEIsrael
Extends #Description
StringSize #60
ENDPROPERTIES
TYPEELEMENTS
ENDTYPEELEMENTS
TYPEREFERENCES
ENDTYPEREFERENCES
ENDUSERTYPE
***Element: UTS
; Microsoft Dynamics AX String: BPLImpFolderId unloaded
; --------------------------------------------------------------------------------
USERTYPEVERSION 6
USERTYPE #BPLImpFolderId
Id 20014
STRING
PROPERTIES
Name #BPLImpFolderId
Label #@BPL94
HelpText #@BPL94
ConfigurationKey #CRSEIsrael
StringSize #20
ENDPROPERTIES
TYPEELEMENTS
ENDTYPEELEMENTS
TYPEREFERENCES
TYPEREFERENCETYPE DATASET
PROPERTIES
Table #BPLImpFolderTable
RelatedField #FolderId
ENDPROPERTIES
ENDTYPEREFERENCES
ENDUSERTYPE
en-us
Import portfolio
@BPL94
0
0
he
תיק יבוא
@BPL94
0
0
***Element: UTS
; Microsoft Dynamics AX String: BPLChargeItemId unloaded
; --------------------------------------------------------------------------------
USERTYPEVERSION 6
USERTYPE #BPLChargeItemId
Id 20011
STRING
PROPERTIES
Name #BPLChargeItemId
Label #@BPL125
HelpText #@BPL11
FormHelp #BPLchargeItemLookup
ConfigurationKey #CRSEIsrael
Extends #ItemId
StringSize #20
ENDPROPERTIES
TYPEELEMENTS
ENDTYPEELEMENTS
TYPEREFERENCES
TYPEREFERENCETYPE DATASET
PROPERTIES
Table #InventTableModule
RelatedField #ItemId
ENDPROPERTIES
TYPEREFERENCETYPE EXTERNFIXED
PROPERTIES
Table #InventTableModule
RelatedField #ModuleType
Value #1
ENDPROPERTIES
TYPEREFERENCETYPE EXTERNFIXED
PROPERTIES
Table #InventTableModule
RelatedField #BPLAppCharge
Value #1
ENDPROPERTIES
ENDTYPEREFERENCES
ENDUSERTYPE
en-us
Charge item
@BPL125
0
0
he
פריטי חיוב
@BPL125
0
0
en-us
Identify the Item used for this markup code
SPLImportFolder
@BPL11
0
0
he
הגדר את פריט החיוב
SPLImportFolder
@BPL11
0
0
***Element: UTS
; Microsoft Dynamics AX String: BPLRemarks unloaded
; --------------------------------------------------------------------------------
USERTYPEVERSION 6
USERTYPE #BPLRemarks
Id 20020
STRING
PROPERTIES
Name #BPLRemarks
Label #@BPL110
ConfigurationKey #CRSEIsrael
StringSize #(Memo)
ENDPROPERTIES
TYPEELEMENTS
ENDTYPEELEMENTS
TYPEREFERENCES
ENDTYPEREFERENCES
ENDUSERTYPE
en-us
Remarks
@BPL110
0
0
he
הערות
SPLImportFolder
@BPL110
0
0
***Element: DBE
; Microsoft Dynamics AX Enumtype : BPLAppChargeAllocate unloaded
; --------------------------------------------------------------------------------
ENUMTYPEVERSION 1
ENUMTYPE #BPLAppChargeAllocate
Id 20001
PROPERTIES
Name #BPLAppChargeAllocate
Label #@BPL9
ConfigurationKey #CRSEIsrael
UseEnumValue #Yes
ENDPROPERTIES
TYPEELEMENTS
#NetAmount
PROPERTIES
Name #NetAmount
Label #@SYS6901
EnumValue #1
ENDPROPERTIES
#GrossWeight
PROPERTIES
Name #GrossWeight
Label #@SYS53799
EnumValue #2
ENDPROPERTIES
#Volume
PROPERTIES
Name #Volume
Label #@SYS50537
EnumValue #3
ENDPROPERTIES
ENDTYPEELEMENTS
ENDENUMTYPE
en-us
Allocation method
SPLImportFolder
@BPL9
0
0
he
שיטת העמסה
SPLImportFolder
@BPL9
0
0
en-us
Net amount
@SYS6901
0
0
he
סכום נטו
@SYS6901
0
0
en-us
Gross weight
@SYS53799
0
0
he
משקל ברוטו
@SYS53799
0
0
en-us
Volume
@SYS50537
0
0
he
נפח
@SYS50537
0
0
***Element: CON
; Microsoft Dynamics AX CONFIGURATIONKEY : BPLFeatures unloaded
; --------------------------------------------------------------------------------
VERSION 1
CONFIGURATIONKEY #BPLFeatures
Id 30001
PROPERTIES
Name #BPLFeatures
Label #@BPL139
ENDPROPERTIES
ENDCONFIGURATIONKEY
en-us
Prodware features
@BPL139
0
0
he
פרודוור
@BPL139
0
0
***Element: CLS
; Microsoft Dynamics AX Class: PurchFormLetter unloaded
; --------------------------------------------------------------------------------
CLSVERSION 1
CLASS #PurchFormLetter
Id 481
PROPERTIES
Name #PurchFormLetter
Extends #FormLetter
RunOn #Called from
ENDPROPERTIES
METHODS
Version: 3
SOURCE #adjustLinesQuery
#///
#/// Adjusts the chooseLines query to work with additional data sources.
#///
#///
#/// Determines whether additional data sources should be queried.
#///
#///
#/// This method is called after query ranges are already known.
#/// This method should be overridden by derived classes.
#///
#public void adjustLinesQuery(boolean _queryAdditional)
#{
# return;
#}
ENDSOURCE
SOURCE #allowReArrange
#///
#/// Defines if a purchase posting can be rearranged.
#///
#///
#/// The document to be tested to see if rearrange of saved pending invoice will be allowed.
#///
#///
#/// true if the provided saved pending invoice can be rearranged; otherwise, false.
#///
#///
#/// A saved pending invoice which was previously rearranged should not be re-rearranged when the document is not being rearranged.
#/// This method is called after query ranges are already known.
#/// This method should be overridden by derived classes.
#///
#boolean allowReArrange(PurchParmTable _purchParmTable)
#{
# return true;
#}
#
ENDSOURCE
SOURCE #approved
#NoYes approved()
#{
# return NoYes::Yes;
#}
ENDSOURCE
SOURCE #approvedBy
#ApprovedBy approvedBy()
#{
# return EmplTable::userId2EmplId(curuserid());
#}
ENDSOURCE
SOURCE #BPLChkImportFolderAllocation
#// Israel-Localisation-Prodware-ImportFolder
#public boolean BPLChkImportFolderAllocation(PurchId _purchId)
#{
# return true;
#}
ENDSOURCE
SOURCE #BPLChkImportFolderAllocationLine
#// Israel-Localisation-Prodware-ImportFolder
#public boolean BPLChkImportFolderAllocationLine(InventTransId _inventTransId)
#{
# return true;
#}
ENDSOURCE
SOURCE #BPLImpFolderTable_ds
#// Israel-Localisation-Prodware-ImportFolder
#public FormDataSource BPLImpFolderTable_ds(FormDataSource _BPLImpFolderTable_ds = BPLImpFolderTable_ds)
#{
# BPLImpFolderTable_ds = _BPLImpFolderTable_ds;
# return BPLImpFolderTable_ds;
#}
ENDSOURCE
SOURCE #BPLImportFolderId
#// Israel-Localisation-Prodware-ImportFolder
#public BPLImpFolderId BPLImportFolderId(BPLImpFolderId _BPLImpFolderId = BPLImpFolderId)
#{
#;
# BPLImpFolderId = _BPLImpFolderId;
# return BPLImpFolderId;
#}
ENDSOURCE
SOURCE #BPLUpdAllFolderPSlipNum
#// Israel-Localisation-Prodware-ImportFolder
#void BPLUpdAllFolderPSlipNum (Num _parmId,Num _num)
#{
# PurchParmTable purchParmTableOrig;
# ;
#
# ttsbegin;
#
# while select forupdate purchParmTableOrig
# where purchParmTableOrig.ParmId == _parmId
# {
# purchParmTableOrig.Num = _num;
# purchParmTableOrig.update();
# }
#
# ttscommit;
#}
ENDSOURCE
SOURCE #calcAutomaticTotalDiscount
#protected void calcAutomaticTotalDiscount(PurchTable _purchTable)
#{
# ;
# if(VendParameters::find().AutomaticTotalDiscount)
# {
# _purchTable = PurchTable::findRecId(_purchTable.RecId, true);
# _purchTable.updateFinalDisc();
# }
#}
#
ENDSOURCE
SOURCE #calcLastPurchPrice
#void calcLastPurchPrice()
#{
# throw error(Error::missingOverload(funcname()));
#}
ENDSOURCE
SOURCE #canCreateParmLine
#protected boolean canCreateParmLine(PurchParmTable _purchParmTable, PurchId _purchId)
#{
# return this.allowEmptyTable();
#}
ENDSOURCE
SOURCE #canSwapBetweenCS
#protected boolean canSwapBetweenCS()
#{
# return true;
#}
ENDSOURCE
SOURCE #checkAOSPrinters
#///
#/// Verifies if selected printers for printing from the SalesFormLetter class hierarchy are AOS configured printers.
#///
#///
#/// true if the selected printers AOS configured printer; otherwise, false.
#///
#protected boolean checkAOSPrinters()
#{
# boolean ret;
# ;
#
# ret = super();
#
# if (printEuVatInvoice)
# {
# if (!FormLetter::isAOSPrinter(printerSettingsEuVatInvoice))
# {
# ret = checkFailed(strfmt("@SYS118819"));
# }
# }
#
# return ret;
#}
#
ENDSOURCE
SOURCE #checkAOSPrintersPrintManagement
#///
#/// Verifies if selected printers in print management, for printing original and copy of reports are AOS configured printers.
#///
#///
#/// false.
#///
#protected boolean checkAOSPrintersPrintManagement()
#{
# boolean ret;
# ;
# ret = super();
#
# if (printEuVatInvoice)
# {
# if (!FormLetter::isAOSPrinter(printerSettingsEuVatInvoice))
# {
# ret = checkFailed(strfmt("@SYS118819"));
# printerSetupError = true;
# }
# }
#
# return ret;
#}
#
#
ENDSOURCE
SOURCE #checkBlockedLevel
#protected boolean checkBlockedLevel()
#{
# boolean ok = true;
# ;
#
# if (!VendTable::canVendorBeUpdated(purchTable.OrderAccount, purchTable.InvoiceAccount, this.documentStatus()))
# ok = checkFailed(strfmt("@SYS1138",purchTable.OrderAccount));
#
# return ok;
#}
ENDSOURCE
SOURCE #checkCallerDataSource
#///
#/// Check if the calling data source can be processed in this update.
#///
#///
#/// The tableId of the records in the calling data source.
#///
#///
#/// The data source from the calling form.
#///
#///
#/// true if the check succeeded; otherwise, false.
#///
#boolean checkCallerDataSource(tableId _callingTableId, FormDataSource _recordDataSource)
#{
# return true;
#}
ENDSOURCE
SOURCE #checkDiscardLine
#protected boolean checkDiscardLine()
#{
# if (purchParmLine.ReceiveNow == 0)
# return true;
#
# return false;
#}
ENDSOURCE
SOURCE #checkFormLetterId
#boolean checkFormLetterId()
#{
# return true;
#}
ENDSOURCE
SOURCE #checkHeading
#protected boolean checkHeading()
#{
# boolean ok = true;
# ;
#
# if (! purchTable.RecId)
# ok = checkFailed(strfmt("@SYS15741", purchTable.PurchId));
#
# if (! purchTable.OrderAccount)
# ok = checkFailed(strfmt("@SYS19291", purchTable.PurchId));
#
# if (! VendTable::exist(purchTable.OrderAccount))
# ok = checkFailed(strfmt("@SYS19292", purchTable.OrderAccount,purchTable.PurchId));
#
# if (! purchTable.InvoiceAccount)
# ok = checkFailed(strfmt("@SYS19293", purchTable.PurchId));
#
# if (! VendTable::exist(purchTable.InvoiceAccount))
# ok = checkFailed(strfmt("@SYS19294", purchTable.InvoiceAccount,purchTable.PurchId));
#
# if (purchTable.CurrencyCode && ! Currency::exist(purchTable.CurrencyCode))
# ok = checkFailed(strfmt("@SYS19295", purchTable.CurrencyCode,purchTable.PurchId));
#
# if (! purchTable.isInterCompanyOrder()
# && ! purchTable.checkMarkupTrans(false))
# ok = false;
#
# return ok;
#}
ENDSOURCE
SOURCE #checkIfPurchOrderExist
#protected boolean checkIfPurchOrderExist(PurchTable _purchTable)
#{
# if (!_purchTable)
# return false;
#
# return true;
#}
ENDSOURCE
SOURCE #checkIfSomethingIsPosted
#protected boolean checkIfSomethingIsPosted()
#{
# if (!purchLine)
# return checkFailed("@SYS26185");
#
# return true;
#}
ENDSOURCE
SOURCE #checkInterCompany
#protected boolean checkInterCompany()
#{
# PurchParmTable purchParmTableLocal;
# PurchTable purchTableLocal;
#
# Counter recordCount = 0;
# boolean interCompanyFound = false;
# boolean ok = true;
# ;
#
# if (purchParmUpdate.SumBy == AccountOrder::Order)
# {
# while select purchParmTableLocal
# where purchParmTableLocal.ParmId == purchParmUpdate.ParmId
# && purchParmTableLocal.Hold == NoYes::No
# join purchTableLocal
# where purchTableLocal.PurchId == purchParmTableLocal.PurchId
# {
# recordCount++;
#
# if (purchTableLocal.InterCompanyOrder)
# {
# interCompanyFound = true;
# }
#
# if (interCompanyFound && recordCount > 1)
# {
# ok = checkFailed(strfmt("@SYS75337", "@SYS57755"));
# break;
# }
# }
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #checkInvoice
#protected boolean checkInvoice()
#{
# throw error(Error::missingOverload(funcname()));
#}
ENDSOURCE
SOURCE #checkInvoiceDate
#boolean checkInvoiceDate()
#{
# return true;
#}
ENDSOURCE
SOURCE #checkLateSelection
#protected boolean checkLateSelection()
#{
# boolean ok = true;
# ;
#
# if (purchParmUpdate.LateSelection && !purchParmUpdate.LateSelectionQuery)
# {
# ok = checkFailed(strfmt("@SYS72782"));
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #checkLines
#protected boolean checkLines()
#{
# boolean ok = true;
# ;
#
# setprefix(#PreFixField(PurchLine, LineNum));
#
# if (!PurchLine::exist(purchTable.PurchId))
# ok = checkFailed(strfmt("@SYS16741"));
#
# purchLine.clear();
#
# recordListPurchLine.first(purchLine);
# while (purchLine)
# {
# if (!InventTable::exist(purchLine.ItemId))
# ok = checkFailed(strfmt("@SYS20812", purchLine.ItemId));
#
# if (! this.checkPurchLineChanged(PurchParmLine::findInventTransId(purchParmUpdate.ParmId, purchLine.InventTransId), purchLine))
# ok = false;
#
# if (!recordListPurchLine.next(purchLine))
# break;
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #checkPackingSlip
#protected boolean checkPackingSlip()
#{
# throw error(Error::missingOverload(funcname()));
#}
#
ENDSOURCE
SOURCE #checkPurch
#protected boolean checkPurch()
#{
# boolean ok = true;
# ;
#
# ttsbegin; // in transaction in order to enforce selection of eg VendTable
#
# if (!this.interCompanyParmId())
# {
# // Not posting and not printing
# if (purchParmUpdate.Proforma && ! printFormletter)
# {
# // If the invoice isn't going to be saved - warn that updating was not specified
# if (purchParmTable.VendInvoiceSaveStatus != VendInvoiceSaveStatus::Pending)
# {
# ok = checkFailed(strfmt("@SYS24178"));
# }
# // The invoice is going to be saved, then skip the rest of the validation
# else
# {
# ttsabort;
# return true;
# }
# }
# }
#
# if ( purchParmTable.Hold == NoYes::No &&
# (!this.checkHeading() ||
# !this.checkBlockedLevel() ||
# !this.checkLines() ||
# !this.checkPackingSlip() ||
# !this.checkLedgerPeriod()))
# {
# ok = false;
# }
#
# if (!this.checkInvoice())
# {
# ok = false;
# }
#
# if (purchParmTable.Hold == NoYes::No && purchTotals.purchTotalAmount() > 0)
# {
# if ( !this.creditMaxOk(Currency::mstAmount(purchTotals.purchTotalAmount(), this.purchTable().CurrencyCode, purchTotals.invoiceDate())) )
# {
# ok = false;
# }
# }
#
# ttscommit;
#
# return ok;
#}
ENDSOURCE
SOURCE #checkPurchLineChanged
#protected boolean checkPurchLineChanged(PurchParmLine _purchParmLine, PurchLine _purchLine)
#{
# boolean ok = true;
# PurchQty remainBefore;
# InventQty remainBeforeInvent;
# Qty dummy;
# ;
# [dummy, remainBefore , dummy] = this.qtyPurch (_purchLine, naReal());
# [dummy, remainBeforeInvent, dummy] = this.qtyInvent(_purchLine, naReal());
#
# if (remainBefore != _purchParmLine.RemainBefore ||
# remainBeforeInvent != _purchParmLine.RemainBeforeInvent)
# {
# ok = checkFailed(strfmt("@SYS78923", _purchParmLine.OrigPurchId));
# }
# // PBA begin
# ok = ok && _purchLine.PBAItemLine::checkMandatory();
# // PBA end
#
# return ok;
#}
ENDSOURCE
SOURCE #checkPurchLinesChanged
#protected boolean checkPurchLinesChanged()
#{
# PurchParmLine purchParmLineLocal;
# PurchLine purchLineLocal;
#
# boolean ok = true;
# ;
# while select purchParmLineLocal
# where purchParmLineLocal.ParmId == purchParmUpdate.ParmId
# outer join purchLineLocal
# where purchLineLocal.InventTransId == purchParmLineLocal.InventTransId
# {
# if ( purchParmLineLocal.purchParmTable().Hold == NoYes::No &&
# !this.checkPurchLineChanged(purchParmLineLocal, purchLineLocal) )
# {
# ok = false;
# }
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #checkSumBy
#protected boolean checkSumBy()
#{
# PurchSummary checkPurchSummary = PurchSummary::construct(purchParmUpdate.SumBy,
# purchParmUpdate.ParmId,
# purchParmUpdate.SumPurchId,
# this.documentStatus(),
# number);
# return checkPurchSummary.checkUpdateAllowed();
#}
ENDSOURCE
SOURCE #checkSumNum
#protected boolean checkSumNum()
#{
# boolean ok = true;
# ;
#
# if (purchParmUpdate.SumBy == AccountOrder::Order)
# {
# if (!PurchParmLine::existPurch(parmId, purchParmUpdate.SumPurchId))
# ok = checkFailed(strfmt("@SYS26185", purchParmUpdate.SumPurchId));
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #checkTaxWorkRegulation
#protected boolean checkTaxWorkRegulation(boolean _logErrors = false)
#{
# boolean ret = true;
# TaxWorkRegulation localTaxWorkRegulation;
# PurchParmTable localPurchParmTable;
# str errorText;
# int infologNum;
# ;
#
# // Check all documents in the current session for adjusted taxes
# setprefix("@SYS82342");
#
# while select localPurchParmTable
# where localPurchParmTable.ParmId == this.parmId()
# exists join localTaxWorkRegulation
# where localTaxWorkRegulation.HeadingTableId == localPurchParmTable.TableId &&
# localTaxWorkRegulation.HeadingRecId == localPurchParmTable.RecId
# {
# if(this.allowReArrange(localPurchParmTable))
# {
# ret = false;
# errorText = strfmt("@SYS82343", localPurchParmTable.PurchId);
# error(errorText);
# if (_logErrors)
# {
# purchParmTable = localPurchParmTable.data();
# infologNum = infolog.num();
# ttsbegin;
# this.updateParmTableWithErrors(Info::infoCon2Str(infolog.copy(infologNum,infologNum)));
# ttscommit;
# }
# }
# }
#
# if (!ret)
# info("@SYS82344" + '\n' +
# "@SYS82345");
#
# return ret;
#}
#
ENDSOURCE
SOURCE #chooseAdditionalLine
#///
#/// Processes a single line of the non-standard result set returned by the chooseLines query.
#///
#///
#/// This method should be overridden by derived classes.
#///
#protected void chooseAdditionalLine()
#{
#}
ENDSOURCE
SOURCE #chooseLine
#///
#/// Processes a single line of the chooseLines query.
#///
#///
#/// The PurchParmTable table record.
#///
#///
#/// A Boolean value which indicates whether PurchParmTable table record already exists.
#///
#///
#/// true if processing of the line has been finished or aborted; otherwise, false.
#///
#protected boolean chooseLine(PurchParmTable _purchParmTable, boolean _parmTableExists)
#{
# boolean nonPendingLinesExist, linesCreated;
# Name deliveryName;
# Addressing deliveryAddress;
#
# boolean createParmTable(boolean _linesCreated)
# {
# boolean created = false;
# ;
#
# if (this.allowCreateParmTable() && (_linesCreated || this.canCreateParmLine(_purchParmTable, currentPurchTable.PurchId)))
# {
# if (!_purchParmTable.ParmId || _purchParmTable.TableRefId != currentTableRef)
# {
# _purchParmTable.clear();
# _purchParmTable.TableRefId = currentTableRef;
#
# this.createParmTable(_purchParmTable,
# currentPurchTable,
# currentPurchTable.PurchName,
# deliveryName,
# deliveryAddress);
#
# _purchParmTable.initTotals();
# this.insertPurchParmTable(_purchParmTable);
# this.syncToNewInvoice(_purchParmTable, currentInterCompanyInvoiceNum);
# created = true;
# }
#
# this.allowCreateParmTable(this.allowEmptyTable());
# }
#
# return created;
# }
#
# ;
#
# currentTableRef = '';
# progressTotal++;
#
# if (chooseLines.changed(tablenum(PurchTable)))
# {
# currentPurchTable = chooseLines.get(tablenum(PurchTable));
# currentMayJournalBePosted = this.mayJournalBePosted(currentPurchTable) && this.maySelectPO(currentPurchTable);
# if(parmTableNum && currentPurchTable.isInterCompanyOrder())
# {
# currentInterCompanyInvoiceNum = parmTableNum;
# }
# else
# {
# currentInterCompanyInvoiceNum = this.interCompanyInvoiceNum(currentPurchTable);
# }
# this.interCompanyMarkupAllocationForDDPO(currentPurchTable);
# isNewPurchTable = true;
# }
#
# currentPurchLine = chooseLines.get(tablenum(PurchLine));
#
# if (!interCompanyParmId)
# {
# if (!currentMayJournalBePosted)
# return true;
# }
#
# nonPendingLinesExist = this.existWaitingParmLines(parmId, currentPurchLine.PurchId, currentPurchLine.InventTransId);
#
# if (!purchParmLinesExist || !nonPendingLinesExist)
# {
# if (this.splitDeliveryInformation())
# {
# deliveryName = currentPurchLine.DeliveryName ? currentPurchLine.DeliveryName : currentPurchTable.DeliveryName;
# deliveryAddress = currentPurchLine.DeliveryAddress ? currentPurchLine.DeliveryAddress : currentPurchTable.DeliveryAddress;
# _purchParmTable = PurchParmTable::findDeliveryInformation(purchParmUpdate.ParmId, currentPurchTable.PurchId, deliveryName, deliveryAddress) ;
# if (purchParmTableMap.exists(this.purchParmTableMapKey(currentPurchTable.PurchId,
# deliveryName,
# deliveryAddress)))
# {
# _purchParmTable = purchParmTableMap.lookup(this.purchParmTableMapKey(currentPurchTable.PurchId,
# deliveryName,
# deliveryAddress));
# }
# else
# _purchParmTable.clear();
# }
# else
# {
# deliveryName = currentPurchTable.DeliveryName;
# deliveryAddress = currentPurchTable.DeliveryAddress;
# }
#
# // Try to reuse the header, but don't reuse the pending header if it is the only one.
# if (!isNewPurchTable || _parmTableExists)
# {
# if (nonPendingLinesExist)
# {
# if (purchParmTableMap.exists(this.purchParmTableMapKey(currentPurchTable.PurchId,
# deliveryName,
# deliveryAddress)))
# {
# _purchParmTable = purchParmTableMap.lookup(this.purchParmTableMapKey(currentPurchTable.PurchId,
# deliveryName,
# deliveryAddress));
# }
# else
# {
# _purchParmTable.clear();
# }
# }
#
# currentTableRef = _purchParmTable.TableRefId;
# }
# else
# {
# currentTableRef = '';
# }
#
# if (!currentTableRef)
# {
# currentTableRef = FormLetter::getTableRef();
# }
#
# linesCreated = this.createParmLine(currentPurchLine, currentTableRef);
# if (createParmTable(linesCreated))
# {
# isNewPurchTable = false;
# }
# }
#
# return false;
#}
#
#
ENDSOURCE
SOURCE #chooseLines
#///
#/// Creates PurchParmTable table records based on the chooseLines query.
#///
#///
#/// A Boolean value which determines whether additional data sources should be processed by the chooseLines query.
#///
#///
#/// The PurchParmTable table record.
#///
#public void chooseLines(boolean _processAdditional = false, PurchParmTable _purchParmTable = null)
#{
# boolean parmTableExists = _purchParmTable.RecId != 0;
# ;
#
# ttsbegin;
#
# this.chooseLinesInit();
#
# while (chooseLines.next())
# {
# this.chooseLine(_purchParmTable, parmTableExists);
# }
#
# this.chooseLinesCleanup(_purchParmTable);
#
# ttscommit;
#
# purchParmTable = _purchParmTable;
#
# reArrangeNow = true;
#}
ENDSOURCE
SOURCE #chooseLinesCleanup
#///
#/// Performs cleanup steps after the chooseLines query has been processed.
#///
#///
#/// The PurchParmTable table record to be cleaned up.
#///
#protected void chooseLinesCleanup(PurchParmTable _purchParmTable)
#{
# this.recordInsertListInsert();
# chooseLines.query().dataSourceTable(tablenum(PurchTable)).enabled(true);
#}
#
#
#
ENDSOURCE
SOURCE #chooseLinesFromWMSJournalTable
#void chooseLinesFromWMSJournalTable()
#{
# throw error(Error::missingOverload(funcname()));
#}
ENDSOURCE
SOURCE #chooseLinesInit
#///
#/// Initializes processing of the chooseLines query.
#///
#protected void chooseLinesInit()
#{
# currentInterCompanyInvoiceNum = '';
#
# this.recordInsertListInit();
# this.allowCreateParmTable(this.allowEmptyTable());
#
# purchParmLinesExist = (select firstonly RecId from purchParmLine
# where purchParmLine.ParmId == parmId).RecId != 0;
#
# chooseLines.reset(); // if the select button is used from purcheditlines
# currentMayJournalBePosted = false;
#
#}
#
#
ENDSOURCE
SOURCE #chooseLinesPackingSlip
#protected void chooseLinesPackingSlip(boolean _processAdditional)
#{
# throw error(Error::missingOverload(funcname()));
#}
ENDSOURCE
SOURCE #classDeclaration
#abstract class PurchFormLetter
#extends FormLetter
#{
# RecordSortedList recordListPurchLine;
# RecordSortedList recordListPurchParmLine;
# RecordSortedList recordListPurchParmLine_Asset;
#
# LedgerVoucher ledgerVoucher;
# boolean ledgerVoucherIsSet;
#
# PurchCalcTax purchCalcTax;
#
# PurchTotals purchTotals;
# PurchQuantity purchQuantity;
#
# PurchQty updateNow;
# PurchFormLetter specFormLetter;
#
# PurchTable purchTable;
# PurchLine purchLine;
#
# PurchParmUpdate purchParmUpdate;
# PurchParmTable purchParmTable;
# PurchParmLine purchParmLine;
# PurchParmLine_Asset purchParmLine_Asset;
#
# StartDateTime startDateTimeUpdate;
# StartDateTime startDateTimeTable;
#
# Markup markup;
#
# FormDataSource wmsJournalTable_ds;
# boolean wmsJournalTableDsIsSet;
#
# boolean editLinesChanged;
# boolean enableUpdateNow;
#
# NoYes creditNote;
#
# FormDataSource purchEditLinesDatasource;
#
# #if.never #SpeedTest
# SpeedExecute_Purch speedExecute_Purch;
# #endif
#
# LineNum sumByLineNum;
#
# Num internalNumber;
# boolean useInternalNumber;
#
# container printerSettingsEuVatInvoice;
# container printerSettingsPromissoryNote;
# NoYes printEuVatInvoice;
#
# VendAccount sumAccount;
#
# InterCompanyVoucher interCompanyVoucher;
#
# SysQueryRun updateSalesLinesQuery;
# boolean updateSalesLines;
# NoYes printSalesFormLetter;
#
# Num parmTableNum;
# SalesPurchCycleAction salesPurchCycleAction;
#
# boolean interCompanyNoSalesFormletterUpdate;
# AmountCur cashDiscAmount;
#
# RecordInsertList recordInsertPurchParmTable;
# RecordInsertList recordInsertPurchParmSubTable;
# RecordInsertList recordInsertPurchParmLine;
# RecordInsertList recordInsertPurchParmLine_Asset;
# Map purchParmTableMap;
# Map purchParmSubTableMap;
# Map purchParmLineMap;
# systemSequence systemSequence;
# Common callerTable;
#
# // temporary state for chooseLines and chooseLinesPackingSlip
# boolean purchParmLinesExist;
# boolean currentMayJournalBePosted;
# TradeLineRefId currentTableRef;
# PurchTable currentPurchTable;
# PurchLine currentPurchLine;
# Num currentInterCompanyInvoiceNum;
# boolean isNewPurchTable;
# boolean specQtyIsSet;
#
# // Israel-Localisation-Prodware-ImportFolder-Begin
# FormDataSource BPLImpFolderTable_ds;
# BPLImpFolderId BPLImpFolderId;
# // Israel-Localisation-Prodware-ImportFolder-End
#
# //List of parameters common for PurchFormLetter_* classes that needs to be packed
# //for the correct class transition between client and server.
# //If you need some additional parameters on the client, add them to this list.
# //All variables in the parmListCommonCS must also be added to the method resetParmListCommonCS.
# //After any changes, please increase both versions.
# #define.ParentVersion(1)
# #define.CurrentVersion(1)
# #LOCALMACRO.ParmListCommonCS
# editLinesChanged,
# reArrangeNow,
# initAllowEmptyTable,
# allowEmptyTable,
# enableUpdateNow,
# showQueryForm,
# multiForm,
# transDate,
# wmsJournalTableDsIsSet,
# number,
# purchTable
# #ENDMACRO
#
# //List of parameters extracted from arguments for the transfer from main() to mainOnServer()
# #LOCALMACRO.CachedArgsList
# parmEnum,
# callerFormName,
# isProforma,
# formHasInterCompanyRefreshCacheMethod
# #ENDMACRO
#}
#
ENDSOURCE
SOURCE #cleanupDialog
#protected void cleanupDialog()
#{;
# PurchParmUpdate::deleteWithoutUpdate(purchParmUpdate.ParmId);
#}
#
ENDSOURCE
SOURCE #createFixedAsset
#///
#/// Creates a record in the AssetTable.
#///
#///
#/// A PurchParmLine table buffer.
#///
#///
#/// A PurchParmLine_Asset table buffer.
#///
#///
#/// The AssetId value from the created asset record.
#///
#public AssetId createFixedAsset(PurchParmLine _purchParmLine, PurchParmLine_Asset _purchParmLine_Asset)
#{
# AssetTable assetTable;
# AssetBook assetBook;
# AssetDepBook assetDepBook;
# AssetGroup assetGroup;
#
# NumberSeq assetIdNumberSeq;
# NumberSequenceTable numberSequenceTable;
# NumberSequenceReference numberSequenceReference;
#
# ;
#
# // It is only possible create fixed assets when the number sequence is marked as continuous
# select Continuous from numberSequenceTable join AutoNumberSequence from assetGroup where
# assetGroup.GroupId == _purchParmLine_Asset.AssetGroup &&
# numberSequenceTable.NumberSequence == assetGroup.AutoNumberSequence;
# if (numberSequenceTable.Continuous == NoYes::No)
# {
# if (assetGroup.AutoNumberSequence)
# throw error("@SYS116327");
# else
# {
# if (AssetParameters::find().AutoNumber)
# {
# numberSequenceReference = AssetParameters::numRefAssetId();
# select Continuous from numberSequenceTable where
# numberSequenceTable.NumberSequence == numberSequenceReference.NumberSequence;
# if (numberSequenceTable.Continuous == NoYes::No)
# throw error("@SYS116327");
# }
# else
# {
# throw error("@SYS122736");
# }
# }
# }
#
# ttsbegin; //Save asset record.
#
# assetTable.selectForUpdate(true);
# assetTable.clear();
# assetTable.AssetGroup = _purchParmLine_Asset.AssetGroup;
# assetTable.Name = _purchParmLine.purchLine().itemName();
# assetTable.PurchLineRecId = _purchParmLine.PurchLineRecId;
#
# assetIdNumberSeq = assetTable.initAssetNumberSeq();
# if (assetIdNumberSeq)
# {
# assetTable.AssetId = assetIdNumberSeq.num();
# assetIdNumberSeq.used();
# }
# assetTable.insert();
#
# while select forupdate Dimension from assetBook
# where assetBook.AssetId == assetTable.AssetId
# {
# assetBook.Dimension = purchLine.Dimension;
# assetBook.update();
# }
#
# if ((AssetParameters::find().ConsiderCapitalizationThreshold)
# && (_purchParmLine.LineAmount <= AssetGroup::find(assetTable.AssetGroup).CapitalizationThreshold))
# {
# update_recordset assetBook setting Depreciation = NoYes::No
# where assetBook.AssetId == assetTable.AssetId;
#
# update_recordset assetDepBook setting Depreciation = NoYes::No
# where assetDepBook.AssetId == assetTable.AssetId;
# }
#
# ttscommit;
#
# _purchParmLine_Asset.CreateFixedAsset = NoYes::No;
# _purchParmLine_Asset.AssetId = assetTable.AssetId;
# _purchParmLine_Asset.modifyAssetId();
# _purchParmLine_Asset.doUpdate();
#
# return assetTable.AssetId;
#}
ENDSOURCE
SOURCE #createJournal
#///
#/// Posts a purchase order into journals.
#///
#public void createJournal()
#{
# Num parmNum;
# ;
#
# startDateTimeTable = DateTimeUtil::newDateTime(systemdateget(),timenow(), DateTimeUtil::getUserPreferredTimeZone());
#
# progress.setText("@SYS8311");
#
# purchTotals = PurchTotals::newPurchParmTable(purchParmTable, purchParmUpdate.SpecQty, purchParmUpdate.SumBy, purchParmUpdate.ParmId, purchParmUpdate.SumPurchId, this.documentStatus());
# purchTotals.calc();
# this.tax(purchTotals.tax());
#
# recordListPurchLine = purchTotals.recordListPurchLine();
# recordListPurchParmLine = purchTotals.recordListPurchParmLine();
#
# #if.never //#Speedtest
# if (speedExecute_Purch)
# speedExecute_Purch.timing(SpeedPurchTiming::Totals,'');
# #endif
#
# if (TaxParameters::canApplyCashDiscOnInvoice_ES())
# {
# cashDiscAmount = purchTotals.cashDiscAmount();
# }
#
# if (purchTotals.purchTotalAmount() < 0)
# creditNote = NoYes::Yes;
# else
# creditNote = NoYes::No;
#
# if (!this.checkPurch())
# throw error(strfmt("@SYS25974", purchParmTable.PurchId));
#
# // If not posting, or document is on Hold - print or save
# if (purchParmUpdate.Proforma || purchParmTable.Hold == NoYes::Yes)
# {
# if (printFormletter || printEuVatInvoice)
# {
# // Print
# parmNum = purchParmTable.Num;
# this.insertProforma();
#
# // When printing, only save draft invoice if user chose to save, or user is posting document on hold
# if (this.parmSaveChanges() || (!purchParmUpdate.Proforma && purchParmTable.Hold == NoYes::Yes))
# {
# // Set status to Pending and save draft invoice
# purchParmTable.VendInvoiceSaveStatus = VendInvoiceSaveStatus::Pending;
# purchParmTable.Num = parmNum;
# this.insertDraft();
# }
# }
# else
# {
# // Not posting or printing - save any pending documents
# if (purchParmTable.VendInvoiceSaveStatus == VendInvoiceSaveStatus::Pending)
# {
# // Save draft invoice
# this.insertDraft();
# }
# }
# }
# else
# {
# // Post
# this.insertJournal();
# }
#
# if (printout == Printout::Current && ! purchParmUpdate.Proforma && purchParmTable.Hold == NoYes::No)
# {
# this.printJournal();
# }
#}
#
ENDSOURCE
SOURCE #createParmLine
#///
#/// Creates a purchase parameter line and purchase parameter asset line for the given purchase line.
#///
#///
#/// The purchase line to reference when creating the parameter lines
#///
#///
#/// A TradeLineRefId value used on the purchase parameter line.
#///
#///
#/// true if the parameter lines are created successfully; otherwise, false.
#///
#public boolean createParmLine(PurchLine _purchLine,
# TradeLineRefId _tableRef = '')
#{
# boolean lineCreated = false;
# PurchParmLine localPurchParmLine;
# PurchParmLine_Asset localPurchParmLine_Asset;
#
# // Israel-Localisation-Prodware-ImportFolder-Begin
# PurchQty purchQty;
# // Israel-Localisation-Prodware-ImportFolder-End
# ;
#
# if (_purchLine.RecId && !this.existWaitingParmLines(parmId, _purchLine.PurchId, _purchLine.InventTransId))
# {
# localPurchParmLine.clear();
#
# if (interCompanyParmId
# && !this.interCompanyParmSelectFromJournal())
# {
# localPurchParmLine.Closed = this.interCompanyParmLineClosed(_purchLine);
# [localPurchParmLine.ReceiveNow, localPurchParmLine.RemainBefore , localPurchParmLine.RemainAfter ] = this.qtyPurch (_purchLine, this.interCompanyParmLineQty(_purchLine));
# [localPurchParmLine.InventNow, localPurchParmLine.RemainBeforeInvent, localPurchParmLine.RemainAfterInvent] = this.qtyInvent(_purchLine,
# UnitConvert::qty(this.interCompanyParmLineQty(_purchLine), _purchLine.PurchUnit, _purchLine.inventTable().inventUnitId(), _purchLine.ItemId));
# purchLine.PurchReceivedNow = localPurchParmLine.ReceiveNow;
# purchLine.setInventReceivedNow();
# if (localPurchParmLine.Closed)
# {
# localPurchParmLine.RemainAfter = 0;
# localPurchParmLine.setRemainAfterInvent();
# }
# }
# else
# {
# // Israel-Localisation-Prodware-ImportFolder-Begin
# if (BPLImpFolderId && purchParmUpdate.SpecQty != PurchUpdate::ReceiveNow)
# {
# purchQty = BPLImpFolderLine::find(_purchLine.InventTransId,BPLImpFolderId).Qty - BPLImpFolderLine::find(_purchLine.InventTransId,BPLImpFolderId).TransQty();
# purchQty = (purchQty < 0 ? 0 : purchQty);
# [localPurchParmLine.ReceiveNow, localPurchParmLine.RemainBefore , localPurchParmLine.RemainAfter ] = this.qtyPurch (_purchLine, purchQty);
# [localPurchParmLine.InventNow, localPurchParmLine.RemainBeforeInvent, localPurchParmLine.RemainAfterInvent] = this.qtyInvent(_purchLine, purchQty);
# }
# else
# {
# // Israel-Localisation-Prodware-ImportFolder-End
# [localPurchParmLine.ReceiveNow, localPurchParmLine.RemainBefore , localPurchParmLine.RemainAfter ] = this.qtyPurch (_purchLine, naReal());
# [localPurchParmLine.InventNow, localPurchParmLine.RemainBeforeInvent, localPurchParmLine.RemainAfterInvent] = this.qtyInvent(_purchLine, naReal());
# }
# }
#
# if (localPurchParmLine.ReceiveNow)
# {
# localPurchParmLine.ParmId = purchParmUpdate.ParmId;
# localPurchParmLine.initFromPurchLine(_purchLine);
# localPurchParmLine.setLineAmount();
# localPurchParmLine.TableRefId = _tableRef;
# this.insertPurchParmLine(localPurchParmLine);
#
# localPurchParmLine_Asset.clear();
# localPurchParmLine_Asset.initFromPurchLine(_purchLine);
# localPurchParmLine_Asset.initFromPurchParmLine(localPurchParmLine);
# this.insertPurchParmLine_Asset(localPurchParmLine_Asset);
#
# lineCreated = true;
#
# this.allowCreateParmTable(true);
#
# #if.never //#Speedtest
# if (speedExecute_Purch)
# speedExecute_Purch.timing(SpeedPurchTiming::ParmLineInsert, strfmt(purchParmLine.parmId, purchParmLine.itemId));
# #endif
# }
# }
#
# return lineCreated;
#}
#
ENDSOURCE
SOURCE #createParmLineFromWMSJournalTrans
#protected void createParmLineFromWMSJournalTrans(PurchLine _purchLine,
# InventQty _qtyReceived,
# TradeLineRefId _tableRef)
#{
# throw error(Error::missingOverload(funcname()));
#}
ENDSOURCE
SOURCE #createParmTable
#void createParmTable(PurchParmTable _purchParmTable,
# PurchTable _purchTable,
# Name _purchName = _purchTable.PurchName,
# VendName _deliveryName = _purchTable.DeliveryName,
# Addressing _deliveryAddress = _purchTable.DeliveryAddress)
#{
# this.calcAutomaticTotalDiscount(_purchTable);
# _purchParmTable.initFromPurchTable(_purchTable);
#
# _purchParmTable.PurchName = _purchName;
# _purchParmTable.DeliveryName = _deliveryName;
# _purchParmTable.DeliveryAddress = _deliveryAddress;
#
# _purchParmTable.ParmId = purchParmUpdate.ParmId;
# _purchParmTable.Ordering = this.documentStatus();
# _purchParmTable.BatchAdministration = multiForm;
# _purchParmTable.TransDate = this.transDate();
#
# _purchParmTable.Approved = this.approved();
# _purchParmTable.ApprovedBy = this.approvedBy();
# _purchParmTable.DocumentNum = this.documentNum();
# _purchParmTable.DocumentDate = this.documentDate();
# _purchParmTable.PaymId = this.paymentId(_purchTable);
# _purchParmTable.PaymMode = this.paymMode(_purchTable);
# _purchParmTable.PaymSpec = this.paymSpec(_purchTable);
# _purchParmTable.VendBankAccountID = this.vendBankAccountId(_purchTable);
# _purchParmTable.FixedDueDate = this.fixedDueDate(_purchTable);
#
# _purchParmTable.FixedExchRate = this.fixedExchRateInit();
# _purchParmTable.ExchRate = this.exchRateInit();
# _purchParmTable.ExchRateSecondary = this.exchRateSecondaryInit();
# _purchParmTable.euroTriangulation = this.euroTriangulationInit();
#
# _purchParmTable.ParmJobStatus = ParmJobStatus::Waiting;
#
# if (this.interCompanyParmId()
# && this.sumNum())
# {
# _purchParmTable.Num = this.sumNum();
# }
#
# if (!_purchParmTable.Num)
# _purchParmTable.Num = this.parmParmTableNum();
#}
ENDSOURCE
SOURCE #createParmUpdate
#void createParmUpdate(boolean _allowRecommendedSpecQty = true)
#{;
# purchParmUpdate.ParmId = this.parmId();
# purchParmUpdate.DocumentStatus = this.documentStatus();
# if (!specQtyIsSet)
# {
# purchParmUpdate.SpecQty = (_allowRecommendedSpecQty && !purchParmUpdate.RecId) ? this.specQty(this.recommendedSpecQty()) : this.specQty();
# }
# purchParmUpdate.SumBy = this.sumByInit();
# purchParmUpdate.SumPurchId = '';
# purchParmUpdate.SumNum = this.sumNum();
# purchParmUpdate.SumIncludePending = NoYes::Yes;
# purchParmUpdate.CheckCreditMax = VendParameters::find().CreditMaxCheck;
# purchParmUpdate.Storno = VendParameters::find().CreditError;
# purchParmUpdate.LateSelection = false;
# purchParmUpdate.SplitDeliveryInformation = this.getSplitDeliveryInformation();
# purchParmUpdate.CreditRemaining = this.creditRemaining();
#
# // When called from the batch dialog the record already exists
# if (! PurchParmUpdate::exist(purchParmUpdate.ParmId))
# purchParmUpdate.insert();
#}
ENDSOURCE
SOURCE #createPayment
#protected void createPayment()
#{
#}
ENDSOURCE
SOURCE #creditMaxOk
#protected boolean creditMaxOk(AmountMST _amountMST)
#{
# PurchTotals received;
#
# if (PaymTerm::cashAccount(purchTable.Payment))
# return true;
#
# if (_amountMST > 0 && purchParmUpdate.isCreditCheckEligible())
# {
# if (purchParmUpdate.CheckCreditMax == TypeOfCreditmaxCheck::BalanceDelivered)
# {
# // deduct whatever is already received as it will added later (in PurchTable::balanceAmountDelivered())
# received = PurchTotals::newPurchTable(this.purchTable(), PurchUpdate::PackingSlip);
# received.calc();
# _amountMST -= Currency::mstAmount(received.purchTotalAmount(), this.purchTable().CurrencyCode, purchTotals.invoiceDate());
#
# }
#
# return VendTable::checkCreditLimit(purchTable.InvoiceAccount, purchParmUpdate.CheckCreditMax, _amountMST, purchTable.PurchId);
# }
#
# return true;
#}
ENDSOURCE
SOURCE #creditRemaining
#boolean creditRemaining(boolean _creditRemaining = purchParmUpdate.CreditRemaining)
#{;
# purchParmUpdate.CreditRemaining = _creditRemaining;
# return purchParmUpdate.CreditRemaining;
#}
ENDSOURCE
SOURCE #currentPurchParmTable
#PurchParmTable currentPurchParmTable()
#{
# return purchParmTable;
#}
ENDSOURCE
SOURCE #dialog
#Object dialog()
#{
# FormRun purchEditLines;
# ;
#
# purchEditLines = classfactory.formRunClass(FormLetter::newClientArgs(formstr(PurchEditLines), this));
#
# purchEditLines.init();
#
# return purchEditLines;
#}
ENDSOURCE
SOURCE #displayProgress
#protected void displayProgress()
#{
# this.progressUpdate(strfmt("@SYS26810",purchTable.PurchId,purchLine.ItemId));
#}
ENDSOURCE
SOURCE #documentDate
#DocumentDate documentDate()
#{
# return dateNull();
#}
ENDSOURCE
SOURCE #documentNum
#Num documentNum()
#{
# return '';
#}
ENDSOURCE
SOURCE #editLinesChanged
#boolean editLinesChanged(boolean _editLinesChanged = editLinesChanged)
#{;
# editLinesChanged = _editLinesChanged;
#
# return editLinesChanged;
#}
ENDSOURCE
SOURCE #enableUpdateNowField
#public boolean enableUpdateNowField(boolean _enableUpdateNow = enableUpdateNow)
#{
# ;
# enableUpdateNow = _enableUpdateNow;
#
# return enableUpdateNow;
#}
ENDSOURCE
SOURCE #endUpdate
#void endUpdate()
#{
# ;
#
# if (purchParmUpdate.Proforma)
# {
# ttsbegin;
# purchParmUpdate = PurchParmUpdate::find(purchParmUpdate.ParmId, true);
# purchParmUpdate.delete();
# ttscommit;
# }
#
# if (PurchParmUpdate::exist(this.parmId()))
# {
# ttsbegin;
#
# purchParmUpdate = PurchParmUpdate::find(purchParmUpdate.ParmId, true);
#
# purchParmUpdate.StartDateTime = startDateTimeUpdate;
# purchParmUpdate.EndDateTime = DateTimeUtil::newDateTime(systemdateget(),timenow(),DateTimeUtil::getUserPreferredTimeZone());
# purchParmUpdate.update();
#
# ttscommit;
# }
#}
#
ENDSOURCE
SOURCE #EUROTriangulationInit
#protected EUROTriangulation euroTriangulationInit()
#{
# return PurchParmTable::defaultEUROTriangulation();
#}
ENDSOURCE
SOURCE #exchRateInit
#protected VendExchRate exchRateInit()
#{
# return PurchParmTable::defaultExchRate();
#}
ENDSOURCE
SOURCE #exchRateSecondaryInit
#protected ExchrateSecondary exchRateSecondaryInit()
#{
# return PurchParmTable::defaultExchRateSecondary();
#}
ENDSOURCE
SOURCE #existWaitingParmLines
#///
#/// Determines whether there are any lines for a given document already created in the PurchParmLine table.
#///
#///
#/// The ParmId of the document.
#///
#///
#/// The Purchase ID of the document.
#///
#///
#/// The Lot ID for the purchase line to find existing lines for.
#///
#///
#/// true if there are any lines already created for the document in PurchParmLine table; otherwise, false.
#///
#protected boolean existWaitingParmLines(ParmId _parmId,
# PurchId _purchId,
# InventTransId _inventTransId)
#{
# return purchParmLineMap.exists(this.purchParmLineMapKey(_purchId,_inventTransId));
#}
#
#
ENDSOURCE
SOURCE #fixedDueDate
#PurchFixedDueDate fixedDueDate(PurchTable _purchTable)
#{
# return dateNull();
#}
ENDSOURCE
SOURCE #fixedEuroTriangulation
#protected UnknownNoYes fixedEuroTriangulation()
#{
# return UnknownNoYes::Unknown;
#}
#
ENDSOURCE
SOURCE #fixedExchRate
#protected VendExchRate fixedExchRate()
#{
# return 0;
#}
#
ENDSOURCE
SOURCE #fixedExchRateInit
#protected FixedExchRate fixedExchRateInit()
#{
# return NoYes::No;
#}
ENDSOURCE
SOURCE #fixedExchRateSecondary
#protected ExchrateSecondary fixedExchRateSecondary()
#{
# return 0;
#}
#
ENDSOURCE
SOURCE #getNumAndVoucher
#container getNumAndVoucher()
#{
# container numAndVoucher;
# ;
#
# if (useInternalNumber)
# {
# numAndVoucher = numberSeq.numAndVoucher();
#
# return [internalNumber, conpeek(numAndVoucher,1), conpeek(numAndVoucher,2)];
# }
# else
# {
# return [internalNumber, '', numberSeq.voucher()];
# }
#}
ENDSOURCE
SOURCE #getPurchLine
#protected PurchLine getPurchLine(PurchParmLine _purchParmLine,
# boolean _forupdate = false)
#{
# PurchLine _purchLine;
# ;
#
# _purchLine.selectForUpdate(_forupdate);
#
# select firstonly _purchLine
# where _purchLine.RecId == _purchParmLine.PurchLineRecId;
#
# if (! PurchTable::exist(_purchLine.PurchId))
# throw error("@SYS18699");
#
# return _purchLine;
#}
ENDSOURCE
SOURCE #initLedgerJournalTrans
#protected void initLedgerJournalTrans(LedgerJournalTrans _ledgerJournalTrans)
#{
# throw error(Error::missingOverload(funcname()));
#}
ENDSOURCE
SOURCE #initLedgerVoucher
#protected void initLedgerVoucher(TransactionTxt _transactionTxt,
# TransDate _transactionDate = purchParmTable.TransDate)
#{
# LedgerVoucherObject ledgerVoucherObject;
# ;
#
# if (!ledgerVoucherIsSet)
# {
# ledgerVoucher = LedgerVoucher::newLedgerPost(DetailSummary::Summary,
# SysModule::Purch,
# numberSeq.parmVoucherSequenceCode());
#
# ledgerVoucherObject = LedgerVoucherObject::newVoucher(voucher,
# _transactionDate,
# SysModule::Purch,
# LedgerTransType::Purch,
# (creditNote ? purchParmUpdate.Storno : NoYes::No));
#
# ledgerVoucherObject.parmDocument(
# purchParmTable.DocumentDate ? purchParmTable.DocumentDate : purchParmTable.TransDate,
# purchParmTable.Num);
# ledgerVoucherObject.parmTaxReference(this.tax().taxReference());
# ledgerVoucher.addVoucher(ledgerVoucherObject);
# }
#
# ledgerVoucher.findLedgerVoucherObject(voucher).lastTransTxt(_transactionTxt.txt());
#
#}
ENDSOURCE
SOURCE #initLinesQuery
#boolean initLinesQuery(boolean _deletePending = true)
#{
# boolean ret = true;
#
# container packedClass;
# container packedChooseLines;
# ;
#
# //If running on the client, execute initLinesQuery method on the server side to reduce the interaction between tiers
# if (!this.objectOnServer())
# {
# if (chooseLines)
# packedChooseLines = chooseLines.pack();
# else
# packedChooseLines = connull();
#
# [ret, packedClass, packedChooseLines] = PurchFormLetter::execInitLinesQueryOnServer(this.documentStatus(),
# this.parmId(),
# this.pack(),
# packedChooseLines);
# this.unpack(packedClass);
# this.chooseLinesQuery(new SysQueryRun(packedChooseLines));
# return ret;
# }
#
#
# this.updateQueryBuild();
#
# if (!this.promptChooseLines())
# {
# ret = false;
# }
# else
# {
# PurchParmTable::deleteWithoutUpdate(purchParmUpdate.ParmId, _deletePending);
#
# this.adjustLinesQuery(_deletePending);
#
# if (wmsJournalTable_ds)
# this.chooseLinesFromWMSJournalTable();
# else
# if (!purchParmUpdate.LateSelection)
# this.chooseLines(_deletePending); // if _deletePending then re-process additional lines to recreate from saved invoices
# }
# return ret;
#}
ENDSOURCE
SOURCE #initMarkup
#protected void initMarkup()
#{;
# markup = new Markup(purchTable.CurrencyCode);
# markup.setTax(this.tax());
# markup.parmExchRate(this.fixedExchRate(), this.fixedExchRateSecondary(), this.fixedEuroTriangulation());
#}
#
ENDSOURCE
SOURCE #initParameters
#void initParameters(PurchParmUpdate _purchParmUpdate = purchParmUpdate,
# Printout _printout = printout,
# NoYes _printFormLetter = printFormLetter,
# NoYes _printEUVatInvoice = printEUVatInvoice,
# NoYes _usePrintManagement = usePrintManagement)
#{;
# purchParmUpdate = _purchParmUpdate;
# number = _purchParmUpdate.SumNum;
# printout = _printout;
# printFormLetter = _printFormLetter;
# printEUVatInvoice = _printEUVatInvoice;
# usePrintManagement = _usePrintManagement;
#
# if (purchParmUpdate.SumBy) // && purchParmUpdate.sumPurchId)
# {
# ttsbegin;
#
# purchParmTable.reread();
#
# update_recordset purchParmTable
# setting num = purchParmUpdate.SumNum
# where purchParmTable.ParmId == purchParmTable.ParmId
# && purchParmTable.PurchId == purchParmUpdate.SumPurchId;
#
# ttscommit;
# }
#}
ENDSOURCE
SOURCE #initParmDefault
#public void initParmDefault()
#{
# useInternalNumber = false;
# purchParmUpdate.SumBy = PurchParameters::find().SummaryUpdateBy;
#
# super();
#}
ENDSOURCE
SOURCE #initParmPurchTable
#protected void initParmPurchTable(PurchTable _purchTable)
#{;
# purchTable = _purchTable;
#}
ENDSOURCE
SOURCE #initParmUpdate
#protected void initParmUpdate(boolean createNew = false)
#{;
# if (createNew)
# {
# purchParmUpdate.clear();
#
# purchParmUpdate.ParmId = this.parmId();
# purchParmUpdate.DocumentStatus = this.documentStatus();
# }
# else
# {
# purchParmUpdate = PurchParmUpdate::find(this.parmId());
# }
#}
ENDSOURCE
SOURCE #initQueryBuild
#protected void initQueryBuild()
#{;
# chooseLines = new SysQueryRun(querystr(PurchUpdate));
#}
ENDSOURCE
SOURCE #insertDraft
#///
#/// Inserts a draft copy of the document from the current PurchParmTable table.
#///
#///
#/// You must override this method in classes that derive from PurchFormLetter.
#///
#protected void insertDraft()
#{
# throw error(Error::missingOverload(funcname()));
#}
ENDSOURCE
SOURCE #insertJournal
#protected void insertJournal()
#{
# try
# {
# ttsbegin;
#
# numberSeq = this.allocateNumAndVoucher();
# [number, internalNumber, voucher] = this.getNumAndVoucher();
#
# if (!this.updateNow())
# throw error(strfmt("@SYS21533"));
#
# this.postUpdate();
#
# this.interCompanyPost();
#
# TransactionLog::create(this.transactionLogType(),this.transactionLogTxt());
#
# if (updateSalesLines && updateSalesLinesQuery)
# this.updateSalesTable(updateSalesLinesQuery);
# ttscommit;
#
# if (numberSeq)
# numberSeq.used();
#
# this.createPayment();
# }
# catch(Exception::Error)
# {
# ttsabort;
# throw error("@SYS93835");
# }
#}
ENDSOURCE
SOURCE #insertProforma
#protected void insertProforma()
#{;
# ttsbegin;
#
#// purchParmTable = PurchParmTable::find(purchTable.purchId, purchParmUpdate.parmId, true);
#
# this.setForUpdatePurchParmTable();
# purchParmTable.Num = '';
#
# this.initJournal();
#
# purchLine.clear();
# purchParmLine.clear();
#
# recordListPurchParmLine.first(purchParmLine);
# while (purchParmLine)
# {
# if (! this.checkDiscardLine())
# {
# purchLine.RecId = purchParmLine.PurchLineRecId;
# recordListPurchLine.find(purchLine);
#
# this.displayProgress();
#
# updateNow = purchParmLine.ReceiveNow;
# updateNowInvent = purchParmLine.InventNow;
# lineValue = purchParmLine.lineAmountExclTax(purchParmTable.TransDate);
# lineValueInclTax = purchParmLine.LineAmount;
#
# this.initJournalLine();
# this.writeJournalLine();
# }
#
# if (! recordListPurchParmLine.next(purchParmLine))
# break;
# }
#
# if (!this.checkIfSomethingIsPosted())
# throw error(strfmt("@SYS21533"));
#
# this.writeJournal();
# this.interCompanyPost();
# this.printJournal();
#
# ttscommit;
#}
ENDSOURCE
SOURCE #InsertPurchParmLine
#protected void insertPurchParmLine(PurchParmLine _purchParmLine)
#{;
#// RecId is needed if purchParmSubLines and markupTrans are going to be created.
# _purchParmLine.RecId = systemSequence.reserveValues(1,tablenum(PurchParmLine));
#
# purchParmLineMap.insert(this.purchParmLineMapKey(_purchParmLine.OrigPurchId,_purchParmLine.InventTransId),_purchParmLine);
# recordInsertPurchParmLine.add(_purchParmLine);
#}
ENDSOURCE
SOURCE #insertPurchParmLine_Asset
#///
#/// Inserts a PurchParmLine_Asset table buffer into the recordInsertPurchParmLine_Asset RecordInsertList so it can be committed later.
#///
#///
#/// The PurchParmLine_Asset table buffer to be inserted.
#///
#protected void insertPurchParmLine_Asset(PurchParmLine_Asset _purchParmLine_Asset)
#{
# ;
#
# _purchParmLine_Asset.RecId = systemSequence.reserveValues(1,tablenum(PurchParmLine_Asset));
# recordInsertPurchParmLine_Asset.add(_purchParmLine_Asset);
#}
#
ENDSOURCE
SOURCE #InsertPurchParmSubTable
#protected void insertPurchParmSubTable(PurchParmSubTable _purchParmSubTable)
#{;
#// RecId is needed if markupTrans are going to be created.
# _purchParmSubTable.RecId = systemSequence.reserveValues(1, tablenum(PurchParmSubTable));
# recordInsertPurchParmSubTable.add(_purchParmSubTable);
# purchParmSubTableMap.insert(
# this.purchParmSubTableMapKey(_purchParmSubTable.TableRefId, _purchParmSubTable.OrigPurchId),
# _purchParmSubTable);
#}
ENDSOURCE
SOURCE #InsertPurchParmTable
#protected void insertPurchParmTable(PurchParmTable _purchParmTable, boolean _skipSubTable = false)
#{
# PurchParmSubTable purchParmSubTable;
# ;
#// RecId is needed if markupTrans and taxWorkRegulation are going to be created.
# _purchParmTable.RecId = systemSequence.reserveValues(1, tablenum(PurchParmTable));
# recordInsertPurchParmTable.add(_purchParmTable);
# purchParmTableMap.insert(this.purchParmTableMapKey(_purchParmTable.PurchId,
# _purchParmTable.DeliveryName,
# _purchParmTable.DeliveryAddress),
# _purchParmTable);
#
# if (!_skipSubTable)
# {
# purchParmSubTable = PurchParmSubTable::createFromPurchParmTable(_purchParmTable,false);
# this.insertPurchParmSubTable(purchParmSubTable);
# }
#}
ENDSOURCE
SOURCE #intercompanyInvoiceNum
#protected Num interCompanyInvoiceNum(PurchTable _purchTable)
#{
# return '';
#}
ENDSOURCE
SOURCE #interCompanyMarkupAllocation
#protected void interCompanyMarkupAllocation()
#{;
#}
ENDSOURCE
SOURCE #interCompanyMarkupAllocationForDDPO
#///
#/// Allocates MarkupTrans for an InterCompany PO marked for Direct Delivery.
#///
#///
#/// A PurchTable table record.
#///
#protected void interCompanyMarkupAllocationForDDPO(PurchTable _purchTable)
#{
# ;
#}
ENDSOURCE
SOURCE #interCompanyMarkupAllocationForPObyInv
#///
#/// Allocation MarkupTrans for an InterCompany PO using a given IC SO Invoice number.
#///
#///
#/// A PurchTable table record.
#///
#///
#/// A Sales Order invoice identifier.
#///
#protected void interCompanyMarkupAllocationForPOByInv(PurchTable _purchTable, InvoiceId _invoiceId)
#{
# ;
#}
ENDSOURCE
SOURCE #interCompanyNoSalesFormletterUpdate
#boolean interCompanyNoSalesFormletterUpdate(boolean _noSalesFormletterUpdate = interCompanyNoSalesFormletterUpdate)
#{;
# interCompanyNoSalesFormletterUpdate = _noSalesFormletterUpdate;
#
# return interCompanyNoSalesFormletterUpdate;
#}
#
ENDSOURCE
SOURCE #interCompanyParmLineClosed
#boolean interCompanyParmLineClosed(Common _common)
#{
# PurchLine _purchLine = _common;
# PurchTable _purchTable = _purchLine.purchTable();
# SalesParmLine salesParmLine;
#;
# if (interCompanyCompanyId)
# {
# changecompany(interCompanyCompanyId)
# {
# select firstonly Closed from salesParmLine
# where salesParmLine.ParmId == interCompanyParmId
# && salesParmLine.OrigSalesId == _purchTable.InterCompanySalesId
# && salesParmLine.InventTransId == _purchLine.InterCompanyInventTransId;
# }
# }
# else
# {
# select firstonly Closed from salesParmLine
# where salesParmLine.ParmId == interCompanyParmId
# && salesParmLine.OrigSalesId == _purchLine.InventRefId
# && salesParmLine.InventTransId == _purchLine.InventRefTransId;
# }
#
# return salesParmLine.Closed;
#}
#
ENDSOURCE
SOURCE #interCompanySelectFromJournal
#boolean interCompanySelectFromJournal()
#{
# boolean ret;
#
# ret = super();
#
# if (purchParmUpdate.SpecQty == PurchUpdate::PackingSlip)
# {
# ret = true;
# }
#
# return ret;
#}
ENDSOURCE
SOURCE #interCompanyTransferBatchSerial
#public void interCompanyTransferBatchSerial(StatusIssue _statusIssue = StatusIssue::OnOrder)
#{
# InterCompanyEndpointActionPolicyTransfer actionPolicyTransfer;
# SalesTable interCompanySalesTableOriginal;
# SalesTable interCompanySalesTable;
#;
# if (purchLine
# && purchLine.InterCompanyInventTransId
# && purchLine.purchTable().isInterCompanyOrder())
# {
# if (purchParmLine.ReceiveNow < 0)
# {
# actionPolicyTransfer = purchLine.purchTable().interCompanyEndpointActionPolicy().transferExternal();
# InterCompanyTransferInventDim::doTransfer(purchLine.DataAreaId,
# purchLine.InventTransId,
# purchLine.purchTable().InterCompanyCompanyId,
# purchLine.InterCompanyInventTransId,
# actionPolicyTransfer,
# _statusIssue,
# purchParmTable.Num);
# }
# else if (purchParmLine.ReceiveNow > 0 && purchLine.OverDeliveryPct > 0 && purchParmLine.ReceiveNow > purchParmLine.RemainBefore)
# {
# interCompanySalesTableOriginal = purchLine.purchTable().interCompanySalesTableOriginal();
#
# if (interCompanySalesTableOriginal.InterCompanyDirectDelivery)
# {
# interCompanySalesTable = purchLine.purchTable().interCompanySalesTable();
# actionPolicyTransfer = interCompanySalesTable.interCompanyEndpointActionPolicy().transferExternal();
# InterCompanyTransferInventDim::doTransfer(purchLine.purchTable().InterCompanyCompanyId,
# purchLine.InterCompanyInventTransId,
# purchLine.DataAreaId,
# purchLine.InventTransId,
# actionPolicyTransfer,
# _statusIssue,
# purchParmTable.Num,
# false,
# false,
# true);
# }
# }
# }
#}
#
ENDSOURCE
SOURCE #interCompanyVoucher
#InterCompanyVoucher interCompanyVoucher(InterCompanyVoucher _interCompanyVoucher = interCompanyVoucher)
#{;
# interCompanyVoucher = _interCompanyVoucher;
# return interCompanyVoucher;
#}
ENDSOURCE
SOURCE #invoiceAccountInQuery
#boolean invoiceAccountInQuery()
#{
# return false;
#}
ENDSOURCE
SOURCE #isBatchProcess
#///
#/// Determines if the current process will be executed in a batch.
#///
#///
#/// true if process will be executed in a batch; otherwise, false.
#///
#public boolean isBatchProcess()
#{
# ;
#
# return this.batchInfo() && (this.batchInfo().parmBatchExecute() || this.mustGoBatch());
#}
ENDSOURCE
SOURCE #journal
#Common journal()
#{
# throw error(Error::missingOverload(funcname()));
#}
ENDSOURCE
SOURCE #lateSelectionRemoveLines
#boolean lateSelectionRemoveLines()
#{
# boolean ok = true;
# ;
#
# if (purchParmUpdate.LateSelection && purchParmUpdate.numberOfTables() > 0)
# {
# if (Box::yesNo("@SYS72909", DialogButton::Yes))
# {
# this.queryChooseLines(new SysQueryRun(querystr(PurchUpdate)));
#
# PurchParmTable::deleteWithoutUpdate(purchParmUpdate.ParmId);
# }
# else
# {
# purchParmUpdate.LateSelection = false;
# ok = false;
# }
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #ledgerJournalTrans
#LedgerJournalTrans ledgerJournalTrans()
#{
# return null;
#}
ENDSOURCE
SOURCE #ledgerJournalVendTrans
#VendTrans ledgerJournalVendTrans()
#{
# VendTrans vendTrans;
# ;
#
# return vendTrans;
#}
ENDSOURCE
SOURCE #mayJournalBePosted
#public boolean mayJournalBePosted(PurchTable _purchTable)
#{
# return super(_purchTable);
#}
ENDSOURCE
SOURCE #maySelectPO
#///
#/// Determines if a PurchTable table record may be selected for invoicing.
#///
#///
#/// A PurchTable table record.
#///
#///
#/// true if a PurchTable table record may be selected for invoicing; otherwise, false.
#///
#protected boolean maySelectPO(PurchTable _purchTable)
#{
# ;
# return true;
#}
ENDSOURCE
SOURCE #missingNumber
#str missingNumber()
#{
# return "@SYS24729";
#}
ENDSOURCE
SOURCE #modifyVoucherDate
#void modifyVoucherDate(TransDate _transDate)
#{
# throw error(Error::missingOverload(funcname()));
#}
ENDSOURCE
SOURCE #needVarianceApproval
#///
#/// Determines if the PurchParmTable table record proved needs variance approval.
#///
#///
#/// The record to be checked.
#///
#///
#/// true if the provided record allows variance approval, otherwise false.
#///
#///
#/// This method should be overriden by derived classes.
#///
#boolean needVarianceApproval(PurchParmTable _purchParmTable)
#{
# return false;
#}
#
ENDSOURCE
SOURCE #new
#void new(boolean getParmId = false)
#{
# super(getParmId);
#
# this.initParmUpdate(getParmId);
#
# purchQuantity = PurchQuantity::construct(this.documentStatus());
#
# reArrangeNow = true;
# updateSalesLines = false;
#}
ENDSOURCE
SOURCE #newJournalTransList
#abstract public void newJournalTransList()
#{
#}
#
ENDSOURCE
SOURCE #pack
#container pack()
#{
# throw error(Error::missingOverload(funcname()));
#}
ENDSOURCE
SOURCE #parmCallerTable
#public Common parmCallerTable(Common _callerTable = callerTable)
#{
# ;
# callerTable = _callerTable;
# return callerTable;
#}
ENDSOURCE
SOURCE #parmJournalTransList
#public RecordSortedList parmJournalTransList(RecordSortedList _journalTransList = journalTransList)
#{
# ;
# journalTransList = _journalTransList;
#
# return journalTransList;
#}
#
ENDSOURCE
SOURCE #parmParmTableNum
#Num parmParmTableNum(Num _parmTableNum = parmTableNum)
#{
# ;
# parmTableNum = _parmTableNum;
# return parmTableNum;
#}
ENDSOURCE
SOURCE #parmSalesPurchCycleAction
#SalesPurchCycleAction parmSalesPurchCycleAction(SalesPurchCycleAction _action = salesPurchCycleAction)
#{
# ;
# salesPurchCycleAction = _action;
# return salesPurchCycleAction;
#}
ENDSOURCE
SOURCE #parmSaveChanges
#///
#/// Gets or sets the SaveChanges member variable, if supported by the derived class.
#///
#///
#/// The value to set on the derived class.
#///
#///
#/// The value of the _SaveChanges parameter if the method has been overridden for the derived class; otherwise, false.
#///
#///
#/// This method must be overridden by derived classes supporting save functionality.
#///
#public boolean parmSaveChanges(boolean _saveChanges = false)
#{
# ;
# return false;
#}
ENDSOURCE
SOURCE #parmSourceTable
#public PurchTable parmSourceTable(PurchTable _purchTable = purchTable)
#{
# ;
# purchTable = _purchTable;
#
# return purchTable;
#}
ENDSOURCE
SOURCE #parmTable2Update
#public Common parmTable2Update(PurchParmTable _parmTable2Update = purchParmTable)
#{
# ;
# purchParmTable = _parmTable2Update;
# return purchParmTable;
#}
ENDSOURCE
SOURCE #paymentId
#PaymId paymentId(PurchTable _purchTable = null)
#{
# return '';
#}
ENDSOURCE
SOURCE #paymMode
#VendPaymMode paymMode(PurchTable _purchTable)
#{
# return '';
#}
ENDSOURCE
SOURCE #paymSpec
#VendPaymSpec paymSpec(PurchTable _purchTable)
#{
# return '';
#}
ENDSOURCE
SOURCE #postMarkupLine
#protected void postMarkupLine()
#{
# this.postMarkupOnTrans();
#}
#
ENDSOURCE
SOURCE #postMarkupOnJour
#protected void postMarkupOnJour(PurchTable _purchTableMarkup)
#{
#}
#
ENDSOURCE
SOURCE #postMarkupOnTrans
#protected void postMarkupOnTrans()
#{
#}
#
ENDSOURCE
SOURCE #postMarkupTable
#protected void postMarkupTable()
#{
# QueryRun queryRun;
# PurchTable purchTableMarkup;
# PurchParmSubTable purchParmSubTable;
# ;
#
# queryRun = new QueryRun(purchParmTable.queryPurchParmSubTable());
# while (queryRun.next())
# {
# purchTableMarkup = null;
# if (queryRun.changed(tablenum(PurchParmSubTable)))
# {
# purchParmSubTable = queryRun.get(tablenum(PurchParmSubTable));
#
# purchTableMarkup = purchParmSubTable.purchTable();
# }
#
# if (!purchTableMarkup)
# continue;
#
# this.postMarkupOnJour(purchTableMarkup);
# }
#}
#
ENDSOURCE
SOURCE #postTax
#protected void postTax(boolean post)
#{;
# purchCalcTax = PurchCalcTax::construct(this.journal(),AccountOrder::None,this.parmId());
# purchCalcTax.tax(this.tax());
# purchCalcTax.post(ledgerVoucher, post);
#}
#
ENDSOURCE
SOURCE #postUpdate
#protected void postUpdate()
#{
# ParmId parmIdPrev;
# PurchId purchIdPrev;
# ;
#
# ttsbegin;
#
# this.setForUpdatePurchParmTable();
#
# purchParmTable.StartDateTime = startDateTimeTable;
# purchParmTable.EndDateTime = DateTimeUtil::newDateTime(systemdateget(),timenow(), DateTimeUtil::getUserPreferredTimeZone());
#
# purchParmTable.Log = '';
#
# purchParmTable.updateParmJobStatusExecuted();
#
# purchParmLine.clear();
#
# recordListPurchParmLine.first(purchParmLine);
# while (purchParmLine)
# {
# if (purchIdPrev != purchParmLine.OrigPurchId || parmIdPrev != purchParmLine.ParmId)
# {
# if (purchIdPrev != purchParmLine.OrigPurchId)
# {
# // Count the number of unique POs that were updated
# ++numberOfRecords;
# }
#
# purchTable = purchParmLine.purchLine().purchTable(true);
# if (purchTable)
# {
# purchTable.updateDocumentStatus(this.documentStatus());
# purchTable.updateBackStatus();
# purchTable.updatePurchaseType();
# }
#
# purchParmTable = purchParmLine.purchParmTable(true);
# if (purchParmTable)
# {
# purchParmTable.updateParmJobStatusExecuted();
# }
# }
#
# purchIdPrev = purchParmLine.OrigPurchId;
# parmIdPrev = purchParmLine.ParmId;
#
# if (!recordListPurchParmLine.next(purchParmLine))
# break;
# }
#
# ttscommit;
#}
#
ENDSOURCE
SOURCE #prePromptInit
#boolean prePromptInit()
#{
# ;
#
# this.createParmUpdate();
#
# // Israel-Localisation-Prodware-ImportFolder-Begin
# //if (this.parmCallerTable() || purchTable || this.ledgerJournalTrans() || wmsJournalTable_ds)
# if (this.parmCallerTable() || purchTable || this.ledgerJournalTrans() || wmsJournalTable_ds || BPLImpFolderTable_ds)
# // Israel-Localisation-Prodware-ImportFolder-End
# {
# if (this.ledgerJournalTrans())
# {
# if (this.ledgerJournalTrans().PurchIdRange)
# this.showQueryForm(false);
# else
# this.showQueryForm(true);
# }
# else
# {
# this.showQueryForm(false);
# }
#
# if (!this.initLinesQuery())
# return false;
# }
# else
# {
# this.showQueryForm(true);
# }
#
# return true;
#}
ENDSOURCE
SOURCE #printerSettingsEUVatInvoice
#container printerSettingsEUVatInvoice()
#{
# return printerSettingsEUVatInvoice;
#}
ENDSOURCE
SOURCE #printEUVatInvoice
#boolean printEUVatInvoice()
#{
# return printEUVatInvoice;
#}
#
ENDSOURCE
SOURCE #printMgmtNodeType
#///
#/// Identifies the print management node type.
#///
#///
#/// The print management node type for purchase.
#///
#protected PrintMgmtNodeType printMgmtNodeType()
#{
# ;
# return PrintMgmtNodeType::Purch;
#}
ENDSOURCE
SOURCE #printout
#Printout printout()
#{
# ;
# if(this.proforma())
# {
# return Printout::Current;
# }
# return printout;
#}
ENDSOURCE
SOURCE #printPosted
#void printPosted()
#{
#}
ENDSOURCE
SOURCE #printSalesFormLetter
#boolean printSalesFormLetter(boolean _printSalesFormLetter = printSalesFormLetter)
#{;
# printSalesFormLetter = _printSalesFormLetter;
# return printSalesFormLetter;
#}
ENDSOURCE
SOURCE #proforma
#boolean proforma(boolean _proforma = purchParmUpdate.Proforma)
#{;
# purchParmUpdate.Proforma = _proforma;
# return purchParmUpdate.Proforma;
#}
ENDSOURCE
SOURCE #promptAndRun
#///
#/// Executes the "if prompt then run" scenario.
#///
#///
#/// This wrapper method should be used instead of manually calling prompt and runmethods
#/// For the correct functioning of a prompt method object the reference must be saved to the global cache and the prePromptInit method called. Getting the last saved values is also executed.
#///
#void promptAndRun()
#{
# SysGlobalCache cache = classfactory.globalCache();
# ParmId _parmId = this.parmId();
# ;
#
# this.getLast();
# this.resetParmListCommonCS();
# this.parmId(_parmId);
#
# //Save object reference to global cache
# cache.set(classstr(SalesFormLetter), _parmId, this);
#
# if (this.prePromptInit() && this.prompt())
# {
# this.run();
# }
#
# //Delete saved object reference from the global cache
# if (cache.isSet(classstr(SalesFormLetter), _parmId))
# cache.remove(classstr(SalesFormLetter), _parmId);
#}
ENDSOURCE
SOURCE #purchEditLinesExecuteQuery
#void purchEditLinesExecuteQuery()
#{
# purchEditLinesDatasource.executeQuery();
#}
ENDSOURCE
SOURCE #purchParmLineMapKey
#protected str purchParmLineMapKey(PurchId _purchId, InventTransId _inventTransId)
#{
# return _purchId + '#' + _inventTransId;
#}
ENDSOURCE
SOURCE #purchParmSubTableMapKey
#protected str purchParmSubTableMapKey(TradeLineRefId _tableRefId,
# PurchId _purchId)
#
#{
# return _tableRefId + '#' + _purchId;
#}
ENDSOURCE
SOURCE #purchParmTableMapKey
#protected str purchParmTableMapKey(PurchId _purchId,
# VendName _deliveryName,
# Addressing _deliveryAddress)
#{
# return _purchId + '#' + _deliveryName + '#' + _deliveryAddress;
#}
ENDSOURCE
SOURCE #purchParmUpdate
#PurchParmUpdate purchParmUpdate(PurchParmUpdate _purchParmUpdate = purchParmUpdate)
#{;
# purchParmUpdate = _purchParmUpdate;
# return purchParmUpdate;
#}
ENDSOURCE
SOURCE #purchSalesDocumentStatus
#anytype purchSalesDocumentStatus()
#{
# PurchPrintDocumentStatus purchPrintDocumentStatus;
#;
# switch(this.documentStatus())
# {
# case(DocumentStatus::PurchaseOrder): purchPrintDocumentStatus = PurchPrintDocumentStatus::PurchaseOrder; break;
# case(DocumentStatus::ReceiptsList) : purchPrintDocumentStatus = PurchPrintDocumentStatus::ReceiptsList; break;
# case(DocumentStatus::PackingSlip) : purchPrintDocumentStatus = PurchPrintDocumentStatus::PackingSlip; break;
# case(DocumentStatus::Invoice) : purchPrintDocumentStatus = PurchPrintDocumentStatus::Invoice; break;
# }
# return purchPrintDocumentStatus;
#}
ENDSOURCE
SOURCE #purchTable
#PurchTable purchTable(PurchTable _purchTable = purchTable)
#{;
# purchTable = _purchTable;
# return purchTable;
#}
ENDSOURCE
SOURCE #qtyInvent
#container qtyInvent(PurchLine _purchLine,
# InventQty qty = naReal())
#{
# return purchQuantity.qtyInvent(_purchLine, purchParmUpdate.SpecQty, qty, purchParmUpdate.CreditRemaining);
#}
ENDSOURCE
SOURCE #qtyPurch
#container qtyPurch(PurchLine _purchLine,
# PurchQty _qty = naReal(),
# PurchUpdate _specQty = purchParmUpdate.SpecQty)
#{;
# return purchQuantity.qtyPurch(_purchLine, _specQty, _qty, purchParmUpdate.CreditRemaining);
#}
ENDSOURCE
SOURCE #queryBuild
#QueryRun queryBuild()
#{
# Query query;
# QueryBuildDataSource dataSourceUpdate;
# QueryBuildDataSource dataSourceTable;
# QueryRun queryRun;
# ;
# #query
#
# query = new Query();
# dataSourceUpdate = query.addDataSource(tablenum(PurchParmUpdate));
# dataSourceTable = dataSourceUpdate.addDataSource(tablenum(PurchParmTable));
# dataSourceTable.relations(true);
#
# queryRun = new QueryRun(query);
# queryRun.query().dataSourceTable(tablenum(PurchParmUpdate)).addRange(fieldnum(PurchParmUpdate, ParmId)).value(purchParmUpdate.ParmId);
# queryRun.query().dataSourceTable(tablenum(PurchParmTable)).addSortField(fieldnum(PurchParmTable, TableRefId));
#
# if (this.isInBatch())
# {
# queryRun.query().dataSourceTable(tablenum(PurchParmTable)).addRange(fieldnum(PurchParmTable, ParmJobStatus)).value(queryValue(ParmJobStatus::Waiting));
# }
# queryRun.literals(#queryForcePlaceholders);
#
# return queryRun;
#}
ENDSOURCE
SOURCE #reArrange
#boolean reArrange(boolean clearTotals = false,
# boolean validate = true,
# boolean logErrors = false)
#{
# PurchSummary purchSummary;
# QueryRun query;
# PurchParmTable localPurchParmTable;
# PurchParmTable oldPurchParmTable;
# PurchParmSubTable localPurchParmSubTable;
# MarkupTrans localMarkupTrans;
# boolean hold;
# boolean notApproved;
#
# container packedClass;
# boolean result;
#
# void moveParmLine(PurchId _fromPurchId,
# TradeLineRefId _fromTableRefId,
# TradeLineRefId _toTableRefId)
# {
# ttsbegin;
#
# update_recordset purchParmLine
# setting tableRefId = _toTableRefId
# where purchParmLine.ParmId == purchParmUpdate.ParmId
# && purchParmLine.OrigPurchId == _fromPurchId
# && purchParmLine.TableRefId == _fromTableRefId;
#
# ttscommit;
# }
# ;
#
#
# //If running on the client, execute reArrange method on the server side to reduce the interaction between tiers
# if (!this.objectOnServer())
# {
# [result, packedClass] = PurchFormLetter::execReArrangeOnServer(this.documentStatus(), this.parmId(), this.pack(),
# clearTotals,
# validate);
# this.unpack(packedClass);
# return result;
# }
#
# if (validate && !this.validate())
# {
# return false;
# }
#
# if (!this.reArrangeValidate(logErrors))
# {
# return false;
# }
#
# purchSummary = PurchSummary::construct(purchParmUpdate.SumBy, purchParmUpdate.ParmId, purchParmUpdate.SumPurchId, this.documentStatus(), number);
# query = purchSummary.queryBuild();
#
# if (purchParmUpdate.SumPurchId)
# {
# purchSummary.summaryPurchId(purchParmUpdate.SumPurchId);
# purchSummary.summaryTableRef(FormLetter::getTableRef());
# }
#
# ttsbegin;
#
# while (query.next())
# {
# localPurchParmSubTable = query.get(tablenum(PurchParmSubTable));
# purchTable = localPurchParmSubTable.purchTable();
# oldPurchParmTable = localPurchParmSubTable.purchParmTable();
#
# if (this.allowReArrange(oldPurchParmTable))
# {
# if (!purchTable.isInterCompanyOrder() || purchParmUpdate.SumBy == AccountOrder::Auto)
# {
# if (this.checkIfPurchOrderExist(purchTable) && purchSummary.createNewJournal(purchTable))
# {
# if (!purchParmUpdate.SumPurchId)
# {
# purchSummary.summaryPurchId(purchTable.PurchId);
# purchSummary.summaryTableRef(FormLetter::getTableRef());
# }
#
# purchSummary.setFormLetterIdFromTrans(oldPurchParmTable.Num);
# if (oldPurchParmTable.RecId)
# {
# localPurchParmTable.data(oldPurchParmTable);
# if (localPurchParmTable.PurchId != purchTable.PurchId)
# this.updateParmTable(localPurchParmTable, purchTable);
# }
# else
# {
# localPurchParmTable.clear();
# this.createParmTable(localPurchParmTable, purchTable);
# }
#
# if (hold)
# {
# // Place the new journal on hold
# localPurchParmTable.Hold = NoYes::Yes;
# localPurchParmTable.VendInvoiceSaveStatus = VendInvoiceSaveStatus::Pending;
# hold = false;
# }
# if (notApproved)
# {
# // Make sure new journal is not approved
# localPurchParmTable.approveVariance(false, false);
# notApproved = false;
# }
# localPurchParmTable.TableRefId = purchSummary.summaryTableRef();
# localPurchParmTable.Num = purchSummary.formLetterId();
# localPurchParmTable.doInsert();
#
# if (oldPurchParmTable.RecId &&
# MarkupTrans::exist(oldPurchParmTable.TableId, oldPurchParmTable.RecId))
# {
# Markup::copy(NoYes::No, oldPurchParmTable, localPurchParmTable, true);
# }
# }
# // Not creating new journal
# else
# {
# // If the old purchParmTable was on hold or unapproved, make sure the new one matches
# if ((oldPurchParmTable.Hold == NoYes::Yes) || this.needVarianceApproval(oldPurchParmTable))
# {
# localPurchParmTable = PurchParmTable::find(purchParmUpdate.ParmId, purchSummary.summaryTableRef(), true);
# if (localPurchParmTable.RecId != 0)
# {
# // Check if an update is actually needed
# if ((oldPurchParmTable.Hold == NoYes::Yes && localPurchParmTable.Hold == NoYes::No) ||
# (oldPurchParmTable.VarianceApproved == NoYes::No && localPurchParmTable.VarianceApproved == NoYes::Yes))
# {
# // Update the new journal
# if (oldPurchParmTable.Hold == NoYes::Yes)
# {
# localPurchParmTable.Hold = NoYes::Yes;
# localPurchParmTable.VendInvoiceSaveStatus = VendInvoiceSaveStatus::Pending;
# }
# if (oldPurchParmTable.VarianceApproved == NoYes::No)
# {
# localPurchParmTable.approveVariance(false, false);
# }
# localPurchParmTable.doUpdate();
# }
# }
# else if (purchParmUpdate.SumPurchId)
# {
# // New journal doesn't exist yet; update flags so journal gets put on hold or unapproved when it is created
# hold = (hold || oldPurchParmTable.Hold == NoYes::Yes);
# notApproved = (notApproved || oldPurchParmTable.VarianceApproved == NoYes::No);
# }
# }
# }
#
# moveParmLine(localPurchParmSubTable.OrigPurchId, localPurchParmSubTable.TableRefId,
# purchSummary.summaryTableRef());
#
# localPurchParmSubTable.TableRefId = purchSummary.summaryTableRef();
# }
# else
# {
# purchSummary.setFormLetterIdFromTrans(oldPurchParmTable.Num);
# if (oldPurchParmTable.RecId)
# {
# localPurchParmTable.data(oldPurchParmTable);
# if (localPurchParmTable.PurchId != purchTable.PurchId)
# this.updateParmTable(localPurchParmTable, purchTable);
# }
# else
# {
# localPurchParmTable.clear();
# this.createParmTable(localPurchParmTable, purchTable);
# }
# localPurchParmTable.TableRefId = FormLetter::getTableRef();
# localPurchParmTable.Num = purchSummary.formLetterId();
# localPurchParmTable.doInsert();
#
# moveParmLine(localPurchParmSubTable.OrigPurchId, localPurchParmSubTable.TableRefId,
# localPurchParmTable.TableRefId);
#
# localPurchParmSubTable.TableRefId = localPurchParmTable.TableRefId;
# }
#
# if (localPurchParmSubTable.TableRefId != localPurchParmSubTable.orig().TableRefId &&
# !PurchParmSubTable::exist(localPurchParmSubTable.ParmId, localPurchParmSubTable.TableRefId, localPurchParmSubTable.OrigPurchId))
# {
# localPurchParmSubTable.doUpdate();
# }
# }
# }
#
# if (this.splitDeliveryInformation())
# {
# while select forceplaceholders purchParmTable
# where purchParmTable.ParmId == purchParmUpdate.ParmId
# join forupdate purchParmLine
# order by DeliveryAddress
# where purchParmLine.ParmId == purchParmTable.ParmId
# && purchParmLine.TableRefId == purchParmTable.TableRefId
# && (purchParmLine.DeliveryAddress != purchParmTable.DeliveryAddress
# || purchParmLine.DeliveryName != purchParmTable.DeliveryName)
# {
# localPurchParmTable = PurchParmTable::findDeliveryInformation(purchParmTable.ParmId, purchParmTable.PurchId, purchParmLine.DeliveryName, purchParmLine.DeliveryAddress);
# if (!localPurchParmTable.RecId)
# {
# localPurchParmTable.data(purchParmTable);
# localPurchParmTable.TableRefId = FormLetter::getTableRef();
# localPurchParmTable.DeliveryAddress = purchParmLine.DeliveryAddress;
# localPurchParmTable.DeliveryName = purchParmLine.DeliveryName;
# localPurchParmTable.doInsert();
# }
#
# localPurchParmSubTable = PurchParmSubTable::find(localPurchParmTable.ParmId, localPurchParmTable.TableRefId, purchParmLine.OrigPurchId);
# if (!localPurchParmSubTable.RecId)
# {
# localPurchParmSubTable.data(purchParmLine.purchParmSubTable());
# localPurchParmSubTable.TableRefId = localPurchParmTable.TableRefId;
# localPurchParmSubTable.doInsert();
# }
#
# purchParmLine.TableRefId = localPurchParmTable.TableRefId;
# purchParmLine.doUpdate();
# }
# }
#
# // Report any MarkupTrans that will be deleted via an association to
# // an orphaned invoice (PurchParmSubTable record without any lines).
# while select forceplaceholders MarkupCode from localMarkupTrans
# join OrigPurchId from localPurchParmSubTable
# where localPurchParmSubTable.ParmId == purchParmUpdate.ParmId
# && localPurchParmSubTable.TableId == localMarkupTrans.TransTableId
# && localPurchParmSubTable.RecId == localMarkupTrans.TransRecId
# notexists join purchParmLine
# where purchParmLine.ParmId == purchParmUpdate.ParmId
# && purchParmLine.TableRefId == localPurchParmSubTable.TableRefId
# && purchParmLine.OrigPurchId == localPurchParmSubTable.OrigPurchId
# {
# info(strfmt("@SYS120666", localMarkupTrans.MarkupCode, localPurchParmSubTable.OrigPurchId));
# }
#
# delete_from forceplaceholders localPurchParmSubTable
# where localPurchParmSubTable.ParmId == purchParmUpdate.ParmId
# notexists join purchParmLine
# where purchParmLine.ParmId == localPurchParmSubTable.ParmId
# && purchParmLine.TableRefId == localPurchParmSubTable.TableRefId
# && purchParmLine.OrigPurchId == localPurchParmSubTable.OrigPurchId;
#
# delete_from forceplaceholders localPurchParmTable
# where localPurchParmTable.ParmId == purchParmUpdate.ParmId
# notexists join localPurchParmSubTable
# where localPurchParmSubTable.ParmId == localPurchParmTable.ParmId
# && localPurchParmSubTable.TableRefId == localPurchParmTable.TableRefId;
#
# // Delete MarkupTrans that were allocated *to* a line *from* a summary header where the header is now gone
# // see the method MarkupAllocation_PurchParmLine*.setMarkupTransFields()
# delete_from forceplaceholders localMarkupTrans
# where localMarkupTrans.OrigTableId == localPurchParmTable.TableId
# exists join purchParmLine
# where purchParmLine.ParmId == purchParmUpdate.ParmId
# && purchParmLine.TableId == localMarkupTrans.TransTableId
# && purchParmLine.RecId == localMarkupTrans.TransRecId
# notexists join localPurchParmTable
# where localPurchParmTable.ParmId == purchParmUpdate.ParmId
# && localPurchParmTable.TableId == localMarkupTrans.OrigTableId
# && localPurchParmTable.RecId == localMarkupTrans.OrigRecId;
#
# if (clearTotals)
# purchParmUpdate.clearParmTableTotals();
#
# ttscommit;
#
# reArrangeNow = false;
#
# return true;
#}
#
ENDSOURCE
SOURCE #reArrangeNow
#boolean reArrangeNow(boolean _reArrangeNow = reArrangeNow)
#{
# reArrangeNow = _reArrangeNow;
# return reArrangeNow;
#}
ENDSOURCE
SOURCE #reArrangeValidate
#protected boolean reArrangeValidate(boolean _logErrors = false)
#{;
# return true;
#}
ENDSOURCE
SOURCE #recommendedSpecQty
#public PurchUpdate recommendedSpecQty()
#{
# return PurchUpdate::All;
#}
ENDSOURCE
SOURCE #recopyMarkupFromPurchTable
#///
#/// Deletes existing MarkupTrans on PurchParmSubTable and copies current MarkupTrans from PurchTable.
#///
#///
#/// A PurchTable table record.
#///
#///
#/// A PurchParmSubTable table record.
#///
#///
#/// true if the recopy was successful; otherwise, false.
#///
#protected boolean recopyMarkupFromPurchTable(PurchTable _purchTable, PurchParmSubTable _purchParmSubTable)
#{
# ;
# return true;
#}
ENDSOURCE
SOURCE #recordInsertListInit
#///
#/// Creates the Purchase Order record list and map variables.
#///
#protected void recordInsertListInit()
#{
# ;
# this.suspendRecIds();
# recordInsertPurchParmTable = new RecordInsertList(tablenum(PurchParmTable),true);
# recordInsertPurchParmSubTable = new RecordInsertList(tablenum(PurchParmSubTable));
# recordInsertPurchParmLine = new RecordInsertList(tablenum(PurchParmLine));
# recordInsertPurchParmLine_Asset = new RecordInsertList(tablenum(PurchParmLine_Asset));
#
# purchParmLineMap = new Map(Types::String,Types::Record);
# purchParmTableMap = new Map(Types::String,Types::Record);
# purchParmSubTableMap = new Map(Types::String,Types::Record);
#}
ENDSOURCE
SOURCE #recordInsertListInsert
#///
#/// Inserts records in the record lists into the database.
#///
#protected void recordInsertListInsert()
#{
# recordInsertPurchParmTable.insertDatabase();
# recordInsertPurchParmSubTable.insertDatabase();
# recordInsertPurchParmLine.insertDatabase();
# recordInsertPurchParmLine_Asset.insertDatabase();
# this.removeRecIdSuspension();
#}
ENDSOURCE
SOURCE #removeRecIdSuspension
#protected void removeRecIdSuspension()
#{
# ;
# systemSequence.removeRecIdSuspension(tablenum(PurchParmTable));
# systemSequence.removeRecIdSuspension(tablenum(PurchParmSubTable));
# systemSequence.removeRecIdSuspension(tablenum(PurchParmLine));
# systemSequence.removeRecIdSuspension(tablenum(PurchParmLine_Asset));
#}
ENDSOURCE
SOURCE #removeSavedDocumentWithNoLines
#///
#/// Removes any saved documents that have no lines.
#///
#///
#/// The group of invoices being posted.
#///
#void removeSavedDocumentWithNoLines(ParmId _parmId)
#{
#}
#
ENDSOURCE
SOURCE #reselect
#void reSelect(PurchUpdate _purchUpdate,
# NoYes _creditRemaining)
#{
# PurchParmTable _purchParmTable;
# PurchParmSubTable _purchParmSubTable;
# PurchLine _purchLine;
# PurchTable _purchTable;
#
#
# // Israel-Localisation-Prodware-ImportFolder-Begin
# BPLImpFolderLine _BPLImpFolderLine;
# // Israel-Localisation-Prodware-ImportFolder-End
#
# container packedFormLetterClass;
# ;
#
# //If running on the client, execute reSelect method on the server side to reduce the interaction between tiers
# if (!this.objectOnServer())
# {
# packedFormLetterClass = PurchFormLetter::execReSelectOnServer(this.documentStatus(), this.parmId(), this.pack(),
# _purchUpdate, _creditRemaining);
# this.unpack(packedFormLetterClass);
# return;
# }
#
#
# purchParmUpdate.SpecQty = _purchUpdate;
# purchParmUpdate.CreditRemaining = _creditRemaining;
# this.recordInsertListInit();
#
# ttsbegin;
#
# // Recreate lines for documents that do not have a status of pending
# while select forupdate forceplaceholders _purchParmTable
# where _purchParmTable.ParmId == purchParmUpdate.ParmId
# && _purchParmTable.VendInvoiceSaveStatus != VendInvoiceSaveStatus::Pending
# join _purchParmSubTable
# where _purchParmSubTable.ParmId == _purchParmTable.ParmId
# && _purchParmSubTable.TableRefId == _purchParmTable.TableRefId
# join _purchTable
# where _purchTable.PurchId == _purchParmSubTable.OrigPurchId
# {
# PurchParmLine::deleteFromPurchParmSubTable(_purchParmSubTable);
#
# setprefix(strfmt("@SYS76498", "@SYS15812", _purchTable.PurchId));
# currentInterCompanyInvoiceNum = this.interCompanyInvoiceNum(_purchTable);
# if(!this.recopyMarkupFromPurchTable(_purchTable, _purchParmSubTable))
# {
# // Recopy failed, so delete the entire invoice
# error("@SYS115806");
# _purchParmTable.delete();
# continue;
# }
#
# if (this.splitDeliveryInformation())
# {
# while select _purchLine
# index hint PurchLineIdx
# where _purchLine.PurchId == _purchParmSubTable.OrigPurchId
# && _purchLine.DeliveryAddress == _purchParmTable.DeliveryAddress
# && _purchLine.DeliveryName == _purchParmTable.DeliveryName
# && _purchLine.Blocked == NoYes::No
# {
# // Israel-Localisation-Prodware-ImportFolder-Begin
# if (!BPLImpFolderId || BPLImpFolderLine::find(_purchLine.InventTransId,BPLImpFolderId) || this.documentStatus() == DocumentStatus::PurchaseOrder)
# // Israel-Localisation-Prodware-ImportFolder-End
# this.createParmLine(_purchLine, _purchParmTable.TableRefId);
# }
# }
# else
# {
# while select _purchLine
# index hint PurchLineIdx
# where _purchLine.PurchId == _purchParmSubTable.OrigPurchId
# && _purchLine.Blocked == NoYes::No
# {
# // Israel-Localisation-Prodware-ImportFolder-Begin
# if (!BPLImpFolderId || BPLImpFolderLine::find(_purchLine.InventTransId,BPLImpFolderId) || this.documentStatus() == DocumentStatus::PurchaseOrder)
# // Israel-Localisation-Prodware-ImportFolder-End
# this.createParmLine(_purchLine, _purchParmTable.TableRefId);
# }
# }
# }
# this.recordInsertListInsert();
#
# ttscommit;
#
#}
#
ENDSOURCE
SOURCE #resetParmListCommonCS
#public void resetParmListCommonCS()
#{
# ;
# editLinesChanged = false;
# reArrangeNow = false;
# initAllowEmptyTable = false;
# allowEmptyTable = false;
# enableUpdateNow = false;
# showQueryForm = false;
# multiForm = false;
# transDate = dateNull();
# wmsJournalTableDsIsSet = false;
# number = '';
# purchTable = null;
#}
ENDSOURCE
SOURCE #run
#void run()
#{
# #OCCRetryCount
# QueryRun query;
#
# Counter infoLogCounter;
# LogText logText;
# PurchFormLetterEndMultiThread purchFormLetterEndMultiThread;
# FormLetterMultiThread formLetterMultiThread;
# boolean reArrangeOK;
# ;
#
# startDateTimeUpdate = DateTimeUtil::newDateTime(systemdateget(),timenow(), DateTimeUtil::getUserPreferredTimeZone());
#
# this.progressInit("@SYS95696", progressTotal, #AviFormLetter);
# progress.setText("@SYS26577");
#
# sumByLineNum = 1;
#
# if (!wmsJournalTableDsIsSet)
# wmsJournalTable_ds = null;
#
# if (purchParmUpdate.LateSelection)
# {
# if (this.isInBatch())
# {
# this.resetParmListCommonCS();
# this.transDate(systemdateget());
# }
#
# chooseLines = new QueryRun(purchParmUpdate.LateSelectionQuery);
# this.chooseLines(true);
#
# if (purchParmUpdate.numberOfLines() < 1)
# checkFailed("@SYS26185");
# }
# else
# {
# if (this.isInBatch())
# {
# this.transDate(purchParmTable.TransDate);
# }
# }
#
# this.removeSavedDocumentWithNoLines(purchParmUpdate.ParmId);
#
# if (! this.proforma())
# {
# this.newJournalTransList();
# }
#
# if (reArrangeNow)
# {
# reArrangeOK = this.reArrange(false, false, true);
# if (!reArrangeOK)
# {
# this.endUpdate();
# throw error(strfmt("@SYS21533"));
# }
# }
#
# if (this.canMultiThread())
# {
# batchHeader = BatchHeader::construct(this.parmCurrentBatch().BatchJobId);
# purchFormLetterEndMultiThread = PurchFormLetterEndMultiThread::newFormLetter(this,
# purchParmUpdate.ParmId,
# this.proforma());
# batchHeader.addRuntimeTask(purchFormLetterEndMultiThread,this.parmCurrentBatch().RecId);
# }
#
# query = this.queryBuild();
#
# if (printout == Printout::After && ! this.proforma())
# {
# journalList = this.newJournalList();
# }
#
# setprefix("@SYS95696");
#
# while (query.next())
# {
# infoLogCounter = infolog.num();
# infolog.updateViewSet(this);
#
# if (printout == Printout::Current || this.proforma())
# {
# journalList = this.newJournalList();
# }
#
# purchParmTable = query.get(tablenum(PurchParmTable));
#
# if (purchParmTable.PurchId != purchTable.PurchId)
# {
# purchTable = purchParmTable.purchTable();
# }
#
# if (this.checkIfPurchOrderExist(purchTable))
# {
# try
# {
# if (batchHeader)
# {
# formLetterMultiThread = FormLetterMultiThread::newFormLetter(this);
# batchHeader.addRuntimeTask(formLetterMultiThread,this.parmCurrentBatch().RecId);
# batchHeader.addDependency(purchFormLetterEndMultiThread,formLetterMultiThread,BatchDependencyStatus::FinishedOrError);
# }
# else
# {
# this.createJournal();
# this.printPosted();
# }
# }
#
# catch (Exception::Deadlock)
# {
# #if.never //#Speedtest
# If (speedExecute_Purch)
# speedExecute_Purch.timing(SpeedPurchTiming::DeadLockInvoice, purchParmLine.itemId);
# #endif
# this.removeJournalFromList();
# retry;
# }
#
# catch (Exception::UpdateConflict)
# {
# if (appl.ttsLevel() == 0)
# {
# if (xSession::currentRetryCount() >= #RetryNum)
# {
# throw Exception::UpdateConflictNotRecovered;
# }
# else
# {
# this.removeJournalFromList();
# retry;
# }
# }
# else
# {
# throw Exception::UpdateConflict;
# }
# }
#
# catch (Exception::Error)
# {
# this.removeJournalFromList();
#
# ttsbegin;
#
# logText = Info::infoCon2Str(infolog.copy(infoLogCounter+1,infolog.num()));
#
# infolog.updateViewSet(this, false);
#
# this.updateParmTableWithErrors(logText);
#
# ttscommit;
# }
# }
# else
# {
# if (purchParmUpdate.SumBy == AccountOrder::None)
# info(strfmt("@SYS15741", purchParmTable.PurchId));
# }
#
# infolog.updateViewSet(this, false);
# }
#
# if (batchHeader)
# {
# batchHeader.save();
# }
# else
# {
# if (printout == Printout::After && ! purchParmUpdate.Proforma)
# this.printJournal();
#
# this.endUpdate();
# }
#}
#
ENDSOURCE
SOURCE #setForUpdatePurchParmTable
#void setForUpdatePurchParmTable()
#{;
# purchParmTable = PurchParmTable::findRecId(purchParmTable.RecId, true);
#}
ENDSOURCE
SOURCE #setPurchEditLinesDataSource
#void setPurchEditLinesDataSource(FormDataSource datasource)
#{
# purchEditLinesDatasource = datasource;
#}
ENDSOURCE
SOURCE #specQty
#PurchUpdate specQty(PurchUpdate _specQty = purchParmUpdate.SpecQty)
#{;
# specQtyIsSet = true;
# purchParmUpdate.SpecQty = _specQty;
# return purchParmUpdate.SpecQty;
#}
ENDSOURCE
SOURCE #specQtyDefault
#void specQtyDefault()
#{
#}
ENDSOURCE
SOURCE #splitDeliveryInformation
#NoYes splitDeliveryInformation(NoYes _splitDeliveryInformation = purchParmUpdate.SplitDeliveryInformation)
#{;
# purchParmUpdate.SplitDeliveryInformation = _splitDeliveryInformation;
# return purchParmUpdate.SplitDeliveryInformation;
#}
ENDSOURCE
SOURCE #sumBy
#AccountOrder sumBy(AccountOrder _sumBy = purchParmUpdate.SumBy)
#{;
# purchParmUpdate.SumBy = _sumBy;
# return purchParmUpdate.SumBy;
#}
ENDSOURCE
SOURCE #sumByInit
#AccountOrder sumByInit()
#{;
# return PurchParameters::find().SummaryUpdateBy;
#}
ENDSOURCE
SOURCE #sumNum
#Num sumNum(Num _sumNum = purchParmUpdate.SumNum)
#{;
# purchParmUpdate.SumNum = _sumNum;
# return purchParmUpdate.SumNum;
#}
ENDSOURCE
SOURCE #sumPurchId
#PurchId sumPurchId(PurchId _sumPurchId = purchParmUpdate.SumPurchId)
#{;
# purchParmUpdate.SumPurchId = _sumPurchId;
# return purchParmUpdate.SumPurchId;
#}
ENDSOURCE
SOURCE #suspendRecIds
#protected void suspendRecIds()
#{
# ;
# systemSequence = new systemSequence();
# systemSequence.suspendRecIds(tablenum(PurchParmTable));
# systemSequence.suspendRecIds(tablenum(PurchParmSubTable));
# systemSequence.suspendRecIds(tablenum(PurchParmLine));
# systemSequence.suspendRecIds(tablenum(PurchParmLine_Asset));
#}
ENDSOURCE
SOURCE #syncToNewInvoice
#///
#/// Performs any synchronization needed when a new PurchParmTable table record is created.
#///
#///
#/// The newly created PurchParmTable table record.
#///
#///
#/// The invoice number used by an intercompany invoice.
#///
#protected void syncToNewInvoice(PurchParmTable _purchParmTable, Num _interCompanyInvoiceNum)
#{
#}
ENDSOURCE
SOURCE #transactionLogTxt
#protected TransTxt transactionLogTxt()
#{;
# throw error(Error::missingOverload(funcname()));
#}
ENDSOURCE
SOURCE #transactionLogType
#protected TransactionLogType transactionLogType()
#{
# throw error(Error::missingOverload(funcname()));
#}
ENDSOURCE
SOURCE #unpack
#boolean unpack(container packedClass)
#{
# throw error(Error::missingOverload(funcname()));
#}
ENDSOURCE
SOURCE #update
#void update(Common source,
# Num _number,
# TransDate _transDate = this.transDate(),
# PurchUpdate _specQty = PurchUpdate::All,
# AccountOrder _accountOrder = AccountOrder::None,
# NoYes _proforma = purchParmUpdate.Proforma,
# NoYes _printFormLetter = printFormLetter,
# NoYes _usePrintManagement = false,
# NoYes _creditRemaining = this.creditRemaining(),
# container _packedTmpFrmVirtualList = connull())
#{;
# switch(source.TableId)
# {
# case tablenum(PurchTable) : this.purchTable(source);
# this.initParmPurchTable(purchTable);
# break;
# }
#
# if (!_transDate)
# _transDate = systemdateget();
#
# this.parmParmTableNum (_number);
# this.transDate (_transDate);
# this.specQty (_specQty);
# this.proforma (_proforma);
# this.printFormLetter (_printFormLetter);
# this.usePrintManagement (_usePrintManagement);
# this.creditRemaining (_creditRemaining);
# this.sumNum (_number);
#
# this.createParmUpdate(false);
#
# this.initParameters(purchParmUpdate,
# Printout::Current); // Printout
#
# if(!purchParmUpdate.Proforma)
# {
# this.interCompanyMarkupAllocation();
# }
#
# this.initLinesQuery();
#
# if (_packedTmpFrmVirtualList)
# {
# this.selectFromJournal(_packedTmpFrmVirtualList);
# }
#
# this.progressHide();
#
# this.run();
#}
#
ENDSOURCE
SOURCE #updateDate
#TransDate updateDate()
#{
# return purchParmTable.updateDate();
#}
ENDSOURCE
SOURCE #updateParmTable
#void updateParmTable(PurchParmTable _purchParmTable,
# PurchTable _purchTable,
# Name _purchName = _purchTable.PurchName,
# VendName _deliveryName = _purchTable.DeliveryName,
# Addressing _deliveryAddress = _purchTable.DeliveryAddress)
#{
# _purchParmTable.initFromPurchTable(_purchTable);
#
# _purchParmTable.PurchName = _purchName;
# _purchParmTable.DeliveryName = _deliveryName;
# _purchParmTable.DeliveryAddress = _deliveryAddress;
#
# _purchParmTable.PaymMode = this.paymMode(_purchTable);
# _purchParmTable.PaymSpec = this.paymSpec(_purchTable);
# _purchParmTable.VendBankAccountID = this.vendBankAccountId(_purchTable);
# _purchParmTable.FixedDueDate = this.fixedDueDate(_purchTable);
#}
ENDSOURCE
SOURCE #updateParmTableWithErrors
#///
#/// Updates the current PurchParmTable table record with the provided log text.
#///
#///
#/// The log text to be assigned to the current PurchParmTable table record.
#///
#public void updateParmTableWithErrors(LogText _logText)
#{
# ;
#
# this.setForUpdatePurchParmTable();
#
# purchParmTable.Log = _logText;
# purchParmTable.updateParmJobStatusContainErrors();
#}
ENDSOURCE
SOURCE #updatePrinterSettingsEUVatInvoice
#protected void updatePrinterSettingsEUVatInvoice(container _printerSettings)
#{
# printerSettingsEUVatInvoice = _printerSettings;
#}
#
ENDSOURCE
SOURCE #updateQueryAndChooseLines
#///
#/// Executes the updateQueryBuild and the chooseLines methods on the server side to reduce the interaction between tiers.
#///
#///
#/// The PurchTable record used by chooseLines.
#///
#///
#/// Parameter of the chooseLines() method
#///
#///
#/// The PurchEditLines form executes updateQueryBuild, adjustLinesQuery and chooseLines methods on the PurchParmTable table write event. To minimize calls between tiers, this action is moved to the server side via this proxy method.
#/// The method uses the static method updateQueryAndChooseLinesOnServer to execute given methods using a server instance of the PurchFormLetter class.
#///
#void updateQueryAndChooseLines(PurchTable _purchTable, PurchParmTable _purchParmTable = null)
#{
# container packedClass;
# ;
#
# this.purchTable(_purchTable);
# packedClass = PurchFormLetter::execUpdateQueryAndChooseLinesOnServer(this.documentStatus(), this.parmId(), this.pack(),
# _purchTable, _purchParmTable);
#
# this.unpack(packedClass);
#}
ENDSOURCE
SOURCE #updateQueryBuild
#protected void updateQueryBuild()
#{
# PurchTable localPurchTable;
# MapEnumerator mapPurchTableEnumerator;
#
# // Israel-Localisation-Prodware-ImportFolder-Begin
# QueryBuildDataSource qbds, qbdsa;
# // Israel-Localisation-Prodware-ImportFolder-End
# ;
# #query
#
# if (purchParmUpdate.LateSelection && purchParmUpdate.LateSelectionQuery != connull())
# {
# chooseLines = new SysQueryRun(purchParmUpdate.LateSelectionQuery);
# return;
# }
#
# this.initQueryBuild();
#
# if (! callerFormDataSource)
# {
# if (interCompanyMap)
# {
# mapPurchTableEnumerator = interCompanyMap.getEnumerator();
#
# while (mapPurchTableEnumerator.moveNext())
# {
# localPurchTable = mapPurchTableEnumerator.currentValue();
# chooseLines.query().dataSourceTable(tablenum(PurchTable)).addRange(fieldnum(PurchTable, PurchId)).value(queryValue(localPurchTable.PurchId));
# }
# }
# else
# {
# chooseLines.query().dataSourceTable(tablenum(PurchTable)).addRange(fieldnum(PurchTable, PurchId));
#
# if (this.invoiceAccountInQuery())
# chooseLines.query().dataSourceTable(tablenum(PurchTable)).addRange(fieldnum(PurchTable, InvoiceAccount));
#
# if (this.vendAccountInQuery())
# chooseLines.query().dataSourceTable(tablenum(PurchTable)).addRange(fieldnum(PurchTable, OrderAccount));
#
# chooseLines.query().dataSourceTable(tablenum(PurchTable)).addRange(fieldnum(PurchTable, PurchPoolId));
#
# if (purchTable)
# {
# chooseLines.query().dataSourceTable(tablenum(PurchTable)).rangeField(fieldnum(PurchTable, PurchId)).value(queryValue(purchTable.PurchId));
#
# if (this.invoiceAccountInQuery())
# chooseLines.query().dataSourceTable(tablenum(PurchTable)).rangeField(fieldnum(PurchTable, InvoiceAccount)).value(queryValue(purchTable.InvoiceAccount));
#
# if (this.vendAccountInQuery())
# chooseLines.query().dataSourceTable(tablenum(PurchTable)).rangeField(fieldnum(PurchTable, OrderAccount)).value(queryValue(purchTable.OrderAccount));
#
# chooseLines.query().dataSourceTable(tablenum(PurchTable)).rangeField(fieldnum(PurchTable, PurchPoolId)).value(queryValue(purchTable.PurchPoolId));
# }
# }
# }
# else
# {
# setprefix("@SYS95696");
# this.updateQueryDocumentRanges();
# this.callerFormDataSource(null);
# }
#
# if (this.ledgerJournalTrans())
# {
# if (this.invoiceAccountInQuery())
# {
# chooseLines.query().dataSourceTable(tablenum(PurchTable)).rangeField(fieldnum(PurchTable, InvoiceAccount)).value(queryValue(this.ledgerJournalVendTrans().AccountNum));
# chooseLines.query().dataSourceTable(tablenum(PurchTable)).rangeField(fieldnum(PurchTable, InvoiceAccount)).status(RangeStatus::Locked);
# }
# if (this.vendAccountInQuery())
# {
# chooseLines.query().dataSourceTable(tablenum(PurchTable)).rangeField(fieldnum(PurchTable, OrderAccount)).value(queryValue(this.ledgerJournalVendTrans().AccountNum));
# chooseLines.query().dataSourceTable(tablenum(PurchTable)).rangeField(fieldnum(PurchTable, OrderAccount)).status(RangeStatus::Locked);
# }
#
# if (this.ledgerJournalTrans().PurchIdRange)
# chooseLines.query().dataSourceTable(tablenum(PurchTable)).rangeField(fieldnum(PurchTable, PurchId)).value(this.ledgerJournalTrans().PurchIdRange);
# }
#
# chooseLines.query().dataSourceTable(tablenum(PurchLine)).addRange(fieldnum(PurchLine, Blocked)).value(queryValue(NoYes::No));
#
# // Israel-Localisation-Prodware-ImportFolder-Begin
# if (!this.invoiceAccountInQuery())
# {
# if (BPLImpFolderId)
# {
# qbds = chooseLines.query().dataSourceTable(tablenum(PurchLine));
# qbdsa = qbds.addDataSource(tablenum(BPLImpFolderLine));
# qbdsa.relations(true);
# qbdsa.joinMode(JoinMode::ExistsJoin);
# qbdsa.addRange(fieldnum(BPLImpFolderLine,FolderId)).value(queryValue(BPLImpFolderId));
# }
# else if (this.documentStatus() != DocumentStatus::PurchaseOrder)
# {
# qbds = chooseLines.query().dataSourceTable(tablenum(PurchLine));
# qbdsa = qbds.addDataSource(tablenum(BPLImpFolderLine));
# qbdsa.relations(true);
# qbdsa.joinMode(JoinMode::NoExistsJoin);
# }
# }
# // Israel-Localisation-Prodware-ImportFolder-End
# chooseLines.query().dataSourceTable(tablenum(PurchLine)).addSortField(fieldnum(PurchLine, PurchId));
# chooseLines.query().dataSourceTable(tablenum(PurchLine)).addSortField(fieldnum(PurchLine, LineNum));
#
# if (localPurchTable.inventSiteActive())
# {
# chooseLines.query().dataSourceTable(tablenum(InventDim)).addRange(fieldnum(InventDim, InventSiteId));
# }
#
# chooseLines.query().interactive(showQueryForm);
#
# chooseLines.literals(#queryForcePlaceholders);
#}
#
ENDSOURCE
SOURCE #updateQueryDocumentRanges
#///
#/// Adds document ranges to the chooseLines query.
#///
#protected void updateQueryDocumentRanges()
#{
# PurchTable localPurchTable;
# container purchTableContainer;
# Map mapPurchTable;
# MapEnumerator mapPurchTableEnumerator;
# int selectedPOs;
# ;
#
# selectedPOs = 0;
#
# if (this.parmCallerTable().TableId == tablenum(PurchTable))
# {
# purchTableContainer = FormLetter::getFormRecord(callerFormDataSource);
# if (purchTableContainer)
# {
# mapPurchTable = Map::create(purchTableContainer);
# mapPurchTableEnumerator = mapPurchTable.getEnumerator();
#
# while (mapPurchTableEnumerator.moveNext())
# {
# localPurchTable = mapPurchTableEnumerator.currentValue();
#
# if (!this.mayJournalBePosted(localPurchTable) || !this.maySelectPO(localPurchTable))
# {
# info(strfmt("@SYS62710", localPurchTable.PurchaseType, localPurchTable.PurchId));
# continue;
# }
# selectedPOs++;
# chooseLines.query().dataSourceTable(tablenum(PurchTable)).addRange(fieldnum(PurchTable, PurchId)).value(queryValue(localPurchTable.PurchId));
# }
# }
# }
#
# // If no PO was selected, make sure the query doesn't select all PO's (no criteria is the equivalent of select all).
# if(selectedPOs == 0)
# {
# chooseLines.query().dataSourceTable(tablenum(PurchTable)).enabled(false);
# }
#}
ENDSOURCE
SOURCE #updateSalesLine
#void updateSalesLine(PurchLine _purchLine, PurchQty salesUpdateQty)
#{
# SalesLine salesLine;
# ;
#
# if (!salesUpdateQty)
# return;
#
# if (!purchLine)
# return;
#
# salesLine = SalesLine::findInventTransId(purchLine.InventRefTransId, true);
#
# if (!salesLine)
# return;
#
# updateSalesLinesQuery.query().dataSourceTable(tablenum(SalesLine)).addRange(fieldnum(SalesLine,InventTransId)).value(queryValue(purchLine.InventRefTransId));
#
# salesLine.SalesDeliverNow += salesUpdateQty;
# salesLine.setInventDeliverNow();
# salesLine.doUpdate();
#
# updateSalesLines = true;
#}
ENDSOURCE
SOURCE #updateSalesTable
#void updateSalesTable(SysQueryRun _updateSalesLinesQuery)
#{
# SalesFormLetter salesFormLetter;
# ;
#
# salesFormLetter = SalesFormLetter::construct(DocumentStatus::PackingSlip);
#
# salesFormLetter.parmIdSynched(this.parmId());
# salesFormLetter.chooseLinesQuery(_updateSalesLinesQuery);
# salesFormLetter.transDate(this.transDate());
# salesFormLetter.specQty(SalesUpdate::DeliverNow);
# salesFormLetter.creditRemaining(true);
# salesFormLetter.printFormLetter (printSalesFormLetter);
# salesFormLetter.createParmUpdate(false);
# salesFormLetter.chooseLines(null,true);
# salesFormLetter.reArrangeNow(false);
#
# salesFormLetter.run();
#}
#
ENDSOURCE
SOURCE #updateSumPurchId
#protected void updateSumPurchId()
#{
# PurchTable _purchTable;
# ;
#
# if (PurchTable::exist(purchParmLine.OrigPurchId))
# {
# ttsbegin;
#
# _purchTable = PurchTable::find(purchParmLine.OrigPurchId, true);
#
# if (_purchTable)
# {
# _purchTable.updateBackStatus();
# _purchTable.write();
# }
#
# ttscommit;
# }
#}
#
ENDSOURCE
SOURCE #validate
#///
#/// Validates if it is OK to continue.
#///
#///
#/// true if the ok to continue; otherwise, false.
#///
#///
#/// The validate method is used for validating if it is ok to close the purchase posting form, when posting purchase orders.
#///
#boolean validate()
#{
# if (! this.checkSumBy())
# return false;
#
# if (! this.checkSumNum())
# return false;
#
# if (! this.checkFormLetterId())
# return false;
#
# if (! this.checkLateSelection())
# return false;
#
# if (! this.checkInvoiceDate())
# return false;
#
# if (! this.checkInterCompany())
# return false;
#
# if (! this.checkPurchLinesChanged())
# return false;
#
# return super();
#}
ENDSOURCE
SOURCE #validateNum
#boolean validateNum(PurchParmTable _purchParmTable = purchParmTable)
#{
# return true;
#}
ENDSOURCE
SOURCE #vendAccountInQuery
#boolean vendAccountInQuery()
#{
# return true;
#}
ENDSOURCE
SOURCE #vendBankAccountId
#VendBankAccountId vendBankAccountId(PurchTable _purchTable)
#{
# return '';
#}
ENDSOURCE
SOURCE #WMSJournalTable_ds
#FormDataSource wmsJournalTable_ds(FormDataSource _wmsJournalTable_ds = wmsJournalTable_ds)
#{
# ;
# //wmsJournalTable_ds can not be transfered from server to client by pack/unpack mechanism.
# //However, the only actions with it on the client side is setting it to null and checking whether it is not null.
# //wmsJournalTableDsIsSet parameter is used to transfer the information about its state to the client and back.
# if (wmsJournalTable_ds != _wmsJournalTable_ds)
# wmsJournalTableDsIsSet = (_wmsJournalTable_ds != null);
#
# wmsJournalTable_ds = _wmsJournalTable_ds;
# return wmsJournalTable_ds;
#}
ENDSOURCE
SOURCE #wmsJournalTableDsIsSet
#public boolean wmsJournalTableDsIsSet()
#{
# return wmsJournalTableDsIsSet;
#}
#
ENDSOURCE
SOURCE #writeJournalLine
#protected void writeJournalLine()
#{;
# lineDeliveryName = purchParmTable.DeliveryName ? purchParmTable.DeliveryName
# : purchLine.deliveryName();
# lineDeliveryAddress = purchParmTable.DeliveryAddress ? purchParmTable.DeliveryAddress
# : purchLine.deliveryAddress();
#
# lineDeliveryStreet = purchLine.DeliveryStreet ? purchLine.DeliveryStreet
# : purchTable.DeliveryStreet;
# lineDeliveryZipCode = purchLine.DeliveryZipCode ? purchLine.DeliveryZipCode
# : purchTable.DeliveryZipCode;
# lineDeliveryCity = purchLine.DeliveryCity ? purchLine.DeliveryCity
# : purchTable.DeliveryCity;
# lineDeliveryCounty = purchLine.DeliveryCounty ? purchLine.DeliveryCounty
# : purchTable.DlvCounty;
# lineDeliveryState = purchLine.DeliveryState ? purchLine.DeliveryState
# : purchTable.DlvState;
# lineDeliveryCountryRegionId = purchLine.DeliveryCountryRegionId ? purchLine.DeliveryCountryRegionId
# : purchTable.DlvCountryRegionId;
#}
ENDSOURCE
SOURCE #callPrintersettingsEUVatInvoice
#///
#/// Allows the user to modify the printer settings for EU vat invoices using the standard print job settings dialog.
#///
#///
#/// The PurchFormLetter class where the printer settings for EU vat invoices is being modified.
#///
#///
#/// true if the settings were modified; otherwise, false.
#///
#///
#/// The callPrinterSettingsFormLetter method is static so it is possible to select AOS printers. Selecting AOS printers requires that the SysPrintForm is called from server.
#///
#server static boolean callPrintersettingsEUVatInvoice(PurchFormLetter _purchFormLetter)
#{
# PrintJobSettings printJobSettings;
# boolean ok = true;
# ;
#
# printJobSettings = new PrintJobSettings(_purchFormLetter.printerSettingsEUVatInvoice());
# ok = printJobSettings.printerSettings(formstr(SysPrintForm));
# _purchFormLetter.updatePrinterSettingsEUVatInvoice(printJobSettings.packPrintJobSettings());
#
# return ok;
#}
ENDSOURCE
SOURCE #callPrintersettingsFormletter
#///
#/// Allows the user to modify the printer settings using the standard print job settings dialog.
#///
#///
#/// The PurchFormLetter class where the printer settings is being modified.
#///
#///
#/// Indicates if it is the printer settings for original or copy that is beeing modified.
#///
#///
#/// true if the settings were modified; otherwise, false.
#///
#///
#/// The callPrinterSettingsFormLetter method is static so it is possible to select AOS printers. Selecting AOS printers requires that the SysPrintForm is called from server.
#///
#server static boolean callPrintersettingsFormletter(PurchFormLetter _purchFormLetter, PrintSetupOriginalCopy _originalCopy = PrintSetupOriginalCopy::Original)
#{
# PrintJobSettings printJobSettings;
# boolean ok = true;
# ;
#
# printJobSettings = new PrintJobSettings(_purchFormLetter.printerSettingsFormletter(_originalCopy));
# ok = printJobSettings.printerSettings(formstr(SysPrintForm));
# _purchFormLetter.updatePrinterSettingsFormLetter(printJobSettings.packPrintJobSettings(),_originalCopy);
#
# return ok;
#}
#
ENDSOURCE
SOURCE #checkParmTable
#server static container checkParmTable(Num parmId,
# boolean vendAccountInQuery,
# boolean invoiceAccountInQuery)
#{
# PurchParmTable purchParmT;
# Counter numOfAccounts = 0;
# Counter numOfCurrency = 0;
# ;
#
# if (vendAccountInQuery)
# {
# while select purchParmT
# group by OrderAccount
# where purchParmT.ParmId == parmId
# {
# numOfAccounts++;
# }
# }
#
# if (invoiceAccountInQuery)
# {
# while select purchParmT
# group by InvoiceAccount
# where purchParmT.ParmId == parmId
# {
# numOfAccounts++;
# }
# }
#
# while select purchParmT
# group by CurrencyCode
# where purchParmT.ParmId == parmId
# {
# numOfCurrency++;
# }
#
# return [numOfAccounts, numOfCurrency];
#}
#
ENDSOURCE
SOURCE #construct
#server static PurchFormLetter construct(DocumentStatus document,
# boolean getParmId = true)
#{
# switch(document)
# {
# case DocumentStatus::PurchaseOrder : return new PurchFormLetter_PurchOrder (getParmId);
# case DocumentStatus::PackingSlip : return new PurchFormLetter_PackingSlip (getParmId);
# case DocumentStatus::ReceiptsList : return new PurchFormLetter_ReceiptsList (getParmId);
# case DocumentStatus::Invoice : return new PurchFormLetter_Invoice (getParmId);
# case DocumentStatus::ApproveJournal : return new PurchFormLetter_ApproveJournal (getParmId);
# }
#
# throw error(strfmt("@SYS19306",funcname()));
#}
ENDSOURCE
SOURCE #constructFromCache
#server static PurchFormLetter constructFromCache(DocumentStatus documentStatus, ParmId parmId)
#{
# SysGlobalCache cache = classfactory.globalCache();
# ;
#
# if (cache.isSet(classstr(PurchFormLetter), parmId))
# {
# return cache.get(classstr(PurchFormLetter), parmId);
# }
# else
# {
# return PurchFormLetter::construct(documentStatus, false);
# }
#
# throw error(strfmt("@SYS19306",funcname()));
#}
ENDSOURCE
SOURCE #execInitLinesQueryOnServer
#protected server static container execInitLinesQueryOnServer(DocumentStatus documentStatus, ParmId parmId,
# container packedClass,
# container packedChooseLines)
#{
# PurchFormLetter purchFormLetter = PurchFormLetter::constructFromCache(documentStatus, parmId);
# boolean ret;
# ;
#
# purchFormLetter.unpack(packedClass);
# if (packedChooseLines != connull())
# {
# purchFormLetter.chooseLinesQuery(new SysQueryRun(packedChooseLines));
# }
#
# ret = purchFormLetter.initLinesQuery();
#
# return [ret, purchFormLetter.pack(), purchFormLetter.chooseLinesQuery().pack()];
#}
ENDSOURCE
SOURCE #execReArrangeOnServer
#protected server static container execReArrangeOnServer(DocumentStatus documentStatus, ParmId parmId, container packedClass,
# boolean clearTotals,
# boolean validate)
#{
# PurchFormLetter purchFormLetter = PurchFormLetter::constructFromCache(documentStatus, parmId);
# boolean result;
# ;
#
# purchFormLetter.unpack(packedClass);
#
# purchFormLetter.validateAll(false);
# result = purchFormLetter.reArrange(clearTotals, validate);
# purchFormLetter.validateAll(true);
#
# return [result, purchFormLetter.pack()];
#}
ENDSOURCE
SOURCE #execReSelectOnServer
#protected server static container execReSelectOnServer(DocumentStatus documentStatus, ParmId parmId, container packedClass,
# PurchUpdate _purchUpdate,
# NoYes _creditRemaining)
#{
# PurchFormLetter purchFormLetter = PurchFormLetter::constructFromCache(documentStatus, parmId);
# ;
#
# purchFormLetter.unpack(packedClass);
#
# purchFormLetter.reSelect(_purchUpdate, _creditRemaining);
#
# return purchFormLetter.pack();
#}
ENDSOURCE
SOURCE #execUpdateQueryAndChooseLinesOnServer
#protected server static container execUpdateQueryAndChooseLinesOnServer(DocumentStatus documentStatus,
# ParmId parmId,
# container packedClass,
# PurchTable _purchTable,
# PurchParmTable _purchParmTable)
#{
# PurchFormLetter purchFormLetter = PurchFormLetter::constructFromCache(documentStatus, parmId);
# ;
#
# purchFormLetter.unpack(packedClass);
# purchFormLetter.purchTable(_purchTable);
#
# purchFormLetter.updateQueryBuild();
# purchFormLetter.adjustLinesQuery(true);
# purchFormLetter.chooseLines(true, _purchParmTable);
#
# return purchFormLetter.pack();
#}
ENDSOURCE
SOURCE #getPrinterSettingsFormletter
#static container getPrinterSettingsFormletter(DocumentStatus document, PrintSetupOriginalCopy _originalCopy = PrintSetupOriginalCopy::Original)
#{
# PurchFormLetter purchFormLetterPrint;
# ;
#
# purchFormLetterPrint = PurchFormLetter::construct(document);
# purchFormLetterPrint.getLast();
# return purchFormLetterPrint.printerSettingsFormletter(_originalCopy);
#}
#
ENDSOURCE
SOURCE #main
#static void main(Args args)
#{
# Common record;
# int parmEnum;
# Object callerForm;
# str callerFormName;
# str isProforma;
# FormDataSource recordDataSource;
#
# boolean formHasInterCompanyRefreshCacheMethod;
#
# container cachedArgs;
# ;
#
# if (!args)
# throw error("@SYS25407");
#
# record = args.record();
# parmEnum = args.parmEnum();
# callerForm = args.caller();
# if (callerForm)
# callerFormName = args.caller().name();
# isProforma = args.parm();
# if (record)
# recordDataSource = args.record().dataSource();
#
# formHasInterCompanyRefreshCacheMethod = formHasMethod(callerForm,identifierstr(interCompanyRefreshCache));
#
# cachedArgs = [#CachedArgsList];
#
# PurchFormLetter::mainOnServer(cachedArgs, record, callerForm, recordDataSource);
#}
ENDSOURCE
SOURCE #mainOnServer
#// Main method is split to two parts to reduce the interaction between tiers. main method runs on the client. It gets parameters from Args class and passes them to mainOnServer method, which does the main job.
#protected server static void mainOnServer(container cachedArgs, Common record, Object callerForm, FormDataSource recordDataSource)
#{
# PurchFormLetter purchFormLetter;
#
# PurchTable purchTable;
# Object purchTable_ds;
# Object vendInvoiceInfoTable_ds;
# LedgerJournalTrans ledgerJournalTrans;
# // Israel-Localisation-Prodware-ImportFolder-Begin
# BPLImpFolderTable BPLImpFolderTable;
# // Israel-Localisation-Prodware-ImportFolder-End
#
# ParmId parmId;
#
# //Cached args
# int parmEnum;
# str callerFormName;
# str isProforma;
# boolean formHasInterCompanyRefreshCacheMethod;
#
# boolean recordExists;
# boolean doExecuteQuery;
#
# SysGlobalCache cache = classfactory.globalCache();
# ;
#
# if (cachedArgs == connull())
# throw error("@SYS25407");
#
# [#CachedArgsList] = cachedArgs;
#
# purchFormLetter = PurchFormLetter::construct(parmEnum);
# parmId = purchFormLetter.parmId();
#
# purchFormLetter.getLast();
# purchFormLetter.resetParmListCommonCS();
# purchFormLetter.parmId(parmId);
# purchFormLetter.transDate(systemdateget());
# purchFormLetter.reArrangeNow(true);
#
# if(VendParameters::find().PurchCycle)
# {
# purchFormLetter.parmSalesPurchCycleAction(SalesPurchCycle::salesPurchCycleAction(parmEnum));
# }
#
# if (record)
# {
# if (!purchFormLetter.checkCallerDataSource(record.TableId, recordDataSource))
# {
# return;
# }
#
# switch(record.TableId)
# {
# case tablenum(PurchTable) : purchTable = record;
# purchFormLetter.parmCallerTable(record);
# purchFormLetter.initParmPurchTable(purchTable);
# purchTable_ds = recordDataSource;
# purchFormLetter.callerFormDataSource(purchTable_ds);
# break;
#
# case tablenum(LedgerJournalTrans) : ledgerJournalTrans = record;
# purchFormLetter.initLedgerJournalTrans(ledgerJournalTrans);
# break;
#
# case tablenum(WMSJournalTable) : purchFormLetter.wmsJournalTable_ds(recordDataSource);
# break;
#
# case tablenum(VendInvoiceInfoTable) : vendInvoiceInfoTable_ds = recordDataSource;
# purchFormLetter.callerFormDataSource(vendInvoiceInfoTable_ds);
# purchFormLetter.parmCallerTable(record);
# break;
# // Israel-Localisation-Prodware-ImportFolder-Begin
# case tablenum(BPLImpFolderTable) : purchFormLetter.BPLImpFolderTable_ds(recordDataSource);
# BPLImpFolderTable = record;
# purchFormLetter.BPLImportFolderId(BPLImpFolderTable.FolderId);
# break;
# // Israel-Localisation-Prodware-ImportFolder-End
# }
#
# purchFormLetter.allowEmptyTable(purchFormLetter.initAllowEmptyTable(true));
# purchFormLetter.multiForm(true);
# }
#
# if (callerForm && (callerFormName == formstr(PurchTable) || callerFormName == formstr(PurchTableListPage)
# || callerFormName == formstr(VendInvoiceInfoListPage)))
# {
# if (isProforma)
# {
# purchFormLetter.proforma(true);
# purchFormLetter.enableUpdateNowField(false);
# }
# else
# {
# purchFormLetter.proforma(false);
# purchFormLetter.enableUpdateNowField(true);
# }
# }
# else
# {
# purchFormLetter.enableUpdateNowField(true);
# }
#
# purchFormLetter.specQtyDefault();
#
# //Save object reference to global cache
# cache.set(classstr(PurchFormLetter), parmId, purchFormLetter);
#
# if (purchFormLetter.prePromptInit() && purchFormLetter.prompt())
# {
# purchFormLetter.run();
#
# if (callerForm && formHasInterCompanyRefreshCacheMethod)
# {
# callerForm.interCompanyRefreshCache();
# }
#
# if (purchTable)
# {
# recordExists = PurchTable::exist(purchTable.PurchId);
# doExecuteQuery = (purchFormLetter.numberOfRecords() > 1);
#
# PurchFormLetter::updateCallerDataSource(purchTable_ds, recordExists, doExecuteQuery);
# }
# }
#
# //Delete saved object reference from the global cache
# if (cache.isSet(classstr(PurchFormLetter), parmId))
# cache.remove(classstr(PurchFormLetter), parmId);
#}
#
ENDSOURCE
SOURCE #updateCallerDataSource
#// Updates the calling form datasource after running the RunBase.
#// Method set to client static to be run on the client to minimize the interaction between tiers.
#protected client static void updateCallerDataSource(Object purchTable_ds, boolean recordExists, boolean doExecuteQuery)
#{
# ;
#
# if (recordExists)
# {
# if (doExecuteQuery)
# {
# purchTable_ds.executeQuery();
# }
# else
# {
# purchTable_ds.reRead();
# purchTable_ds.reFresh();
# purchTable_ds.editPurch();
# purchTable_ds.reReadLines();
# }
# }
# else
# {
# purchTable_ds.reSearch();
# }
#}
ENDSOURCE
ENDMETHODS
ENDCLASS
en-us
Printer for Intra-Community invoice is not set to print on an AOS printer, which is needed for this to run in batch!
warning when posting purchase orders. Intra-community like in @SYS69437
@SYS118819
0
0
he
מדפסת עבור חשבונית פנים-קהילתית אינה מוגדרת כדי להדפסה במדפסת AOS, דבר שנדרש כדי שפעולה זו תפעל באצווה!
warning when posting purchase orders. Intra-community like in @SYS69437
@SYS118819
0
0
en-us
Vendor %1 is stopped.
@SYS1138
0
0
he
ספק %1 הופסק.
@SYS1138
0
0
en-us
Purchase %1 does not exist.
@SYS15741
0
0
he
רכישה %1 אינה קיימת.
@SYS15741
0
0
en-us
Purchase %1 has no account reference for the vendor table.
@SYS19291
0
0
he
ברכישה %1 אין אסמכתא לחשבון עבור טבלת הספק.
@SYS19291
0
0
en-us
Account reference %1 for purchase %2 does not exist.
@SYS19292
0
0
he
אסמכתא %1 לחשבון עבור רכישה %2 אינה קיימת.
@SYS19292
0
0
en-us
Purchase %1 has no invoice account reference for the vendor table.
@SYS19293
0
0
he
ברכישה %1 אין אסמכתא לחשבון חשבוניות עבור טבלת הספק.
@SYS19293
0
0
en-us
Invoice account reference %1 in purchase %2 does not exist.
@SYS19294
0
0
he
אסמכתא %1 לחשבון חשבוניות ברכישה %2 אינה קיימת.
@SYS19294
0
0
en-us
Currency code %1 for purchase %2 does not exist.
@SYS19295
0
0
he
קוד מטבע %1 עבור רכישה %2 אינו קיים.
@SYS19295
0
0
en-us
No lines for posting or quantity = 0
@SYS26185
0
0
he
אין שורות לרישום או כמות = 0
@SYS26185
0
0
en-us
%1 not allowed for intercompany.
Intercompany used in the sense 'intra-group'.
@SYS75337
0
0
he
%1 אינו מותר עבור פריט בין-חברתי.
Intercompany used in the sense 'intra-group'.
@SYS75337
0
0
en-us
Summary update
@SYS57755
0
0
he
עדכון סיכום
@SYS57755
0
0
en-us
Make a selection by clicking Select on this form.
'Form' used in the sense object, ie screen display.
@SYS72782
0
0
he
בצע בחירה על-ידי לחיצה על 'בחר' בטופס זה.
'Form' used in the sense object, ie screen display.
@SYS72782
0
0
en-us
Order line has been deleted.
@SYS16741
0
0
he
שורת ההזמנה נמחקה.
@SYS16741
0
0
en-us
Item number %1 does not exist in the inventory table.
@SYS20812
0
0
he
מספר פריט %1 אינו קיים בטבלת המלאי.
@SYS20812
0
0
en-us
Updating is not specified
@SYS24178
0
0
he
לא צוין עדכון
@SYS24178
0
0
en-us
Purchase order %1 has been updated by another user.
@SYS78923
0
0
he
הזמנת רכש %1 עודכנה על-ידי משתמש אחר.
@SYS78923
0
0
en-us
Tax regulations are found
@SYS82342
0
0
he
נמצאו הסדרי מס
@SYS82342
0
0
en-us
Tax is regulated on purchase ID %1
@SYS82343
0
0
he
המס מוסדר במזהה רכישה %1
@SYS82343
0
0
en-us
Purchase orders cannot be rearranged when individual purchase orders are tax regulated.
@SYS82344
0
0
he
אין אפשרות לסדר מחדש הזמנות רכש כאשר הזמנות רכש בודדות מוסדרות מס.
@SYS82344
0
0
en-us
Remove the regulation on the orders, rearrange and regulate the tax on the summary order.
@SYS82345
0
0
he
הסר את ההסדר בהזמנות, סדר מחדש והסדר את המס בהזמנת הסיכום.
@SYS82345
0
0
en-us
Fixed asset number sequence must be set to continuous.
@SYS116327
0
0
he
על רצף מספרים של רכוש קבוע להיות מוגדר כרציף.
@SYS116327
0
0
en-us
You cannot create the asset. You first must set up fixed assets to use automatic numbering in the General ledger parameters.
@SYS122736
0
0
he
אין באפשרותך ליצור את הרכוש. תחילה עליך לכוונן רכוש קבוע כדי להשתמש במספור אוטומטי בפרמטרים של הספר הראשי.
@SYS122736
0
0
en-us
Totals
@SYS8311
0
0
he
סכומים כוללים
@SYS8311
0
0
en-us
Update of purchase order %1 canceled
@SYS25974
0
0
he
עדכון הזמנת רכש %1 בוטל
@SYS25974
0
0
en-us
Update %1, line %2
@SYS26810
0
0
he
עדכון %1, שורה %2
@SYS26810
0
0
en-us
Specified purchase line has been moved.
@SYS18699
0
0
he
שורת הרכישה שצוינה הועברה.
@SYS18699
0
0
en-us
Posting has been canceled.
@SYS21533
0
0
he
הרישום בוטל.
@SYS21533
0
0
en-us
Operation canceled
Intercompany
@SYS93835
0
0
he
הפעולה בוטלה
Intercompany
@SYS93835
0
0
en-us
Late selection will remove already selected data. Do you want to continue?
@SYS72909
0
0
he
בחירה מאוחרת תסיר נתונים שכבר נבחרו. האם ברצונך להמשיך?
@SYS72909
0
0
en-us
Number must be specified.
@SYS24729
0
0
he
יש לציין מספר.
@SYS24729
0
0
en-us
A header level misc. charge for Misc. charges code %1 has been dropped from an invoice for purchase order %2.
MiscChgs: Message when an invoice with no lines will be deleted.
@SYS120666
0
0
he
חיובים שונים ברמת הכותרת עבור 'קוד חיובים שונים' %1 שוחררו מחשבונית עבור הזמנת הרכש %2.
MiscChgs: Message when an invoice with no lines will be deleted.
@SYS120666
0
0
en-us
%1 %2
@SYS76498
0
0
he
%1 %2
@SYS76498
0
0
en-us
Purchase order
@SYS15812
0
0
he
הזמנת רכש
@SYS15812
0
0
en-us
Misc. charges that are of the type Item have not been allocated.
MiscChgs: Error messsage when a PO Header has item MarkupTrans not yet redistributed to the PO's lines.
@SYS115806
0
0
he
חיובים שונים שהם מסוג 'פריט' לא הוקצו.
MiscChgs: Error messsage when a PO Header has item MarkupTrans not yet redistributed to the PO's lines.
@SYS115806
0
0
en-us
Posting
ES: Registrar
@SYS95696
0
0
he
רישום
ES: Registrar
@SYS95696
0
0
en-us
Initializing
@SYS26577
0
0
he
מאתחל
@SYS26577
0
0
en-us
Update terminated for %1 %2.
@SYS62710
0
0
he
העדכון הופסק עבור %1 %2.
@SYS62710
0
0
en-us
Function %1 has been used incorrectly.
@SYS19306
0
0
he
נעשה שימוש שגוי בפונקציה %1.
@SYS19306
0
0
en-us
Update must be called with parameters.
@SYS25407
0
0
he
יש לקרוא לעדכון באמצעות פרמטרים.
@SYS25407
0
0
***Element: CLS
; Microsoft Dynamics AX Class: PurchFormLetter_Invoice unloaded
; --------------------------------------------------------------------------------
CLSVERSION 1
CLASS #PurchFormLetter_Invoice
Id 487
PROPERTIES
Name #PurchFormLetter_Invoice
Extends #PurchFormLetter
RunOn #Called from
ENDPROPERTIES
METHODS
Version: 3
SOURCE #addToInventReportDimHistory
#void addToInventReportDimHistory(VendInvoiceTrans _vendInvoiceTrans)
#{
# InventTrans inventTrans;
# InventQty qtyRemain = _vendInvoiceTrans.InventQty;
# InventQty qtyTrans;
# InventReportDimHistory inventReportDimHistory;
# ;
#
# while select inventTrans
# index hint TransIdIdx
# order by StatusIssue, InventDimId
# where inventTrans.InventTransId == _vendInvoiceTrans.InventTransId &&
# inventTrans.TransType == InventTransType::Purch &&
# inventTrans.InvoiceId == _vendInvoiceTrans.InvoiceId &&
# inventTrans.DateFinancial == _vendInvoiceTrans.InvoiceDate &&
# inventTrans.Voucher == voucher
# {
# if (qtyRemain)
# {
# if (abs(inventTrans.Qty) < abs(qtyRemain))
# {
# qtyTrans = inventTrans.Qty;
# qtyRemain -= qtyTrans;
# }
# else
# {
# qtyTrans = qtyRemain;
# qtyRemain = 0;
# }
#
#
# inventReportDimHistory.clear();
# inventReportDimHistory.TransactionLogType = InventReportDimHistoryLogType::PurchInvoice;
# inventReportDimHistory.TransRefId = _vendInvoiceTrans.InternalInvoiceId;
# inventReportDimHistory.InventTransId = inventTrans.InventTransId;
# inventReportDimHistory.InventDimId = inventTrans.InventDimId;
#
# recordListInventReportDimHistory.find(inventReportDimHistory);
#
# inventReportDimHistory.Qty += qtyTrans;
#
# recordListInventReportDimHistory.ins(inventReportDimHistory,true);
#
# }
# else
# break;
# }
#}
#
#
ENDSOURCE
SOURCE #adjustLinesQuery
#///
#/// Adjusts the chooseLines query to work with additional data sources.
#///
#///
#/// Determines whether additional data sources should be queried.
#///
#///
#/// This method is called after the query ranges are already known.
#///
#public void adjustLinesQuery(boolean _queryAdditional)
#{
# QueryBuildRange saveStatusRange;
# QueryBuildDataSource vendInvoiceInfoTableDataSource;
#
# void copyRanges(QueryBuildDataSource source, QueryBuildDataSource dest)
# {
# QueryBuildRange range;
# int i;
# ;
#
# for (i = 1; i <= source.rangeCount(); i++)
# {
# range = source.range(i);
# dest.addRange(range.field()).value(range.value());
# }
# }
# ;
#
# super(_queryAdditional);
#
# vendInvoiceInfoTableDataSource = chooseLines.query().dataSourceTable(tablenum(VendInvoiceInfoTable));
#
# if (_queryAdditional)
# {
# saveStatusRange = SysQuery::findOrCreateRange(vendInvoiceInfoTableDataSource, fieldnum(VendInvoiceInfoTable, VendInvoiceSaveStatus));
#
# switch(saveStatusRange.value())
# {
# case queryValue(VendInvoiceSaveStatus::Pending) : // Only saved invoices
# // Modify the query to avoid fetching 'New' invoices.
# chooseLines.query().dataSourceTable(tablenum(PurchTable)).enabled(false);
# break;
# case queryValue(VendInvoiceSaveStatus::New) : // Ignore saved invoices
# // Modify the query to avoid fetching saved invoices.
# // This will work as desired without modifications because all saved invoices have status of 'Pending',
# // therefore VendInvoiceSaveStatus == New always returns an empty set from saved invoices branch.
# // However we don't want an additional SQL query to be send out returning an empty result.
# vendInvoiceInfoTableDataSource.enabled(false);
# break;
# default : // Include both branches: build 'New' invoices and 'Pending' invoices.
# saveStatusRange.value(queryValue(VendInvoiceSaveStatus::Pending));
# break;
# }
#
# // allow only records with empty pool id
# SysQuery::findOrCreateRange(vendInvoiceInfoTableDataSource, fieldnum(VendInvoiceInfoTable, PoolRecId)).value(SysQuery::value(0));
#
# // prepare pending invoices query
# copyRanges(
# chooseLines.query().dataSourceTable(tablenum(PurchTable)),
# chooseLinesPendingInvoice.query().dataSourceTable(tablenum(PurchTable)));
#
# copyRanges(
# vendInvoiceInfoTableDataSource,
# chooseLinesPendingInvoice.query().dataSourceTable(tablenum(VendInvoiceInfoTable)));
#
# copyRanges(
# chooseLines.query().dataSourceTable(tablenum(VendInvoiceInfoLine)),
# chooseLinesPendingInvoice.query().dataSourceTable(tablenum(VendInvoiceInfoLine)));
# }
# else
# {
# // disable additional datasources
# vendInvoiceInfoTableDataSource.enabled(false);
# }
#}
ENDSOURCE
SOURCE #allocateNumAndVoucher
#NumberSeq allocateNumAndVoucher()
#{
# NumberSequenceCode invoiceNumber;
# NumberSequenceCode invoiceVoucher;
#
# boolean voucherEqualsNumber;
#
# PurchLine tmpPurchLine;
# NumberSeq tmpNumberSeq;
# ;
#
# if (purchTable.NumberSequenceGroup)
# {
# if (purchTotals.purchTotalAmount() < 0)
# {
# invoiceNumber = NumberSequenceGroupRef::find(PurchParameters::numRefPurchCreditNoteId().DataTypeId, purchTable.NumberSequenceGroup).NumberSequenceCode;
#
# if (!invoiceNumber)
# {
# invoiceNumber = NumberSequenceReference::find(PurchParameters::numRefPurchCreditNoteId().DataTypeId).NumberSequence;
# }
#
# if (PurchParameters::numRefPurchCreditNoteVoucher().AllowSameAs)
# {
# voucherEqualsNumber = true;
# invoiceVoucher = invoiceNumber;
# }
# else
# {
# invoiceVoucher = NumberSequenceGroupRef::find(PurchParameters::numRefPurchCreditNoteVoucher().DataTypeId, purchTable.NumberSequenceGroup).NumberSequenceCode;
#
# if (!invoiceVoucher)
# {
# invoiceVoucher = PurchParameters::numRefPurchCreditNoteVoucher().NumberSequence;
# }
# }
# }
# else
# {
# invoiceNumber = NumberSequenceGroupRef::find(PurchParameters::numRefPurchInvoiceId().DataTypeId, purchTable.NumberSequenceGroup).NumberSequenceCode;
#
# if (!invoiceNumber)
# {
# invoiceNumber = NumberSequenceReference::find(PurchParameters::numRefPurchInvoiceId().DataTypeId).NumberSequence;
# }
#
# if (PurchParameters::numRefPurchInvoiceVoucher().AllowSameAs)
# {
# voucherEqualsNumber = true;
# invoiceVoucher = invoiceNumber;
# }
# else
# {
# invoiceVoucher = NumberSequenceGroupRef::find(PurchParameters::numRefPurchInvoiceVoucher().DataTypeId, purchTable.NumberSequenceGroup).NumberSequenceCode;
#
# if (!invoiceVoucher)
# {
# invoiceVoucher = PurchParameters::numRefPurchInvoiceVoucher().NumberSequence;
# }
# }
# }
#
# if (invoiceNumber)
# {
# useInternalNumber = true;
# tmpNumberSeq = NumberSeq::newGetNumAndVoucherFromCode(invoiceNumber, invoiceVoucher, voucherEqualsNumber);
# }
# else
# {
# useInternalNumber = false;
# tmpNumberSeq = NumberSeq::newGetVoucherFromCode(invoiceVoucher);
# }
# }
# else
# {
# if (purchTotals.purchTotalAmount() < 0 || (!purchTotals.purchTotalAmount() && purchTotals.purchQty() < 0 ))
# {
# if (NumberSequenceReference::find(PurchParameters::numRefPurchCreditNoteId().DataTypeId).NumberSequence)
# {
# useInternalNumber = true;
# tmpNumberSeq = NumberSeq::newGetNumAndVoucher(PurchParameters::numRefPurchCreditNoteId(),
# PurchParameters::numRefPurchCreditNoteVoucher());
# }
# else
# {
# useInternalNumber = false;
# tmpNumberSeq = NumberSeq::newGetVoucher(PurchParameters::numRefPurchCreditNoteVoucher());
# }
# }
# else
# {
# if (NumberSequenceReference::find(PurchParameters::numRefPurchInvoiceId().DataTypeId).NumberSequence)
# {
# useInternalNumber = true;
# tmpNumberSeq = NumberSeq::newGetNumAndVoucher(PurchParameters::numRefPurchInvoiceId(),
# PurchParameters::numRefPurchInvoiceVoucher());
# }
# else
# {
# useInternalNumber = false;
# tmpNumberSeq = NumberSeq::newGetVoucher(PurchParameters::numRefPurchInvoiceVoucher());
# }
# }
#}
#
# // Italian functionality of VAT books and VAT book sections
# if (TaxParameters::find().VatBookEnable == NoYes::Yes)
# {
# if(! TaxBookSection::checkTaxBookSection(tmpNumberSeq.parmVoucherSequenceCode(), this.invoiceDate()))
# {
# throw error("@SYS21533");
# }
# recordListPurchLine.first(tmpPurchLine);
#
# while (tmpPurchLine)
# {
# if (! TaxGroupData::checkTaxGroups(tmpPurchLine.TaxGroup, tmpPurchLine.TaxItemGroup))
# {
# throw error("@SYS21533");
# }
# if (!recordListPurchLine.next(tmpPurchLine))
# {
# break;
# }
# }
# }
# return tmpNumberSeq;
#}
#
ENDSOURCE
SOURCE #allowReArrange
#///
#/// Defines if a purchase invoice posting can be rearranged.
#///
#///
#/// The document to be tested to see if rearrange of saved pending invoice will be allowed.
#///
#///
#/// true if the provided saved pending invoice can be rearranged; otherwise, false.
#///
#boolean allowReArrange(PurchParmTable _purchParmTable)
#{
# ;
#
# if (purchParmUpdate.SumIncludePending == NoYes::No && _purchParmTable.VendInvoiceSaveStatus == VendInvoiceSaveStatus::Pending)
# {
# // If user doesn't want to include pending invoices, reject them
# return false;
# }
#
# if (purchParmUpdate.SumBy != AccountOrder::None)
# {
# // Allow summary by something other than "None"
# return true;
# }
#
# if (_purchParmTable.VendInvoiceSaveStatus == VendInvoiceSaveStatus::New ||
# !VendInvoiceInfoTable::exist(_purchParmTable.TableRefId))
# {
# // the current document is not a saved pending document;
# return true;
# }
#
# return false;
#
#}
#
ENDSOURCE
SOURCE #approval
#protected NoYes approval()
#{
# return NoYes::No;
#}
ENDSOURCE
SOURCE #approveVendTrans
#void approveVendTrans()
#{
#
#}
ENDSOURCE
SOURCE #BPLChkImportFolderAllocation
#// Israel-Localisation-Prodware-ImportFolder
#public boolean BPLChkImportFolderAllocation(PurchId _purchId)
#{
# PurchLine AllocationPurchLine;
# PurchLine ImpFolderPurchLine;
# BPLImpFolderLine AllocationImpFolderLine;
# ;
# while select ImpFolderPurchLine
# where ImpFolderPurchLine.PurchId == _purchId
# Join AllocationImpFolderLine
# where AllocationImpFolderLine.InventTransId == ImpFolderPurchLine.InventTransId
# NotExists Join AllocationPurchLine
# where AllocationPurchLine.BPLImpFolderId == AllocationImpFolderLine.FolderId &&
# AllocationPurchLine.BPLAppCharge &&
# AllocationPurchLine.BPLAppChargeAff
#
# {
#
# warning("@BPL66");
# return false; // checkFailed(strfmt("@BPL66"));
# }
#
# return true;
#}
ENDSOURCE
SOURCE #BPLChkImportFolderAllocationLine
#// Israel-Localisation-Prodware-ImportFolder
#public boolean BPLChkImportFolderAllocationLine(InventTransId _inventTransId)
#{
# BPLImpFolderLine bPLImpFolderLine;
# PurchLine purchLineImpFolder;
# ;
# while select bPLImpFolderLine
# where bPLImpFolderLine.InventTransId == _inventTransId
# Exists Join purchLineImpFolder
# where purchLineImpFolder.BPLImpFolderId == bPLImpFolderLine.FolderId
# && purchLineImpFolder.BPLAppCharge
# && !purchLineImpFolder.BPLAppChargeAff
# {
# warning(strfmt("@BPL87",bPLImpFolderLine.FolderId));
# return false;
# }
# return true;
#}
ENDSOURCE
SOURCE #calcLastPurchPrice
#void calcLastPurchPrice()
#{
# if (!purchParmLine.PurchPrice)
# {
# purchParmLine.PurchPrice = PriceDisc::amount2Price(purchParmLine.LineAmount,
# purchParmLine.discPercent(),
# purchParmLine.PurchMarkup,
# purchParmLine.ReceiveNow,
# purchParmLine.discAmount(),
# purchParmLine.PriceUnit,
# purchParmLine.purchLine().CurrencyCode,
# purchParmLine.PurchPrice);
# }
#
# purchParmLine.inventTable().updateLastPurchPrice(purchParmTable.TransDate,
# purchParmTable.CurrencyCode,
# purchParmLine.PurchPrice,
# purchParmLine.PriceUnit,
# purchParmLine.PurchMarkup,
# purchLine.PurchUnit,
# purchLine.inventDim(),
# this.fixedExchRate());
#}
ENDSOURCE
SOURCE #canCreateParmLine
#protected boolean canCreateParmLine(PurchParmTable _purchParmTable, PurchId _purchId)
#{
# boolean isAllowed;
# PurchLine localPurchLine;
#
# boolean hasQty(PurchUpdate specQty)
# {
# PurchQty receiveNow, remainBefore, remainAfter;
# ;
#
# if (specQty != purchParmUpdate.SpecQty)
# {
# if (specQty == PurchUpdate::PackingSlip)
# {
# newPostingPurchQty = naReal();
# }
#
# while select localPurchLine
# where localPurchLine.PurchId == _purchId
# {
# [receiveNow, remainBefore, remainAfter] = this.qtyPurch (localPurchLine, naReal(), specQty);
#
# if (receiveNow != 0)
# break;
# }
# }
# return receiveNow != 0.0;
# }
#
# ;
#
# if (_purchParmTable.RecId != 0 && _purchParmTable.TableRefId == currentTableRef)
# {
# // header already exists, return
# return true;
# }
#
# isAllowed = super(_purchParmTable, _purchId);
#
# if (pendingInvoices != null && isAllowed)
# { // verify there is no pending invoice for current purchase order
# isAllowed = !pendingInvoices.exists(_purchId);
#
# if (!isAllowed)
# {
# // verify if a line would be created for any specQty position
# isAllowed = hasQty(PurchUpdate::All) || hasQty(PurchUpdate::PackingSlip) ||
# hasQty(PurchUpdate::ReceiveNow) || hasQty(PurchUpdate::Recorded);
# }
# }
#
# return isAllowed;
#
#}
ENDSOURCE
SOURCE #canGoBatchJournal
#public boolean canGoBatchJournal()
#{
# return true;
#}
ENDSOURCE
SOURCE #canMultiThread
#///
#/// Determines if multithreading should be enabled.
#///
#///
#/// True, if the posting can be multithreaded; otherwise false.
#///
#///
#/// When the Italian sales tax book section functionality is enabled, multithreading is not possible, as invoices are not allowed to be posted in parallel.
#///
#protected boolean canMultiThread()
#{
# if (TaxParameters::find().VatBookEnable)
# {
# return false;
# }
#
# return super();
#}
ENDSOURCE
SOURCE #checkBeforePosting
#boolean checkBeforePosting()
#{
# InventTransIdSum inventTransIdSum;
# PurchQty remainPurchQty;
# ;
#
# inventTransIdSum = new InventTransIdSum(purchLine.InventTransId);
#
# if ((purchParmLine.RemainBefore != (purchLine.RemainPurchFinancial + purchLine.RemainPurchPhysical)) ||
# (purchParmLine.RemainBeforeInvent != purchLine.RemainInventPhysical + inventTransIdSum.physical()))
# {
# throw error("@SYS23025");
# }
#
# remainPurchQty = purchLine.RemainPurchFinancial;
# if (purchParmUpdate.SpecQty != PurchUpdate::PackingSlip)
# {
# remainPurchQty += purchLine.RemainPurchPhysical;
# }
#
# if (PurchParameters::find().OverDelivery && purchLine.OverDeliveryPct>0)
# {
# remainPurchQty += remainPurchQty*purchLine.OverDeliveryPct/100;
# }
#
# if ((remainPurchQty < 0 &&
# purchParmLine.ReceiveNow < remainPurchQty) ||
# (remainPurchQty >= 0 &&
# purchParmLine.ReceiveNow > remainPurchQty))
# {
# throw error("@SYS109412");
# }
#
# return false;
#}
ENDSOURCE
SOURCE #checkDuplicateInvoice
#///
#/// Validates an invoice for duplicate numbers prior to posting.
#///
#///
#/// true if the invoice passes the duplicate number check; otherwise, false.
#///
#protected boolean checkDuplicateInvoice()
#{
# ;
#
# return purchParmTable.vendTable_InvoiceAccount().checkInvoice(purchParmTable.Num,purchParmTable.TransDate);
#}
#
ENDSOURCE
SOURCE #checkFormLetterId
#boolean checkFormLetterId()
#{
# boolean ok = true;
# PurchSummary checkPurchSummary;
# ;
#
# // If posting or printing and saving changes, make sure the document number is entered
# if ((!purchParmUpdate.Proforma) || (this.parmSaveChanges()))
# {
# checkPurchSummary = PurchSummary::construct(purchParmUpdate.SumBy, purchParmUpdate.ParmId, purchParmUpdate.SumPurchId, this.documentStatus(), number);
# ok = checkPurchSummary.checkFormLetterId(this.missingNumber());
# }
#
# return ok;
#}
#
ENDSOURCE
SOURCE #checkForMultiplePOLines
#private boolean checkForMultiplePOLines()
#{
# boolean ok = true;
# PurchParmLine purchParmLine1, purchParmLine2;
# ;
#
# // Prevent more than one invoice line for the same PO line
# select firstonly RecId from purchParmLine1
# where purchParmLine1.ParmId == purchParmTable.ParmId &&
# purchParmLine1.TableRefId == purchParmTable.TableRefId
# exists join purchParmLine2
# where purchParmLine2.ParmId == purchParmLine1.ParmId &&
# purchParmLine2.TableRefId == purchParmLine1.TableRefId &&
# purchParmLine2.PurchLineRecId == purchParmLine1.PurchLineRecId &&
# purchParmLine2.RecId != purchParmLine1.RecId;
#
# if (purchParmLine1.RecId != 0)
# {
# ok = checkFailed(strfmt("@SYS122954", purchParmTable.Num));
# info("@SYS122955" + '\n' + "@SYS122956");
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #checkHeading
#boolean checkHeading()
#{
# boolean ok = true;
# ;
# if (!purchParmTable.RecId)
# ok = checkFailed(strfmt("@SYS15741", purchTable.PurchId));
#
# if (!purchParmTable.OrderAccount)
# ok = checkFailed(strfmt("@SYS19291", purchTable.PurchId));
#
# if (!VendTable::exist(purchParmTable.OrderAccount))
# ok = checkFailed(strfmt("@SYS19292", purchTable.OrderAccount,purchTable.PurchId));
#
# if (!purchParmTable.InvoiceAccount)
# ok = checkFailed(strfmt("@SYS19293", purchTable.PurchId));
#
# if (!VendTable::exist(purchParmTable.InvoiceAccount))
# ok = checkFailed(strfmt("@SYS19294", purchTable.InvoiceAccount,purchTable.PurchId));
#
# if (purchTable.CurrencyCode && !Currency::exist(purchParmTable.CurrencyCode))
# ok = checkFailed(strfmt("@SYS19295", purchTable.CurrencyCode,purchTable.PurchId));
#
# if (!purchTable.isInterCompanyOrder() && !purchParmTable.checkMarkupTrans(false))
# ok = false;
#
# if (TaxVATNumTable::isVATNumMandatory(VendParameters::find().MandatoryInvoiceVATNum, purchTable))
# ok = checkFailed(strfmt("@SYS54453",purchTable.PurchId));
#
# return ok;
#}
ENDSOURCE
SOURCE #checkInvoice
#boolean checkInvoice()
#{
# boolean invoiceOk = true;
# ;
#
# // Skip most of the posting validation when the invoice is on hold
# if (purchParmTable.Hold == NoYes::No)
# {
# invoiceOk = this.checkDuplicateInvoice();
#
# if (invoiceOk)
# {
# invoiceOk = TradeBLWIParameters::checkBLWI(purchTable.RecId, TradeBLWITypeOfForm::PurchTable);
# }
# if (VendParameters::find().ValidatePaymRef_BE == NoYes::Yes)
# {
# if (!Bank_BE::checkPaymentId(purchParmTable.PaymId))
# {
# invoiceOk = false;
# }
# }
# }
# else
# {
# // Only perform this check if the invoice is on hold and user is printing, otherwise the check was done as a part of checkLines
# if (printFormletter && !this.checkForMultiplePOLines())
# {
# invoiceOk = false;
# }
# }
#
# // Check for price and quantity matching variances
# if (!this.checkMatching())
# {
# invoiceOk = false;
# }
#
# return invoiceOk;
#}
#
ENDSOURCE
SOURCE #checkInvoiceDate
#boolean checkInvoiceDate()
#{
# PurchParmTable purchParmTableLocal;
# boolean ok = true;
# ;
#
# if ((validateAll) && (VendParameters::find().VendInvoiceDocDate_IT))
# {
# while select purchParmTableLocal
# where purchParmTableLocal.ParmId == purchParmUpdate.ParmId
# {
# if (!purchParmTableLocal.DocumentDate)
# {
# ok = checkFailed(strfmt("@SYS95922"));
# break;
# }
#
# if (purchParmTableLocal.DocumentDate > purchParmTableLocal.TransDate)
# {
# ok = checkFailed(strfmt("@SYS95923"));
# break;
# }
# }
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #checkLedgerPeriod
#///
#/// Checks whether posting in the ledger period is allowed.
#///
#///
#/// True if posting in the ledger period is allowed; otherwise False.
#///
#protected boolean checkLedgerPeriod()
#{
# boolean ok;
# ;
# ok = super();
#
# if (ok)
# {
# ok = LedgerPeriod::checkLedgerPeriodDateModule(purchParmTable.updateDate(), SysModule::Purch);
# }
#
# return ok;
#}
#
ENDSOURCE
SOURCE #checkLineAfterPosting
#protected boolean checkLineAfterPosting()
#{
# boolean ok = true;
# InventTrans inventTrans;
#
# if (purchLine.RemainPurchFinancial == 0 && purchLine.RemainPurchPhysical == 0)
# {
#
# select firstonly RecId from inventTrans
# where inventTrans.InventTransId == purchLine.InventTransId &&
# ((purchLine.PurchQty >= 0 && inventTrans.StatusReceipt != StatusReceipt::Purchased && inventTrans.StatusReceipt != StatusReceipt::None) ||
# (purchLine.PurchQty < 0 && inventTrans.StatusIssue != StatusIssue::Sold && inventTrans.StatusIssue != StatusIssue::None));
#
# if (inventTrans.RecId)
# {
# if (purchLine.PurchQty < 0)
# {
# ok = checkFailed(strfmt("@SYS54028", StatusIssue::Sold));
# }
# else
# {
# ok = checkFailed(strfmt("@SYS54028", StatusReceipt::Purchased));
# }
#
# ok = checkFailed("@SYS115807");
# }
#
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #checkLines
#protected boolean checkLines()
#{
# boolean ok = true;
# ;
#
# ok = super();
#
# // Prevent more than one invoice line for the same PO line
# if (ok)
# {
# ok = this.checkForMultiplePOLines();
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #checkMatching
#///
#/// Validates an invoice for matching variances prior to posting.
#///
#///
#/// true if the invoice passes the matching checks; otherwise, false.
#///
#protected boolean checkMatching()
#{
# VendParameters vendParameters = VendParameters::find();
# ;
#
# // If user is not using invoice matching, return true
# if (vendParameters.useInvoiceMatching() == NoYes::No)
# {
# return true;
# }
#
# // If user has already approved the invoice, return true
# if (purchParmTable.VarianceApproved == NoYes::Yes)
# {
# return true;
# }
#
# // Update the expected values for all lines on this invoice
# VendInvoiceMatchingLine::updateExpectedValues(purchParmTable);
#
# // If user does not want posting errors, return true
# if (vendParameters.PostInvoiceMatchDiscrepancies == InvoiceMatchPostingOption::AllowWithWarning)
# {
# return true;
# }
#
# // If the invoice isn't on hold, check for matching variances. If the check fails, return an error
# if (purchParmTable.Hold == NoYes::No && !purchParmTable.checkIfMatched())
# {
# return checkFailed(strfmt("@SYS117291", purchParmTable.Num));
# }
#
# return true;
#}
#
ENDSOURCE
SOURCE #checkPackingSlip
#boolean checkPackingSlip()
#{
# return true;
#}
ENDSOURCE
SOURCE #checkPurch
#protected boolean checkPurch()
#{
# boolean ret;
#
# PurchTable purchTableLocal = this.purchTable();
# CustInvoiceJour custInvoiceJourLocal;
# CustInvoiceTrans custInvoiceTransLocal;
# boolean salesInvoiceSummary = false;
# SalesId salesSumNum = purchTableLocal.InterCompanySalesId;
#;
# ret = super();
#
# if (ret
# && purchParmTable.Hold == NoYes::No
# && purchTableLocal.isInterCompanyOrder()
# && purchTableLocal.PurchaseType != PurchaseType::ReturnItem)
# {
# changecompany(purchTableLocal.InterCompanyCompanyId)
# {
# //
# // Controls whether actual journal contains lines from other orders
# //
# select firstonly RecId, SalesId
# from custInvoiceTransLocal
# index hint InvoiceIdx
# where custInvoiceTransLocal.InvoiceId == purchParmTable.Num
# && custInvoiceTransLocal.OrigSalesId != purchTableLocal.InterCompanySalesId;
# if(custInvoiceTransLocal.RecId > 0)
# {
# salesInvoiceSummary = true;
# salesSumNum = custInvoiceTransLocal.SalesId;
# }
#
# if (salesInvoiceSummary)
# {
# select count(RecId), sum(InvoiceAmount)
# from custInvoiceJourLocal
# index hint SalesIdDateIdx
# where custInvoiceJourLocal.RefNum == RefNum::SalesOrder
# && (custInvoiceJourLocal.SalesId == purchTableLocal.InterCompanySalesId
# || custInvoiceJourLocal.SalesId == salesSumNum)
# && custInvoiceJourLocal.InvoiceId == purchParmTable.Num;
# }
# else
# {
# if (this.interCompanyParmId())
# {
# select count(RecId), sum(InvoiceAmount), sum(SumMarkup)
# from custInvoiceJourLocal
# index hint InvoiceNumIdx
# where custInvoiceJourLocal.ParmId == this.interCompanyParmId()
# && custInvoiceJourLocal.InvoiceId == purchParmTable.Num;
# }
# else
# {
# select count(RecId), sum(InvoiceAmount), sum(SumMarkup)
# from custInvoiceJourLocal
# index hint InvoiceNumIdx
# where custInvoiceJourLocal.SalesId == purchTableLocal.InterCompanySalesId
# && custInvoiceJourLocal.InvoiceId == purchParmTable.Num;
# }
# }
#
# if (custInvoiceJourLocal.RecId < 1)
# {
# ret = ret && checkFailed(strfmt("@SYS94315", purchParmTable.Num, purchTableLocal.InterCompanyCompanyId, this.interCompanyParmId()));
# }
#
# if (purchTotals.purchTotalAmount() != custInvoiceJourLocal.InvoiceAmount)
# {
# ret = ret && checkFailed(strfmt("@SYS94316",purchTableLocal.InterCompanyCompanyId, custInvoiceJourLocal.InvoiceAmount , purchTotals.purchTotalAmount() ));
# }
# }
# }
# return ret;
#}
#
ENDSOURCE
SOURCE #chooseAdditionalLine
#///
#/// Processes a single line of the non-standard result set returned by the chooseLines query.
#///
#protected void chooseAdditionalLine()
#{
# VendInvoiceInfoTable localVendInvoiceInfoTable;
# boolean isAdditionalLine;
# ;
#
# isAdditionalLine = chooseLinesPendingInvoice.changed(tablenum(VendInvoiceInfoTable));
#
# if (isAdditionalLine)
# {
# localVendInvoiceInfoTable = chooseLinesPendingInvoice.get(tablenum(VendInvoiceInfoTable));
#
# if (PurchParmTable::existsCopyOfVendInvoiceInfo(
# localVendInvoiceInfoTable.PurchId,
# localVendInvoiceInfoTable.TableRefId,
# this.parmId()))
#
# {
# checkFailed("@SYS112584");
# }
# else
# {
# this.deepCopyFromVendInvoiceInfoTable(localVendInvoiceInfoTable);
# }
#
# // add pending invoice to the list
# if (!pendingInvoices.exists(localVendInvoiceInfoTable.PurchId))
# {
# pendingInvoices.insert(localVendInvoiceInfoTable.PurchId, VendInvoiceSaveStatus::Pending);
# }
# }
#}
ENDSOURCE
SOURCE #chooseLines
#///
#/// Creates PurchParmTable table records based on the chooseLines query.
#///
#///
#/// A Boolean value which determines whether additional data sources should be processed by the chooseLines query.
#///
#///
#/// The PurchParmTable table record.
#///
#public void chooseLines(boolean _processAdditional = false, PurchParmTable _purchParmTable = null)
#{
# boolean parmTableExists = _purchParmTable.RecId != 0;
# ;
#
# if (purchParmUpdate.SpecQty == PurchUpdate::PackingSlip)
# {
# this.chooseLinesPackingSlip(_processAdditional, _purchParmTable);
# }
# else
# {
#
# ttsbegin;
#
# // chooseLines query initialy represents both saved invoices and new invoices as a single query.
# // After criteria is entered the single query is split into two queries by disabling VendInvoiceInfo
# // in the initial query, and processing it separately (chooseLinesPendingInvoice query).
# // For performance reasons saved invoices should be processed first.
#
# this.chooseLinesInit();
#
# if (_processAdditional)
# {
# while (chooseLinesPendingInvoice.next())
# {
# this.chooseAdditionalLine(); // process query lines coming from saved invoices if present
# }
# }
#
# //The created parm tables from the pending invoices needs to be inserted before processing
# //the chooseLine query.
# this.recordInsertListInsert();
# this.recordInsertListInit();
#
# while (chooseLines.next())
# {
# this.chooseLine(_purchParmTable, parmTableExists);
# }
#
# this.chooseLinesCleanup(_purchParmTable);
# ttscommit;
#
# purchParmTable = _purchParmTable;
#
# reArrangeNow = true;
# }
#
# this.moveTaxRegulations();
#}
#
ENDSOURCE
SOURCE #chooseLinesCleanup
#///
#/// Performs cleanup steps after the chooseLines query has been processed.
#///
#///
#/// The PurchParmTable table record.
#///
#protected void chooseLinesCleanup(PurchParmTable _purchParmTable)
#{
# super(_purchParmTable);
#
# this.chooseLinesCleanupList();
# chooseLines.query().dataSourceTable(tablenum(VendInvoiceInfoTable)).enabled(true);
#}
#
#
ENDSOURCE
SOURCE #chooseLinesCleanupList
#private void chooseLinesCleanupList()
#{
# pendingInvoices = null;
#}
ENDSOURCE
SOURCE #chooseLinesInit
#///
#/// Initializes processing of the chooseLines query.
#///
#protected void chooseLinesInit()
#{
# QueryBuildDataSource vendInvoiceInfoTableDS = chooseLines.query().dataSourceTable(tablenum(VendInvoiceInfoTable));
# QueryBuildDataSource savedInvoicesQueryRootDS = chooseLinesPendingInvoice.query().dataSourceTable(tablenum(PurchTable));
# ;
#
# super();
# this.chooseLinesInitList();
# // copy enabled from the initial query
# savedInvoicesQueryRootDS.enabled(vendInvoiceInfoTableDS.enabled());
# // Saved invoices are processed by chooseLinesPendingInvoices query.
# // The only reason for VendInvoiceInfoTable in chooseLines query is that user can enter criteria.
# vendInvoiceInfoTableDS.enabled(false);
# chooseLines.reset();
# chooseLinesPendingInvoice.reset();
#}
#
#
ENDSOURCE
SOURCE #chooseLinesInitList
#private void chooseLinesInitList()
#{
# currentPurchTable.clear();
# currentTableRef = '';
# pendingInvoices = new Map(Types::String, Types::Enum);
#}
#
#
ENDSOURCE
SOURCE #chooseLinesPackingSlip
#///
#/// Creates PurchParmTable table records based on the chooseLines query when invoices are being created from packing slips.
#///
#///
#/// A Boolean value which determines whether additional data sources should be processed by the chooseLines query.
#///
#///
#/// The PurchParmTable table record; optional
#///
#
#protected void chooseLinesPackingSlip(boolean _processAdditional,
# PurchParmTable _purchParmTable = null)
#{
# PurchParmTable localPurchParmTable = _purchParmTable.data();
# VendPackingSlipTrans vendPackingSlipTrans;
# PurchLine prevPurchLine;
# PurchTable prevPurchTable;
# InventTrans inventTrans;
# Map map = new Map(typeId2Type(typeid(recId)),Types::Record);
# boolean linesCreated; // have lines been created for the last processed header
#
# void createParmTable(boolean _linesCreated)
# {
# if (this.allowCreateParmTable() && prevPurchTable.RecId != 0 && this.maySelectPO(prevPurchTable))
# {
# if (_linesCreated || this.canCreateParmLine(localPurchParmTable, prevPurchTable.PurchId))
# {
# if (!localPurchParmTable.ParmId || localPurchParmTable.TableRefId != currentTableRef)
# {
# localPurchParmTable.clear();
# localPurchParmTable.TableRefId = currentTableRef;
#
# this.createParmTable(localPurchParmTable, prevPurchTable);
#
# localPurchParmTable.initTotals();
# this.insertPurchParmTable(localPurchParmTable);
# this.syncToNewInvoice(localPurchParmTable, currentInterCompanyInvoiceNum);
# this.allowCreateParmTable(this.allowEmptyTable());
# }
# }
# }
# }
#
# void chooseLinesPackingSlipInit()
# {
# QueryBuildDataSource vendInvoiceInfoTableDS = chooseLines.query().dataSourceTable(tablenum(VendInvoiceInfoTable));
# QueryBuildDataSource savedInvoicesQueryRootDS = chooseLinesPendingInvoice.query().dataSourceTable(tablenum(PurchTable));
# ;
#
# this.allowCreateParmTable(this.allowEmptyTable());
# chooseLines.reset(); // if the select button is used from purcheditlines
# chooseLinesPendingInvoice.reset();
# currentMayJournalBePosted = true;
# currentInterCompanyInvoiceNum = '';
# this.chooseLinesInitList();
# // copy enabled from the initial query
# savedInvoicesQueryRootDS.enabled(vendInvoiceInfoTableDS.enabled());
# // Saved invoices are processed by chooseLinesPendingInvoices query.
# // The only reason for VendInvoiceInfoTable in chooseLines query is that user can enter criteria.
# vendInvoiceInfoTableDS.enabled(false);
# }
#
#
# void chooseLinesPackingSlipChooseLine()
# {
# ;
#
# if (chooseLines.changed(tablenum(PurchTable)))
# {
# if (currentPurchTable.RecId)
# {
# if (map.elements() > 0)
# {
# linesCreated = this.createParmLineAndSubLines(prevPurchLine, map.pack(), currentTableRef) || linesCreated;
# map = new Map(typeId2Type(typeid(recId)),Types::Record);
# }
# createParmTable(linesCreated);
# }
# currentPurchTable = chooseLines.get(tablenum(PurchTable));
# prevPurchTable = currentPurchTable.data();
# currentMayJournalBePosted = this.mayJournalBePosted(currentPurchTable);
# currentInterCompanyInvoiceNum = this.interCompanyInvoiceNum(currentPurchTable);
# this.interCompanyMarkupAllocationForDDPO(currentPurchTable);
# if (_purchParmTable.TableRefId)
# currentTableRef = _purchParmTable.TableRefId;
# else
# currentTableRef = FormLetter::getTableRef();
# linesCreated = false;
# }
#
# if (!currentMayJournalBePosted)
# return;
#
# if (chooseLines.changed(tablenum(PurchLine)))
# {
# if (map.elements() > 0)
# {
# linesCreated = this.createParmLineAndSubLines(prevPurchLine, map.pack(), currentTableRef) || linesCreated;
# }
# currentPurchLine = chooseLines.get(tablenum(PurchLine));
# prevPurchLine = currentPurchLine.data();
# map = new Map(typeId2Type(typeid(recId)),Types::Record);
# }
#
# inventTrans = chooseLines.get(tablenum(InventTrans));
# if (inventTrans.RecId)
# {
# while select vendPackingSlipTrans
# where vendPackingSlipTrans.InventTransId == inventTrans.InventTransId &&
# vendPackingSlipTrans.PackingSlipId == inventTrans.PackingSlipId
# {
# if (vendPackingSlipTrans.vendPackingslipJour().LedgerVoucher == inventTrans.VoucherPhysical)
# map.insert(vendPackingSlipTrans.RecId, vendPackingSlipTrans);
# }
# }
# }
#
# void chooseLinesPackingSlipCleanup()
# {
# ;
# // process last line
# if (prevPurchLine.RecId && map.elements() > 0)
# {
# linesCreated = this.createParmLineAndSubLines(prevPurchLine, map.pack(), currentTableRef) || linesCreated;
# }
# createParmTable(linesCreated);
# this.chooseLinesCleanupList();
# chooseLines.query().dataSourceTable(tablenum(VendInvoiceInfoTable)).enabled(true);
# }
#
# ;
#
# ttsbegin;
#
# // chooseLines query initialy represents both saved invoices and new invoices as a single query.
# // After criteria is entered the single query is split into two queries by disabling VendInvoiceInfo
# // in the initial query, and processing it separately (chooseLinesPendingInvoice query).
# // For performance reasons saved invoices should be processed first.
#
# this.recordInsertListInit();
# chooseLinesPackingSlipInit();
#
# if (_processAdditional)
# {
# while (chooseLinesPendingInvoice.next())
# {
# this.chooseAdditionalLine();
# }
# }
#
# //The created parm tables from the pending invoices needs to be inserted before processing
# //the chooseLine query.
# this.recordInsertListInsert();
# this.recordInsertListInit();
#
# while (chooseLines.next())
# {
# chooseLinesPackingSlipChooseLine();
# }
#
# chooseLinesPackingSlipCleanup();
# this.recordInsertListInsert();
# ttscommit;
#}
#
ENDSOURCE
SOURCE #classDeclaration
#class PurchFormLetter_Invoice
#extends PurchFormLetter
#{
# VendInvoiceJour vendInvoiceJour;
# VendInvoiceTrans vendInvoiceTrans;
# PurchQty invoiceUpdatedOnly;
# Map purchValueMap;
#
# Tax1099Amount totalTax1099Amount;
# Tax1099StateAmount totalTax1099StateAmount;
# Tax1099Box firstTax1099Box;
# Tax1099State firstTax1099State;
#
# PurchQty newPostingPurchQty;
# InventQty newPostingInventQty;
#
# AmountCur reversechargeTotal;
# boolean saveChanges;
#
# SysQueryRun chooseLinesPendingInvoice;
#
# // temporary state for chooseLines
# Map pendingInvoices;
#
# RecordInsertList recordInsertPurchParmSubLine;
# RecordInsertList recordInsertVendInvoiceMatchingLine;
#
# #define.CurrentVersion(10)
# #LOCALMACRO.ParmList
# parmId,
# purchParmUpdate,
# QueryCriteria,
# Editing,
# Printout,
# PrintFormletter,
# PrinterSettingsFormLetter,
# printEuVatInvoice,
# printerSettingsEuVatInvoice,
# printerSettingsPromissoryNote,
# PrintSalesFormletter,
# printerSettingsFormletterCopy,
# saveChanges,
# usePrintManagement
# #ENDMACRO
#}
#
#
#
#
ENDSOURCE
SOURCE #createJournal
#public void createJournal()
#{
# ;
#
# this.setReverseCharge_UK();
#
# super();
#}
ENDSOURCE
SOURCE #createParmLine
#///
#/// Creates a new PurchParmLine table record.
#///
#///
#/// A PurchLine table record used to initialize the new PurchParmLine table record.
#///
#///
#/// The table reference of the new PurchParmLine table record.
#///
#///
#/// true if the PurchParmLine table record was created; otherwise, false.
#///
#public boolean createParmLine(PurchLine _purchLine, TradeLineRefId _tableRef)
#{
# boolean createdLine = super(_purchLine, _tableRef);
# str purchParmLineKey = this.purchParmLineMapKey(_purchLine.PurchId, _purchLine.InventTransId);
# PurchParmLine localpurchParmLine;
# ;
#
# if(createdLine && purchParmLineMap.exists(purchParmLineKey))
# {
# localpurchParmLine = purchParmLineMap.lookup(purchParmLineKey);
# Markup::copyFromPurchOrder(_purchLine, localpurchParmLine, currentInterCompanyInvoiceNum);
# this.insertVendInvoiceMatchingLine(localpurchParmLine,_purchLine.RecId,_purchLine);
# }
# return createdLine;
#}
ENDSOURCE
SOURCE #createParmLineAndSubLines
#protected boolean createParmLineAndSubLines(PurchLine _purchLine,
# container _packedSubLinesMap,
# TradeLineRefId _tableRef)
#{
# MapEnumerator me;
# PurchParmSubLine _purchParmSubLine;
# PurchParmLine _purchParmLine;
# VendPackingSlipTrans vendPackingSlipTrans;
# PurchQty purchQty;
# InventQty inventQty;
# Set subLineSet = new Set(Types::Record);
# SetEnumerator se;
# boolean lineCreated, anyLineCreated;
#
#
# newPostingPurchQty = 0;
# newPostingInventQty = 0;
#
# if (_purchLine.RecId)
# {
# me = Map::create(_packedSubLinesMap).getEnumerator();
#
# while (me.moveNext())
# {
# vendPackingSlipTrans = me.currentValue();
#
#// if (vendPackingSlipTrans.isReserved())
#// {
#// continue;
#// }
#
# vendPackingSlipTrans.Qty = vendPackingSlipTrans.remainPurchFinancial();
# vendPackingSlipTrans.InventQty = vendPackingSlipTrans.remainInventFinancial();
#
# subLineSet.add(vendPackingSlipTrans);
#
# inventQty += vendPackingSlipTrans.InventQty;
# purchQty += vendPackingSlipTrans.Qty;
# }
#
# newPostingPurchQty = purchQty;
# newPostingInventQty = inventQty;
#
# lineCreated = this.createParmLine(_purchLine, _tableRef);
# anyLineCreated = anyLineCreated || lineCreated;
#
# if (lineCreated &&
# purchParmLineMap.exists(this.purchParmLineMapKey(_purchLine.PurchId, _purchLine.InventTransId)))
# {
# _purchParmLine = purchParmLineMap.lookup(this.purchParmLineMapKey(_purchLine.PurchId, _purchLine.InventTransId));
#
# se = subLineSet.getEnumerator();
# while (se.moveNext())
# {
# vendPackingSlipTrans = se.current();
# _purchParmSubLine.clear();
# _purchParmSubLine.initFromPurchParmLine(_purchParmLine);
# _purchParmSubLine.initFromVendPackingSlipTrans(vendPackingSlipTrans);
# this.insertPurchParmSubLine(_purchParmSubLine);
# }
# }
# }
#
# return anyLineCreated;
#}
#
ENDSOURCE
SOURCE #createParmTable
#void createParmTable(PurchParmTable _purchParmTable,
# PurchTable _purchTable,
# Name _purchName = _purchTable.PurchName,
# VendName _deliveryName = _purchTable.DeliveryName,
# Addressing _deliveryAddress = _purchTable.DeliveryAddress)
#{
# super(_purchParmTable, _purchTable, _purchName, _deliveryName, _deliveryAddress);
#
# if (!_purchParmTable.Num && _purchTable.isInterCompanyOrder())
# {
# _purchParmTable.Num = currentInterCompanyInvoiceNum;
# }
#}
#
#
ENDSOURCE
SOURCE #createPayment
#protected void createPayment()
#{
# VendTrans vendTrans;
# ;
#
# //Autogeneration of payment, controlled on Method of Payment
# super();
#
# vendTrans = vendInvoiceJour.vendTrans();
#
# if(VendPaymModeTable::find(vendTrans.PaymMode).PaymOnInvoice)
# {
# CustVendPaymInvoiceWithJournal::construct(vendInvoiceJour).run();
# }
#}
ENDSOURCE
SOURCE #createPaymentSched
#void createPaymentSched()
#{
# CustVendPaymSched custVendPaymSched;
# VendPaymSched vendPaymSched;
# AmountCur paymScheduleAmount;
# ;
#
# if (purchTable.PaymentSched &&
# ! VendPaymSched::exist(purchTable.TableId,
# purchTable.RecId) &&
# ! VendPaymSched::exist(purchParmTable.TableId,
# purchParmTable.RecId))
# {
# custVendPaymSched = CustVendPaymSched::construct(SysModule::Vend,purchTable);
# custVendPaymSched.setPurchTotals(purchTotals);
# custVendPaymSched.createPaymSched(PaymSched::find(purchTable.PaymentSched));
# }
#
#
# if (VendPaymSched::exist(purchParmTable.TableId, purchParmTable.RecId))
# {
# purchParmTable.copyPaymentSched(vendInvoiceJour);
# }
# else
# {
# vendPaymSched = VendPaymSched::find(purchTable.TableId, purchTable.RecId);
#
# if (vendPaymSched)
# {
# paymScheduleAmount = vendPaymSched.paymScheduleAmount();
#
# if (!VendPaymSched::isLinescreated(purchTable.TableId, purchTable.RecId) || paymScheduleAmount != vendInvoiceJour.InvoiceAmount)
# {
# vendInvoiceJour.createPaymentSched();
# }
# else
# {
# purchTable.copyPaymentSched(vendInvoiceJour);
# }
# }
# }
#
# // check that schedule amount matches invoice amount
# if (!vendInvoiceJour.validatePaymentSched())
# throw error("@SYS18447"); // error message is added in validatePaymentSched()
#
#}
ENDSOURCE
SOURCE #createVendTrans
#void createVendTrans(boolean _isProject = false)
#{
# VendVoucher vendVoucher;
# VendTrans vendTrans;
# VendTransOpen tmpVendTransOpen;
#
# LedgerTransTxt ledgerTransTxt;
# ;
#
# if (creditNote)
# ledgerTransTxt = LedgerTransTxt::PurchCreditNoteVend;
# else
# ledgerTransTxt = LedgerTransTxt::PurchInvoiceVend;
#
# vendVoucher = VendVoucher::newVendVoucherPurch(ledgerVoucher,
# ledgerTransTxt,
# vendInvoiceJour,
# purchParmTable,
# purchTable);
#
# vendVoucher.parmExchRate(vendInvoiceJour.ExchRate);
# vendVoucher.parmExchRateSecondary(vendInvoiceJour.ExchRateSecondary);
#
# // We set the flag to indicate if the transaction is of the type project
# // Set the project bit
# if (_isProject)
# {
# vendTrans.InvoiceProject = NoYes::Yes;
# }
# else
# {
# vendTrans.InvoiceProject = NoYes::No;
# }
#
# vendTrans.Tax1099Amount = -totalTax1099Amount;
# vendTrans.Tax1099StateAmount = -totalTax1099StateAmount;
# vendTrans.Tax1099Box = firstTax1099Box;
# vendTrans.Tax1099State = firstTax1099State;
#
# vendVoucher.post(vendTrans,
# this.approval(),
# Currency::noYes2UnknownNoYes(vendInvoiceJour.Triangulation));
#
# this.approveVendTrans();
#
# if (firstTax1099Box || firstTax1099State)
# {
# if (vendTrans)
# {
# // Update the VendTransOpen 1099 data to match the VendTrans values
# select forupdate tmpVendTransOpen
# where tmpVendTransOpen.RefRecId == vendTrans.RecId;
#
# if (tmpVendTransOpen)
# {
# tmpVendTransOpen.Tax1099Amount = vendTrans.Tax1099Amount;
# tmpVendTransOpen.Tax1099StateAmount = vendTrans.Tax1099StateAmount;
# tmpVendTransOpen.update();
# }
# }
# }
#}
ENDSOURCE
SOURCE #deepCopyFromVendInvoiceInfoTable
#///
#/// Copies data from the VendInvoiceInfoTable table structure into the PurchParmTable table structure.
#///
#///
#/// The VendInvoiceInfoTable table record representing the structure to copy from.
#///
#///
#/// The common buffer record set representing that only its related record VendInvoiceInfoSubLine will be copied into record PurchParmSubLine.
#///
#///
#/// Data from child tables of the VendInvoiceInfoTable table will also be copied into child tables of the PurchParmTable table.
#///
#protected void deepCopyFromVendInvoiceInfoTable(VendInvoiceInfoTable _vendInvoiceInfoTable, Set _commonSet = null)
#{
# PurchParmTable localPurchParmTable;
# PurchParmLine localPurchParmLine;
# PurchParmLine_Asset localPurchParamLine_Asset;
# PurchParmSubLine localPurchParmSubLine;
# PurchParmSubTable localPurchParmSubTable;
# VendInvoiceInfoLine localVendInvoiceInfoLine;
# VendInvoiceInfoSubTable localVendInvoiceInfoSubTable;
# VendInvoiceInfoSubLine localVendInvoiceInfoSubLine;
# PurchId lastOrigPurchId = '';
# PurchLine localPurchLine;
# Common common;
# SetEnumerator se;
# InventQty inventNowQty;
# PurchQty receiveNowQty;
# InventQty dummy;
# Container vendInvoiceInfoSubLineCon;
# int i;
# ;
#
# // copy lines
# while select localVendInvoiceInfoLine
# order by OrigPurchId
# where (localVendInvoiceInfoLine.TableRefId == _vendInvoiceInfoTable.TableRefId)
#
# {
# localPurchParmLine = PurchParmLine::createFromVendInvoiceInfoLine(localVendInvoiceInfoLine, this.parmId(),false);
#
# // Initiaze value
# vendInvoiceInfoSubLineCon = conNull();
# InventNowQty = 0;
# receiveNowQty = 0;
#
# // Save sub lines for given line into container to create PurchParmSubLine
# while select localVendInvoiceInfoSubLine
# where localVendInvoiceInfoSubLine.LineRefRecId == localVendInvoiceInfoLine.RecId
# {
# if (_commonSet)
# {
# se = _commonSet.getEnumerator();
# while (se.moveNext())
# {
# common = se.current();
# if (localVendInvoiceInfoSubLine.JournalRefRecId == common.RecId &&
# localVendInvoiceInfoSubLine.JournalRefTableId == common.TableId)
# {
# inventNowQty += localVendInvoiceInfoSubLine.InventNow;
# receiveNowQty += localVendInvoiceInfoSubLine.ReceiveNow;
# vendInvoiceInfoSubLineCon += [localVendInvoiceInfoSubLine];
# break;
# }
# }
# }
# else
# {
# vendInvoiceInfoSubLineCon += [localVendInvoiceInfoSubLine];
# }
# }
#
# if (_commonSet && localPurchParmLine.InventNow != inventNowQty)
# {
# // Recalculate inventNow and receiveNow qty for PurchParmLine because
# // all packingSlips may be not marked in the same time.
# localPurchParmLine.InventNow = inventNowQty;
# localPurchParmLine.ReceiveNow = receiveNowQty;
# localPurchLine = localPurchParmLine.purchLine();
# [dummy,localPurchParmLine.RemainBeforeInvent,localPurchParmLine.RemainAfterInvent] = purchQuantity.qtyInvent(localPurchLine,PurchUpdate::ReceiveNow,localPurchParmLine.InventNow,false);
# [dummy,localPurchParmLine.RemainBefore,localPurchParmLine.RemainAfter] = purchQuantity.qtyPurch(localPurchLine,PurchUpdate::ReceiveNow,localPurchParmLine.ReceiveNow,false);
# localPurchLine = null;
# }
#
# this.insertPurchParmLine(localPurchParmLine);
#
# Markup::copy(NoYes::No, localVendInvoiceInfoLine, localPurchParmLine, true);
#
# this.insertVendInvoiceMatchingLine(localPurchParmLine,localPurchParmLine.PurchLineRecId,localPurchLine,
# _vendInvoiceInfoTable.VarianceApproved,localVendInvoiceInfoLine);
#
# // create PurchParmSubTable row for each distinct OrigPurchId
# if (localVendInvoiceInfoLine.OrigPurchId != lastOrigPurchId &&
# !purchParmSubTableMap.exists(this.purchParmSubTableMapKey(localVendInvoiceInfoLine.TableRefId,
# localVendInvoiceInfoLine.OrigPurchId)))
# {
# localPurchParmSubTable = PurchParmSubTable::createFromVendInvoiceInfoLine(localVendInvoiceInfoLine, this.parmId(), _vendInvoiceInfoTable.PurchName, false);
# this.insertPurchParmSubTable(localPurchParmSubTable);
#
# localVendInvoiceInfoSubTable = VendInvoiceInfoSubTable::findTableRefIdPurchId(localPurchParmSubTable.TableRefId, localPurchParmSubTable.OrigPurchId);
# Markup::copy(NoYes::No, localVendInvoiceInfoSubTable, localPurchParmSubTable, true, _vendInvoiceInfoTable.CurrencyCode);
#
# lastOrigPurchId = localVendInvoiceInfoLine.OrigPurchId;
# }
#
# // copy sub lines for given line
# for ( i = 1; i <= conlen(vendInvoiceInfoSubLineCon); i++)
# {
# localVendInvoiceInfoSubLine = conpeek(vendInvoiceInfoSubLineCon, i);
# localPurchParmSubLine = PurchParmSubLine::createFromVendInvoiceInfoSubLine(localVendInvoiceInfoSubLine, this.parmId(), localPurchParmLine.RecId,false);
# this.insertPurchParmSubLine(localPurchParmSubLine);
# }
#
# // create the purchParmLine_Asset if we have a matching VendInvoiceInfoLine_Asset
# if (localVendInvoiceInfoLine.vendInvoiceInfoLine_Asset().RecId != 0)
# {
# localPurchParamLine_Asset = PurchParmLine_Asset::createPurchParmLine_Asset(localPurchParmLine, localVendInvoiceInfoLine.vendInvoiceInfoLine_Asset());
# this.insertPurchParmLine_Asset(localPurchParamLine_Asset);
# }
# }
#
# // copy header
# localPurchParmTable.clear();
# localPurchParmTable.initValue();
# localPurchParmTable.initFromVendInvoiceInfoTable(_vendInvoiceInfoTable, this.parmId());
#
# this.insertPurchParmTable(localPurchParmTable, true);
#
# Markup::copy(NoYes::No, _vendInvoiceInfoTable, localPurchParmTable, true);
# TaxWorkRegulation::copy(_vendInvoiceInfoTable, localPurchParmTable);
#}
#
ENDSOURCE
SOURCE #deleteFullyInvoiced
#void deleteFullyInvoiced()
#{
# PurchLine localPurchLine;
# ParmId previousParmId = '';
# PurchId previousPurchId = '';
# ;
#
# if (PurchParameters::find().DeleteLine == NoYes::Yes)
# {
# purchParmLine.clear();
#
# recordListPurchParmLine.first(purchParmLine);
#
# while (purchParmLine)
# {
# purchLine = purchParmLine.purchLine(true);
#
# if (purchLine.PurchStatus == PurchStatus::Invoiced && purchLine.validateDelete())
# {
# purchLine.delete();
# }
#
# if (!recordListPurchParmLine.next(purchParmLine))
# break;
# }
# }
#
# if (PurchParameters::find().DeleteHeading == NoYes::Yes)
# {
# purchParmLine.clear();
#
# recordListPurchParmLine.first(purchParmLine);
#
# while (purchParmLine)
# {
# if (purchParmLine.OrigPurchId != previousPurchId || purchParmLine.ParmId != previousParmId)
# {
# purchTable = purchParmLine.purchTable(true);
#
# if (purchTable)
# {
# select firstonly localPurchLine
# where localPurchLine.PurchId == purchTable.PurchId
# && (localPurchLine.PurchStatus == PurchStatus::None
# || localPurchLine.PurchStatus == PurchStatus::Backorder
# || localPurchLine.PurchStatus == PurchStatus::Received);
#
# if (!localPurchLine && purchTable.validateDelete())
# {
# purchTable.delete();
# }
# }
# }
#
# previousPurchId = purchParmLine.OrigPurchId;
# previousParmId = purchParmLine.ParmId;
#
# if (!recordListPurchParmLine.next(purchParmLine))
# break;
# }
# }
#}
ENDSOURCE
SOURCE #documentStatus
#DocumentStatus documentStatus()
#{
# return DocumentStatus::Invoice;
#}
ENDSOURCE
SOURCE #endUpdate
#void endUpdate()
#{
# SalesFormLetter salesFormLetter;
# ;
#
# // User is not posting
# if ( purchParmUpdate.Proforma )
# {
# ttsbegin;
# purchParmUpdate = PurchParmUpdate::find(purchParmUpdate.ParmId, true);
# purchParmUpdate.delete();
# ttscommit;
# }
# // User is posting
# else
# {
# ttsbegin;
#
# // Delete the PurchParm data for any invoices that were on hold or that failed to post
# // These invoices were saved as pending invoices and should not remain in PurchParmTable
# delete_from purchParmTable
# where purchParmTable.ParmId == purchParmUpdate.ParmId
# && (purchParmTable.Hold == NoYes::Yes
# || purchParmTable.ParmJobStatus == ParmJobStatus::ContainErrors);
#
# // If there were no other invoices, then delete the PurchParmUpdate record
# if (purchParmUpdate.numberOfTables() == 0)
# {
# PurchParmUpdate::deleteWithoutUpdate(purchParmUpdate.ParmId);
# }
# else
# {
# purchParmUpdate = PurchParmUpdate::find(purchParmUpdate.ParmId, true);
#
# purchParmUpdate.StartDateTime = startDateTimeUpdate;
# purchParmUpdate.EndDateTime = DateTimeUtil::newDateTime(systemdateget(),timenow(),DateTimeUtil::getUserPreferredTimeZone());
# purchParmUpdate.update();
# }
#
# ttscommit;
# }
#
# if (! purchParmUpdate.Proforma && this.journalTransList().len())
# {
# if (!this.interCompanyNoSalesFormletterUpdate())
# {
# if (Box::yesNo("@SYS70024", DialogButton::Yes)== DialogButton::Yes)
# {
# salesFormLetter = SalesFormLetter::newFromPurchFormLetter_Invoice(this, DocumentStatus::ProjectPackingSlip);
# salesFormLetter.promptAndRun();
# }
# }
# }
#}
#
ENDSOURCE
SOURCE #existWaitingParmLines
#///
#/// Determines whether there are any lines for a given document already created in the PurchParmLine table.
#///
#///
#/// The ParmId of the document.
#///
#///
#/// The Purchase ID of the document.
#///
#///
#/// The Lot ID for the purchase line to find existing lines for.
#///
#///
#/// true if there are any lines already created for the document in PurchParmLine table; otherwise, false.
#///
#protected boolean existWaitingParmLines(ParmId _parmId, PurchId _purchId, InventTransId _inventTransId)
#{
# return PurchParmLine::existWaitingNotPending(_parmId, _purchId, _inventTransId);
#}
ENDSOURCE
SOURCE #fixedDueDate
#PurchFixedDueDate fixedDueDate(PurchTable _purchTable)
#{
# return _purchTable.FixedDueDate;
#}
#
ENDSOURCE
SOURCE #fixedEuroTriangulation
#protected UnknownNoYes fixedEuroTriangulation()
#{
# if (purchParmTable.FixedExchRate)
# return Currency::noYes2UnknownNoYes(purchParmTable.euroTriangulation);
#
# return super();
#}
ENDSOURCE
SOURCE #fixedExchRate
#protected VendExchRate fixedExchRate()
#{
# if (purchParmTable.FixedExchRate)
# return purchParmTable.ExchRate;
#
# return super();
#}
ENDSOURCE
SOURCE #fixedExchRateSecondary
#protected ExchrateSecondary fixedExchRateSecondary()
#{
# if (purchParmTable.FixedExchRate)
# return purchParmTable.ExchRateSecondary;
#
# return super();
#}
ENDSOURCE
SOURCE #initJournal
#protected void initJournal()
#{
# NumberSequenceTable numberSequenceTable;
# NumberSequenceReference numberSequenceReference;
# PurchLine purchLineLoc;
# boolean onlyServiceItem = true;
# InventTable inventTable;
# ;
#
# if (!voucher && !purchParmUpdate.Proforma && purchParmTable.Hold == NoYes::No)
# {
# throw error("@SYS71652");
# }
#
# vendInvoiceJour.clear();
# if (TaxParameters::find().UnrealizedTax && isConfigurationkeyEnabled(configurationkeynum(CRSEThailand)))
# {
# select firstonly RecId from purchLineLoc
# exists join inventTable
# where purchLineLoc.PurchId == purchTable.PurchId &&
# purchLineLoc.ItemId == inventTable.ItemId &&
# inventTable.ItemType != ItemType::Service;
# if(purchLineLoc.RecId)
# {
# onlyServiceItem = false;
# }
#
# numberSequenceReference = NumberSeqReference::findReference(typeId2ExtendedTypeId(typeid(TaxInvoicePurchId)));
# numberSequenceTable = NumberSequenceTable::find(numberSequenceReference.NumberSequence);
#
# if(onlyServiceItem)
# {
# if(numberSequenceTable.Continuous)
# {
# vendInvoiceJour.initValue();
# }
# }
# else
# {
# if(!numberSequenceTable.Continuous)
# {
# throw error(strfmt("@SYS26207", numberSequenceTable.NumberSequence));
# }
# vendInvoiceJour.initValue();
# }
# }
# else
# {
# vendInvoiceJour.initValue();
# }
#
# vendInvoiceJour.ParmId = purchParmUpdate.ParmId;
# vendInvoiceJour.InvoiceId = purchParmTable.Num;
# vendInvoiceJour.LedgerVoucher = voucher;
#
# vendInvoiceJour.InternalInvoiceId = internalNumber;
# vendInvoiceJour.InvoiceDate = this.invoiceDate();
#
# if (purchParmTable.Hold == NoYes::Yes)
# {
# // Document on hold should always be proforma
# vendInvoiceJour.Proforma = true;
# }
# else
# {
# vendInvoiceJour.Proforma = this.proforma();
# }
#
# vendInvoiceJour.initFromPurchTable(purchTable);
# vendInvoiceJour.initFromPurchParmTable(purchParmTable);
#
# vendInvoiceJour.InterCompanyPosted = this.interCompanyPosted();
#
# //
# if (LedgerParameters::find().EnableZakatReports_SA)
# {
# vendInvoiceJour.ContractNum_SA = purchParmUpdate.ZakatPurchId_SA
# ? PurchTable::find(purchParmUpdate.ZakatPurchId_SA).ContractNum_SA
# : purchTable.ContractNum_SA;
# }
# //
#
# vendInvoiceJour.insert();
#
# purchValueMap = new Map(typeId2Type(typeid(recId)), Types::Real);
#}
#
ENDSOURCE
SOURCE #initJournalLine
#protected void initJournalLine()
#{;
# vendInvoiceTrans.clear();
# vendInvoiceTrans.initValue();
#
# vendInvoiceTrans.initFromVendInvoiceJour(vendInvoiceJour);
# vendInvoiceTrans.initFromPurchLine (purchLine,purchParmLine);
# vendInvoiceTrans.initFromPurchParmLine (purchParmLine);
# vendInvoiceTrans.initFromPurchParmTable (purchParmTable);
# vendInvoiceTrans.setLineNum(sumByLineNum);
# sumByLineNum++;
#
# vendInvoiceTrans.LineAmountMST = vendInvoiceJour.amountMST(vendInvoiceTrans.LineAmount);
# vendInvoiceTrans.insert();
#}
#
ENDSOURCE
SOURCE #initParmDefault
#public void initParmDefault()
#{
# super();
#
# purchParmUpdate.CreditRemaining = true;
#}
ENDSOURCE
SOURCE #initQueryBuild
#protected void initQueryBuild()
#{
# QueryBuildDataSource savedInvoicesDS;
# QueryBuildDataSource savedInvoicesLinesDS;
#
# ;
#
# if (purchParmUpdate.SpecQty == PurchUpdate::PackingSlip)
# {
# chooseLines = new SysQueryRun(querystr(PurchUpdatePackingSlip));
# }
# else
# {
# super();
# }
#
# chooseLinesPendingInvoice = new SysQueryRun(querystr(PurchUpdatePendingInvoice));
# chooseLinesPendingInvoice.query().dataSourceTable(tablenum(VendInvoiceInfoTable)).addSortField(fieldnum(VendInvoiceInfoTable, TableRefId));
# chooseLinesPendingInvoice.query().dataSourceTable(tablenum(VendInvoiceInfoLine)).addSortField(fieldnum(VendInvoiceInfoLine, TableRefId));
#
# // add additional datasources for saved invoices
# savedInvoicesDS = chooseLines.query().addDataSource(tablenum(VendInvoiceInfoTable));
# savedInvoicesDS.addSortField(fieldnum(VendInvoiceInfoTable, RecId));
# savedInvoicesLinesDS = savedInvoicesDS.addDataSource(tablenum(VendInvoiceInfoLine));
# savedInvoicesLinesDS.relations(true);
#
# // add default ranges for saved invoices
# savedInvoicesDS.addRange(fieldnum(VendInvoiceInfoTable, VendInvoiceSaveStatus));
# savedInvoicesLinesDS.addRange(fieldnum(VendInvoiceInfoLine, ItemId));
#}
#
#
ENDSOURCE
SOURCE #initTransactionTxt
#protected TransactionTxt initTransactionTxt(LedgerTransTxt ledgerTransTxt)
#{
# TransactionTxt transactionTxt;
# ;
#
# transactionTxt = new TransactionTxt();
# transactionTxt.setType (ledgerTransTxt);
# transactionTxt.setVoucher (vendInvoiceJour.LedgerVoucher);
# transactionTxt.setFormLetter (vendInvoiceJour.InvoiceId);
# transactionTxt.setKey1 (vendInvoiceJour.PurchId);
# transactionTxt.setKey2 (vendInvoiceJour.InvoiceAccount);
# transactionTxt.setKey3 (VendTable::groupId(vendInvoiceJour.InvoiceAccount));
#
# return transactionTxt;
#}
ENDSOURCE
SOURCE #insertDraft
#///
#/// Inserts a draft copy of the invoice from the current PurchParmTable table.
#///
#///
#/// This method will remove any previously-existing draft invoices before inserting the new copy.
#///
#public void insertDraft()
#{
# PurchParmSubTable localPurchParmSubTable;
# PurchParmLine localPurchParmLine;
# PurchParmSubLine purchParmSubLine;
# VendInvoiceInfoTable vendInvoiceInfoTable;
# VendInvoiceInfoSubTable vendInvoiceInfoSubTable;
# VendInvoiceInfoLine vendInvoiceInfoLine;
#
# Counter counter = 0;
# PurchLine localPurchLine;
# ;
#
# ttsbegin;
#
# // Create invoice line(s)
# while select localPurchParmLine
# where localPurchParmLine.ParmId == purchParmTable.ParmId &&
# localPurchParmLine.TableRefId == purchParmTable.TableRefId
# {
# // Remove any previously saved draft invoices for this invoice line
# if (localPurchParmLine.InvoiceInfoTableRefId != '')
# {
# VendInvoiceInfoTable::deleteTableRefId(localPurchParmLine.InvoiceInfoTableRefId);
# }
#
# // If the PO line still exists, create draft copy of invoice line
# if (localPurchParmLine.purchLine(false).RecId != 0)
# {
# counter++;
#
# vendInvoiceInfoLine = VendInvoiceInfoLine::createFromPurchParmLine(localPurchParmLine);
#
# Markup::copy(NoYes::No, localPurchParmLine, vendInvoiceInfoLine, true);
#
# if (purchParmTable.VarianceApproved == NoYes::Yes)
# {
# VendInvoiceMatchingLine::copy(localPurchParmLine.TableId,localPurchParmLine.RecId,vendInvoiceInfoLine.TableId,
# vendInvoiceInfoLine.RecId);
# }
#
# // Loop through PurchParmSubLine records for each line and copy to VendInvoiceInfoSubLine
# while select purchParmSubLine
# where purchParmSubLine.LineRefRecId == localPurchParmLine.RecId
# {
# VendInvoiceInfoSubLine::createFromPurchParmSubLine(purchParmSubLine, vendInvoiceInfoLine.RecId);
# }
#
# // Create the linked asset line
# VendInvoiceInfoLine_Asset::createFromPurchParmLine_Asset(vendInvoiceInfoLine, localPurchParmLine.purchParmLine_Asset());
# }
# }
#
# // Create invoice sub table record(s) if lines still exist
# while select localPurchParmSubTable
# where localPurchParmSubTable.ParmId == purchParmTable.ParmId &&
# localPurchParmSubTable.TableRefId == purchParmTable.TableRefId
# exists join vendInvoiceInfoLine
# where vendInvoiceInfoLine.OrigPurchId == localPurchParmSubTable.OrigPurchId &&
# vendInvoiceInfoLine.TableRefId == localPurchParmSubTable.TableRefId
# {
# vendInvoiceInfoSubTable = VendInvoiceInfoSubTable::createFromPurchParmSubTable(localPurchParmSubTable);
# counter += Markup::copy(NoYes::No, localPurchParmSubTable, vendInvoiceInfoSubTable, true, purchParmTable.CurrencyCode);
# }
#
# // If there are no lines or MarkupTrans, try to delete the old invoice using the header's TableRefId
# // Note: This is only needed if the Invoice did not go through summary update/arrange (where it receives a new TableRefId)
# if (counter == 0)
# {
# VendInvoiceInfoTable::deleteTableRefId(purchParmTable.TableRefId);
# }
# // There are lines - create invoice header
# else
# {
# vendInvoiceInfoTable = VendInvoiceInfoTable::createFromPurchParmTable(purchParmTable);
#
# Markup::copy(NoYes::No, purchParmTable, vendInvoiceInfoTable, true);
# TaxWorkRegulation::move(purchParmTable, vendInvoiceInfoTable);
# }
#
# // Set the PO Line's ReceiveNow quantity back to zero
# update_recordset localPurchLine
# setting PurchReceivedNow = 0.0
# exists join vendInvoiceInfoLine
# where localPurchLine.InventTransId == vendInvoiceInfoLine.InventTransId &&
# vendInvoiceInfoLine.TableRefId == purchParmTable.TableRefId;
#
#
# ttscommit;
#}
#
ENDSOURCE
SOURCE #InsertPurchParmSubLine
#protected void insertPurchParmSubLine(PurchParmSubLine _purchParmSubLine)
#{;
# recordInsertPurchParmSubLine.add(_purchParmSubLine);
#}
ENDSOURCE
SOURCE #insertVendInvoiceMatchingLine
#///
#/// Creates a VendInvoiceMatchingLine table record from either a PurchLine table record or a previously saved VendInvoiceMatchingLine table record.
#///
#///
#/// A PurchParmLine table record the new VendInvoiceMatchingLine will be associated with.
#///
#///
#/// The RecId of the PurchLine table record where the expected values will be found.
#///
#///
#/// The PurchLine table record where the expected values will be found.
#///
#///
#/// NoYes::Yes if the invoice has been approved to post with variances; otherwise, NoYes::No.
#///
#///
#/// A VendInvoiceInfoLine table record where the expected values will be found when retrieving a pending invoice.
#///
#///
#/// This method is only to be used to attach a VendInvoiceMatchingLine table record to a PurchParmLine table record.
#///
#protected void insertVendInvoiceMatchingLine(PurchParmLine _purchParmLine,
# PurchLineRefRecId _purchLineRecId,
# PurchLine _purchLine = null,
# NoYes _varianceApproved = NoYes::No,
# VendInvoiceInfoLine _srcVendInvoiceInfoLine = null)
#{
# VendInvoiceMatchingLine vendInvoiceMatchingLine,destVendInvoiceMatchingLine;
# PurchLine localpurchLine;
# ;
#
# if ((_purchParmLine.TableId !=0) && (_purchParmLine.RecId !=0) && (_purchLineRecId !=0))
# {
# if ( VendParameters::find(false).useInvoiceMatching(false) == NoYes::Yes)
# {
# if(_varianceApproved == NoYes::No)
# {
# // Unapproved Variance refresh the expected values.
# if (_purchLine.RecId == 0)
# {
# localpurchLine = PurchLine::findRecId(_purchLineRecId);
# }
# else
# {
# localpurchLine = _purchLine.data();
# }
#
# if (localpurchLine.RecId != 0)
# {
# vendInvoiceMatchingLine.clear();
# vendInvoiceMatchingLine.initExpectedValues(localpurchLine);
# vendInvoiceMatchingLine.RefTableId = _purchParmLine.TableId;
# vendInvoiceMatchingLine.RefRecId = _purchParmLine.RecId;
# recordInsertVendInvoiceMatchingLine.add(vendInvoiceMatchingLine);
# }
# }
# else
# {
# // Variance is approved, make a clone of the VIML attached to the VendInvoiceInfoLine and attach it to the destination PurchParmLine.
#
# vendInvoiceMatchingLine = VendInvoiceMatchingLine::find(_srcVendInvoiceInfoLine.TableId,_srcVendInvoiceInfoLine.RecId,false);
# if (vendInvoiceMatchingLine.RecId != 0)
# {
# destVendInvoiceMatchingLine = vendInvoiceMatchingLine.data();
# destVendInvoiceMatchingLine.RefTableId = _purchParmLine.TableId;
# destVendInvoiceMatchingLine.RefRecId = _purchParmLine.RecId;
# recordInsertVendInvoiceMatchingLine.add(destVendInvoiceMatchingLine);
# }
# }
# }
# }
#}
#
#
#
ENDSOURCE
SOURCE #interCompanyInitQueryBuild
#public void interCompanyInitQueryBuild()
#{;
# this.initQueryBuild();
#}
ENDSOURCE
SOURCE #interCompanyInvoiceNum
#protected Num interCompanyInvoiceNum(PurchTable _purchTable)
#{
# ;
# if (_purchTable.isInterCompanyOrder())
# {
# changecompany(_purchTable.InterCompanyCompanyId)
# {
# return _purchTable.interCompanySalesTable().lastInvoice();
# }
# }
# return super(_purchTable);
#}
ENDSOURCE
SOURCE #interCompanyMarkupAllocation
#protected void interCompanyMarkupAllocation()
#{
# MapEnumerator mapPurchTableEnumerator;
# PurchTable localPurchTable;
# ;
# if(interCompanyMap)
# {
# mapPurchTableEnumerator = interCompanyMap.getEnumerator();
# while(mapPurchTableEnumerator.moveNext())
# {
# localPurchTable = mapPurchTableEnumerator.currentValue();
# if(localPurchTable.isInterCompanyOrder() && localPurchTable.InterCompanyDirectDelivery)
# {
# this.interCompanyMarkupAllocationForPOByInv(localPurchTable, this.sumNum());
# }
# }
# }
#
#}
ENDSOURCE
SOURCE #interCompanyMarkupAllocationForDDPO
#protected void interCompanyMarkupAllocationForDDPO(PurchTable _purchTable)
#{
# MarkupTrans localMarkupTrans;
# ;
# super(_purchTable);
#
# if(_purchTable.isInterCompanyOrder() && _purchTable.isDirectDeliveryOrder())
# {
# while select InterCompanyInvoiceId
# from localMarkupTrans
# where
# localMarkupTrans.TransTableId == _purchTable.TableId &&
# localMarkupTrans.TransRecId == _purchTable.RecId &&
# localMarkupTrans.InterCompanyInvoiceId
# {
# this.interCompanyMarkupAllocationForPOByInv(_purchTable, localMarkupTrans.InterCompanyInvoiceId);
# }
# }
#}
ENDSOURCE
SOURCE #interCompanyMarkupAllocationForPObyInv
#protected void interCompanyMarkupAllocationForPOByInv(PurchTable _purchTable, InvoiceId _invoiceId)
#{
# MarkupAllocation markupAllocation;
# ;
# super(_purchTable, _invoiceId);
#
# markupAllocation = MarkupAllocation::construct(_purchTable);
# markupAllocation.parmAllocateAfter(_purchTable.interCompanyEndpointActionPolicy().MarkupAllocateAfter);
# markupAllocation.parmAllocateOnlyReceived(true);
# markupAllocation.parmInterCompanyCompanyId(_purchTable.InterCompanyCompanyId);
# markupAllocation.parmInterCompanyInvoiceId(_invoiceId);
# markupAllocation.parmInterCompanyInvoiceDate(this.transDate());
# markupAllocation.parmInterCompanyDirectDelivery(_purchTable.InterCompanyDirectDelivery);
# markupAllocation.run();
#}
ENDSOURCE
SOURCE #interCompanyParmLineQty
#Qty interCompanyParmLineQty(Common _common, boolean _isInventQty = false)
#{
# PurchLine purchLineLocal = _common;
# CustInvoiceTrans custInvoiceTrans;
# CustInvoiceJour custInvoiceJour;
#;
# if (interCompanyCompanyId)
# {
# changecompany(interCompanyCompanyId)
# {
# select forceplaceholders InventQty, Qty from custInvoiceTrans
# where custInvoiceTrans.InventTransId == purchLineLocal.InterCompanyInventTransId
# exists join custInvoiceJour
# where custInvoiceJour.InvoiceId == custInvoiceTrans.InvoiceId
# && custInvoiceJour.InvoiceDate == custInvoiceTrans.InvoiceDate
# && custInvoiceJour.NumberSequenceGroup == custInvoiceTrans.NumberSequenceGroup
# && custInvoiceJour.SalesId == custInvoiceTrans.SalesId
# && custInvoiceJour.ParmId == interCompanyParmId
# && custInvoiceJour.InvoiceId == number;
# }
# }
# else
# {
# select forceplaceholders InventQty, Qty from custInvoiceTrans
# where custInvoiceTrans.InventTransId == purchLineLocal.InventRefTransId
# exists join custInvoiceJour
# where custInvoiceJour.InvoiceId == custInvoiceTrans.InvoiceId
# && custInvoiceJour.InvoiceDate == custInvoiceTrans.InvoiceDate
# && custInvoiceJour.NumberSequenceGroup == custInvoiceTrans.NumberSequenceGroup
# && custInvoiceJour.SalesId == custInvoiceTrans.SalesId
# && custInvoiceJour.ParmId == interCompanyParmId
# && custInvoiceJour.InvoiceId == number;
# }
#
# return _isInventQty ? custInvoiceTrans.InventQty : custInvoiceTrans.Qty;
#}
#
ENDSOURCE
SOURCE #interCompanyPost
#void interCompanyPost()
#{;
# if (vendInvoiceJour.interCompanyDoInternalPosting()
# || (vendInvoiceJour.InterCompanyCompanyId && vendInvoiceJour.interCompanyDoExternalPosting()))
# {
# InterCompanyPostSales::post(this,vendInvoiceJour,journalList);
# }
#}
#
ENDSOURCE
SOURCE #invoiceAccountInQuery
#boolean invoiceAccountInQuery()
#{
# return true;
#}
ENDSOURCE
SOURCE #invoiceDate
#TransDate invoiceDate()
#{
# return this.updateDate();
#}
#
ENDSOURCE
SOURCE #journal
#VendInvoiceJour journal()
#{
# return vendInvoiceJour;
#}
ENDSOURCE
SOURCE #mayJournalBePosted
#public boolean mayJournalBePosted(PurchTable _purchTable)
#{
# boolean ok = super(_purchTable);
# ;
#
# if (ok)
# {
# ok = _purchTable.mayInvoiceBeUpdated();
# }
#
# return ok;
#}
#
ENDSOURCE
SOURCE #maySelectPO
#///
#/// Determines if a PurchTable table record may be selected for invoicing.
#///
#///
#/// A PurchTable table record.
#///
#///
#/// true if the PurchTable table record may be selected for invoicing; otherwise, false.
#///
#///
#/// The PurchTable table record is checked to determine whether it has any MarkupTrans table records with a MarkupType enumerated value of MarkupType::Item.
#/// A PurchTable table record with such MarkupTrans table records must not be selected for invoicing.
#///
#protected boolean maySelectPO(PurchTable _purchTable)
#{
# ;
# if(Markup::hasMarkupTypeItem(_purchTable) && !(_purchTable.isInterCompanyOrder() && _purchTable.isDirectDeliveryOrder()))
# {
# info("@SYS115806");
# return false;
# }
# else
# {
# return true;
# }
#}
ENDSOURCE
SOURCE #missingNumber
#str missingNumber()
#{
# return "@SYS23051";
#}
ENDSOURCE
SOURCE #moveTaxRegulations
#protected void moveTaxRegulations()
#{
# TaxWorkRegulation taxWorkRegulation;
# PurchParmTable localPurchParmTable;
# PurchTable localPurchTable;
# ;
#
# ttsbegin;
# update_recordset taxWorkRegulation
# setting headingTableId = localPurchParmTable.TableId,
# headingRecId = localPurchParmTable.RecId
# join localPurchTable
# where taxWorkRegulation.HeadingTableId == localPurchTable.TableId &&
# taxWorkRegulation.HeadingRecId == localPurchTable.RecId
# join localPurchParmTable
# where localPurchParmTable.ParmId == this.parmId() &&
# localPurchParmTable.PurchId == localPurchTable.PurchId;
# ttscommit;
#}
ENDSOURCE
SOURCE #needVarianceApproval
#///
#/// Determines if the PurchParmTable table record proved needs variance approval.
#///
#///
#/// The record to be checked.
#///
#///
#/// true if the provided record allows variance approval, otherwise false.
#///
#boolean needVarianceApproval(PurchParmTable _purchParmTable)
#{
# return _purchParmTable.VarianceApproved == NoYes::No;
#}
#
ENDSOURCE
SOURCE #newJournalList
#///
#/// Constructs a record sorted list.
#///
#///
#/// A new record sorted list.
#///
#///
#/// The record sorted list is used by reports, where the report prints the invoice posted purchase orders that are in the record sorted list.
#///
#public RecordSortedList newJournalList()
#{
# RecordSortedList recordSortedList;
# ;
#
# recordSortedList = new RecordSortedList(tablenum(VendInvoiceJour));
# recordSortedList.sortOrderFromContainer(this.formLetterSorting(tablenum(VendInvoiceJour), fieldnum(VendInvoiceJour, RecId)));
#
# return recordSortedList;
#}
#
ENDSOURCE
SOURCE #newJournalTransList
#void newJournalTransList()
#{
# ;
# journalTransList = new RecordSortedList(tablenum(VendInvoiceTrans));
# journalTransList.sortOrder(fieldnum(VendInvoiceTrans, RecId));
#
#}
#
ENDSOURCE
SOURCE #pack
#container pack()
#{
# return [#CurrentVersion+#ParentVersion,#ParmList,#ParmListCommonCS];
#}
#
ENDSOURCE
SOURCE #parmSaveChanges
#boolean parmSaveChanges(boolean _saveChanges = saveChanges)
#{
# ;
# saveChanges = _saveChanges;
# return saveChanges;
#}
ENDSOURCE
SOURCE #paymentId
#PaymId paymentId(PurchTable _purchTable = null)
#{
# ;
#
# if (!_purchTable)
# return super();
#
# return VendTable::find(_purchTable.InvoiceAccount).PaymId;
#}
ENDSOURCE
SOURCE #paymMode
#VendPaymMode paymMode(PurchTable _purchTable)
#{
# return _purchTable.PaymMode;
#}
ENDSOURCE
SOURCE #paymSpec
#VendPaymSpec paymSpec(PurchTable _purchTable)
#{
# return _purchTable.PaymSpec;
#}
ENDSOURCE
SOURCE #postEndDisc
#void postEndDisc()
#{
# TransactionTxt transactionTxt;
# LedgerVoucherTransObject ledgerVoucherTransObject;
# ;
# if (vendInvoiceJour.EndDisc)
# {
# transactionTxt = new TransactionTxt();
# transactionTxt.setType (LedgerTransTxt::PurchEndDisc);
# transactionTxt.setVoucher (vendInvoiceJour.LedgerVoucher);
# transactionTxt.setFormLetter (vendInvoiceJour.InvoiceId);
# transactionTxt.setKey1 (vendInvoiceJour.PurchId);
# transactionTxt.setKey2 (vendInvoiceJour.InvoiceAccount);
# transactionTxt.setKey3 (VendTable::groupId(vendInvoiceJour.InvoiceAccount));
#
# ledgerVoucherTransObject = LedgerVoucherTransObject::newCreateTrans(
# ledgerVoucher.findLedgerVoucherObject(),
# LedgerPostingType::VendInvoiceDisc,
# LedgerSystemAccounts::accountNum(LedgerPostingType::VendInvoiceDisc),
# vendInvoiceJour.Dimension,
# vendInvoiceJour.CurrencyCode,
# -vendInvoiceJour.EndDisc,
# vendInvoiceJour.TableId,
# vendInvoiceJour.RecId,
# 0,
# vendInvoiceJour.ExchRate,
# vendInvoiceJour.ExchRateSecondary,
# Currency::noYes2UnknownNoYes(vendInvoiceJour.Triangulation));
# ledgerVoucherTransObject.parmTransTxt(transactionTxt.txt());
#
# ledgerVoucher.addTrans(ledgerVoucherTransObject);
# }
#}
ENDSOURCE
SOURCE #postInvoiceRoundOff
#void postInvoiceRoundOff()
#{
# TransactionTxt transactionTxt;
# LedgerVoucherTransObject ledgerVoucherTransObject;
# ;
# if (vendInvoiceJour.InvoiceRoundOff)
# {
# transactionTxt = new TransactionTxt();
# transactionTxt.setType (LedgerTransTxt::VendRoundOff);
# transactionTxt.setVoucher (vendInvoiceJour.LedgerVoucher);
# transactionTxt.setFormLetter (vendInvoiceJour.InvoiceId);
# transactionTxt.setKey1 (vendInvoiceJour.PurchId);
# transactionTxt.setKey2 (vendInvoiceJour.InvoiceAccount);
# transactionTxt.setKey3 (VendTable::groupId(vendInvoiceJour.InvoiceAccount));
#
# ledgerVoucherTransObject = LedgerVoucherTransObject::newCreateTrans(
# ledgerVoucher.findLedgerVoucherObject(),
# LedgerPostingType::PurchaseInvoiceRoundOff,
# LedgerSystemAccounts::accountNum(LedgerPostingType::PurchaseInvoiceRoundOff),
# vendInvoiceJour.Dimension,
# vendInvoiceJour.CurrencyCode,
# vendInvoiceJour.InvoiceRoundOff,
# vendInvoiceJour.TableId,
# vendInvoiceJour.RecId,
# 0,
# vendInvoiceJour.ExchRate,
# vendInvoiceJour.ExchRateSecondary,
# Currency::noYes2UnknownNoYes(vendInvoiceJour.Triangulation));
#
# ledgerVoucherTransObject.parmTransTxt(transactionTxt.txt());
# ledgerVoucher.addTrans(ledgerVoucherTransObject);
# }
#}
ENDSOURCE
SOURCE #postMarkupOnJour
#protected void postMarkupOnJour(PurchTable _purchTableMarkup)
#{;
# throw error(Error::wrongUseOfFunction(funcname()));
#}
ENDSOURCE
SOURCE #postMarkupOnParmSubTable
#///
#/// Posts MarkupTrans table records associated with a PurchParmSubTable table record.
#///
#///
#/// A PurchParmSubTable table record.
#///
#protected void postMarkupOnParmSubTable(PurchParmSubTable _purchParmSubTable)
#{
# PurchTable purchTableMarkup = _purchParmSubTable ? _purchParmSubTable.purchTable() : null;
# ;
# if(purchTableMarkup)
# {
# markup.postInvoice(
# 1,
# purchTotals.purchOrderBalance(purchTableMarkup.RecId),
# _purchParmSubTable,
# ledgerVoucher,
# purchTableMarkup.Dimension,
# vendInvoiceJour,
# 0,
# purchTableMarkup.isInterCompanyOrder() ? purchParmTable.Num : ''
# );
# }
#}
ENDSOURCE
SOURCE #postMarkupOnParmTable
#///
#/// Posts MarkupTrans table records associated with the current PurchParmTable table record.
#///
#protected void postMarkupOnParmTable()
#{
# PurchTable purchTableMarkup = purchParmTable.purchTable();
# ;
# if(purchTableMarkup)
# {
# markup.postInvoice(
# 1,
# purchTotals.purchBalance(),
# purchParmTable,
# ledgerVoucher,
# purchTableMarkup.Dimension,
# vendInvoiceJour,
# 0,
# purchTableMarkup.isInterCompanyOrder() ? purchParmTable.Num : ''
# );
# }
#}
ENDSOURCE
SOURCE #postMarkupOnTrans
#protected void postMarkupOnTrans()
#{
# ;
# markup.postInvoice(
# purchParmLine.ReceiveNow,
# purchParmLine.lineAmountExclTax(vendInvoiceJour.InvoiceDate),
# purchParmLine,
# ledgerVoucher,
# purchLine.Dimension,
# vendInvoiceTrans,
# purchLine.interCompanyLineAmount(purchParmLine.ReceiveNow,vendInvoiceJour.InvoiceDate),
# purchLine.purchTable().isInterCompanyOrder() ? purchParmTable.Num : ''
# );
#}
ENDSOURCE
SOURCE #postMarkupTable
#///
#/// Posts MarkupTrans table records associated with PurchParmTable and PurchParmSubTable table records.
#///
#protected void postMarkupTable()
#{
# QueryRun queryRun = new QueryRun(purchParmTable.queryPurchParmSubTable());
# ;
# while(queryRun.next())
# {
# if(queryRun.changed(tablenum(PurchParmSubTable)))
# {
# this.postMarkupOnParmSubTable(queryRun.get(tablenum(PurchParmSubTable)));
# }
# }
# this.postMarkupOnParmTable();
#}
ENDSOURCE
SOURCE #postPurgeLedgerAccount
#void postPurgeLedgerAccount(LedgerVoucher _ledgerVoucher,
# AmountCur amountCur,
# PurchParmTable _purchParmTable)
#{
#}
ENDSOURCE
SOURCE #postUpdate
#void postUpdate()
#{
# super();
#
# this.deleteFullyInvoiced();
#}
ENDSOURCE
SOURCE #printJournal
#void printJournal()
#{
# ;
# if (journalList.len() > 0)
# {
# if (printFormletter)
# vendInvoiceJour.printJournal(this, journalList);
#
# if (printEuVatInvoice)
# vendInvoiceJour.printEUVatInvoice(this, journalList);
#
# if (purchParmUpdate.Proforma || purchParmTable.Hold == NoYes::Yes)
# this.removeProforma();
# }
#}
ENDSOURCE
SOURCE #printMgmtDocumentType
#///
#/// Identifies the print management document type.
#///
#///
#/// The print management document type for purchase order invoice.
#///
#protected PrintMgmtDocumentType printMgmtDocumentType()
#{
# return PrintMgmtDocumentType::PurchaseOrderInvoice;
#}
ENDSOURCE
SOURCE #qtyInvent
#container qtyInvent(PurchLine _purchLine, InventQty _qty)
#{
# if (purchParmUpdate.SpecQty == PurchUpdate::PackingSlip)
# {
# _qty = newPostingInventQty;
# }
# return super(_purchLine, _qty);
#}
#
ENDSOURCE
SOURCE #qtyPurch
#container qtyPurch(PurchLine _purchLine, PurchQty _qty, PurchUpdate _specQty = purchParmUpdate.SpecQty)
#{
# if (_specQty == PurchUpdate::PackingSlip)
# {
# _qty = newPostingPurchQty;
# }
# return super(_purchLine, _qty, _specQty);
#}
#
ENDSOURCE
SOURCE #queryChooseLinesPendingInvoice
#///
#/// Gets or sets the query used against the VendInvoiceInfoTable to select the lines to copy to the PurchParmTable.
#///
#///
#/// When setting, the QueryRun to store.
#///
#///
#/// The QueryRun used to select the lines to copy from the pending invoice.
#///
#public QueryRun queryChooseLinesPendingInvoice(QueryRun _chooseLinesPendingInvoice = chooseLinesPendingInvoice)
#{
# chooseLinesPendingInvoice = _chooseLinesPendingInvoice;
# return chooseLinesPendingInvoice;
#}
ENDSOURCE
SOURCE #reArrangeValidate
#protected boolean reArrangeValidate(boolean _logErrors = false)
#{
# return this.checkTaxWorkRegulation(_logErrors);
#}
ENDSOURCE
SOURCE #recommendedSpecQty
#public PurchUpdate recommendedSpecQty()
#{
# return PurchUpdate::PackingSlip;
#}
ENDSOURCE
SOURCE #recopyMarkupFromPurchTable
#protected boolean recopyMarkupFromPurchTable(PurchTable _purchTable, PurchParmSubTable _purchParmSubTable)
#{
# MarkupTrans markupTrans;
# MarkupTable markupTable;
# ;
# Markup::recopyFromPurchOrder(_purchTable, _purchParmSubTable, currentInterCompanyInvoiceNum, _purchTable.CurrencyCode);
# select firstonly RecId
# from markupTrans
# where markupTrans.TransTableId == _purchParmSubTable.TableId &&
# markupTrans.TransRecId == _purchParmSubTable.RecId
# exists join markupTable
# where markupTable.ModuleType == markupTrans.ModuleType &&
# markupTable.MarkupCode == markupTrans.MarkupCode &&
# (markupTable.CustType == MarkupType::Item || markupTable.VendType == MarkupType::Item);
# return !markupTrans.RecId;
#}
ENDSOURCE
SOURCE #reCopyPurchMarkupTrans
#protected void recopyPurchMarkupTrans(PurchParmTable _purchParmTable)
#{
# PurchParmSubTable localPurchParmSubTable;
# PurchParmLine localPurchParmLine;
# PurchTable localPurchTable;
# PurchLine localPurchLine;
# RefRecId lastPurchTableRecId = 0;
# ;
# ttsbegin;
# // Recreate lines for documents that do not have a status of pending
# while select localPurchParmLine
# order by
# localPurchParmLine.OrigPurchId
# where localPurchParmLine.ParmId == _purchParmTable.ParmId &&
# localPurchParmLine.TableRefId == _purchParmTable.TableRefId
# join localPurchLine
# where localPurchLine.PurchId == localPurchParmLine.OrigPurchId &&
# localPurchLine.LineNum == localPurchParmLine.LineNum
# join localPurchParmSubTable
# where localPurchParmSubTable.ParmId == localPurchParmLine.ParmId &&
# localPurchParmSubTable.TableRefId == localPurchParmLine.TableRefId
# join localPurchTable
# where localPurchTable.PurchId == localPurchParmLine.OrigPurchId
# {
# if(lastPurchTableRecId != localPurchTable.RecId)
# {
# Markup::recopyFromPurchOrder(localPurchTable, localPurchParmSubTable, _purchParmTable.Num, localPurchTable.CurrencyCode);
# lastPurchTableRecId = localPurchTable.RecId;
# }
# Markup::recopyFromPurchOrder(localPurchLine, localPurchParmLine, _purchParmTable.Num);
# }
# ttscommit;
#}
ENDSOURCE
SOURCE #recordInsertListInit
#protected void recordInsertListInit()
#{
# super();
# recordInsertPurchParmSubLine = new RecordInsertList(tablenum(PurchParmSubLine));
# recordInsertVendInvoiceMatchingLine = new RecordInsertList(tablenum(VendInvoiceMatchingLine));
#}
ENDSOURCE
SOURCE #recordInsertListInsert
#protected void recordInsertListInsert()
#{
# super();
# recordInsertPurchParmSubLine.insertDatabase();
# recordInsertVendInvoiceMatchingLine.insertDatabase();
#
#}
ENDSOURCE
SOURCE #removeJournalFromList
#void removeJournalFromList()
#{
# journalList.del(vendInvoiceJour);
#}
#
ENDSOURCE
SOURCE #removeProforma
#void removeProforma()
#{
# VendInvoiceJour proformaJour;
# ;
#
# ttsbegin;
#
# proformaJour.clear();
#
# journalList.first(proformaJour);
#
# while (proformaJour)
# {
# proformaJour = VendInvoiceJour::findRecId(proformaJour.RecId, true);
#
# proformaJour.delete();
#
# if (!journalList.next(proformaJour))
# break;
# }
#
# ttscommit;
#}
ENDSOURCE
SOURCE #removeSavedDocumentWithNoLines
#///
#/// Removes any saved documents that have no lines.
#///
#///
#/// The group of invoices being posted.
#///
#void removeSavedDocumentWithNoLines(ParmId _parmId)
#{
# PurchParmTable localPurchParmTable;
# PurchParmLine localPurchParmLine;
# VendInvoiceInfoTable localVendInvoiceInfoTable;
# ;
#
# while select localPurchParmTable
# where localPurchParmTable.ParmId == _parmId
# notexists join localPurchParmLine
# where localPurchParmLine.ParmId == localPurchParmTable.ParmId
# && localPurchParmLine.TableRefId == localPurchParmTable.TableRefId
# {
# delete_from localVendInvoiceInfoTable where localVendInvoiceInfoTable.TableRefId == localPurchParmTable.TableRefId;
# }
#}
#
ENDSOURCE
SOURCE #reSelect
#void reSelect(PurchUpdate _purchUpdate,
# NoYes _creditRemaining)
#{
# PurchUpdate _orgPurchUpdate = purchParmUpdate.SpecQty;
# PurchParmTable _purchParmTable;
# PurchParmSubTable _purchParmSubTable;
# PurchLine _purchLine,prevPurchLine;
# InventTrans _inventTrans;
# PurchTable _purchTable;
# Map map = new Map(typeId2Type(typeid(recId)), Types::Record);
# VendPackingSlipTrans vendPackingSlipTrans;
# TradeLineRefId tableRefId;
#
# container packedFormLetterClass;
# ;
#
# //If running on the client, execute reSelect method on the server side to reduce the interaction between tiers
# if (!this.objectOnServer())
# {
# packedFormLetterClass = PurchFormLetter::execReSelectOnServer(this.documentStatus(), this.parmId(), this.pack(),
# _purchUpdate, _creditRemaining);
# this.unpack(packedFormLetterClass);
# return;
# }
#
# purchParmUpdate.SpecQty = _purchUpdate;
# purchParmUpdate.CreditRemaining = _creditRemaining;
#
# if (_orgPurchUpdate == _purchUpdate)
# {//DO Nothing
# return;
# }
#
# ttsbegin;
# if (_purchUpdate == PurchUpdate::PackingSlip)
# {
# this.recordInsertListInit();
# // Recreate lines for documents that do not have a status of pending
# while select forupdate forceplaceholders _purchParmTable
# where _purchParmTable.ParmId == purchParmUpdate.ParmId
# && _purchParmTable.VendInvoiceSaveStatus != VendInvoiceSaveStatus::Pending
# join _purchParmSubTable
# where _purchParmSubTable.ParmId == _purchParmTable.ParmId
# && _purchParmSubTable.TableRefId == _purchParmTable.TableRefId
# join _purchTable
# where _purchTable.PurchId == _purchParmSubTable.OrigPurchId
# {
# PurchParmLine::deleteFromPurchParmSubTable(_purchParmSubTable);
# tableRefId = _purchParmTable.TableRefId;
#
# setprefix(strfmt("@SYS76498", "@SYS15812", _purchTable.PurchId));
# currentInterCompanyInvoiceNum = this.interCompanyInvoiceNum(_purchTable);
# if(!this.recopyMarkupFromPurchTable(_purchTable, _purchParmSubTable))
# {
# // Recopy failed, so delete the entire invoice
# error("@SYS115806");
# _purchParmTable.delete();
# continue;
# }
#
# while select _purchLine
# where _purchLine.PurchId == _purchParmSubTable.OrigPurchId
# && _purchLine.Blocked == NoYes::No
# join InventTransId, PackingSlipId from _inventTrans
# where _inventTrans.InventTransId == _purchLine.InventTransId &&
# ((_inventTrans.StatusReceipt == StatusReceipt::Received &&
# _inventTrans.StatusIssue == StatusIssue::None) ||
# (_inventTrans.StatusReceipt == StatusReceipt::None &&
# _inventTrans.StatusIssue == StatusIssue::Deducted))
# {
# if (_purchLine.RecId != prevPurchLine.RecId)
# {
# if (map.elements() > 0)
# {
# this.createParmLineAndSubLines(prevPurchLine,map.pack(),_purchParmTable.TableRefId);
# }
# prevPurchLine = _purchLine.data();
# map = new Map(typeId2Type(typeid(recId)), Types::Record);
# }
#
# while select vendPackingSlipTrans
# where vendPackingSlipTrans.InventTransId == _inventTrans.InventTransId &&
# vendPackingSlipTrans.PackingSlipId == _inventTrans.PackingSlipId
# {
# map.insert(vendPackingSlipTrans.RecId, vendPackingSlipTrans);
# }
# }
#
# if (prevPurchLine.RecId && map.elements() > 0)
# {
# this.createParmLineAndSubLines(prevPurchLine,map.pack(),tableRefId);
# prevPurchLine = null;
# }
# }
# this.recordInsertListInsert();
# }
# else
# {
# super(_purchUpdate, _creditRemaining);
# }
#
# // Always unapprove the variance on any reselect regardless if anything changed. Method forces update.
# while select forupdate _purchParmTable where _purchParmTable.ParmId == purchParmUpdate.ParmId
# {
# _purchParmTable.approveVariance(false, true);
# }
# ttscommit;
#}
#
ENDSOURCE
SOURCE #reversePostedTax
#TaxAmountCur reversePostedTax(LedgerVoucher _ledgerVoucher,
# PurchParmTable _purchParmTable)
#{
# return 0;
#}
ENDSOURCE
SOURCE #run
#public void run()
#{
# ;
# super();
#}
ENDSOURCE
SOURCE #selectFromJournal
#public void selectFromJournal(container _packedTmpFrmVirtualList)
#{
# List tmpFrmVirtualList = List::create(_packedTmpFrmVirtualList);
# ListEnumerator enumerator = tmpFrmVirtualList.getEnumerator();
#
# VendPackingSlipJour vendPackingSlipJour;
# VendPackingSlipJour tmpVendPackingSlipJour;
# VendPackingSlipTrans vendPackingSlipTrans;
# InventTrans inventTrans;
# TmpFrmVirtual tmpFrmVirtual;
#
# PurchParmTable _purchParmTable;
# TradeLineRefId tableRef;
#
# PurchLine localPurchLine;
# PurchTable localPurchTable;
# VendInvoiceInfoTable vendInvoiceInfoTable;
# VendInvoiceInfoLine vendInvoiceInfoLine;
# VendInvoiceInfoSubLine vendInvoiceInfoSubLine;
# PurchParmLine localpurchParmLine;
#
# Map purchLinePackingSlipLineMap;
# Map allowPostingMap = new Map(Types::String, Types::Enum);
# Map purchIdLinesMap = new Map(Types::String, Types::Container);
# Map packingSlipLineMap = new Map(typeId2Type(typeid(recId)),Types::Record);
# Map vendPackingSlipTransRecIdTableRefIdMap = new Map(Types::Int64,Types::String);
# MapEnumerator me, lineEnumerator;
# Map vendInvoiceInfoTableMap = new Map(Types::Record, Types::Container);
# Set vendPackingSlipTransSet;
#
# void createParmTable()
# {
# if (this.allowCreateParmTable())
# {
# _purchParmTable.clear();
# _purchParmTable.TableRefId = tableRef;
#
# this.createParmTable(_purchParmTable,
# localPurchTable);
#
# _purchParmTable.initTotals();
# this.insertPurchParmTable(_purchParmTable);
# this.syncToNewInvoice(_purchParmTable, currentInterCompanyInvoiceNum);
# this.allowCreateParmTable(this.allowEmptyTable());
# }
# }
# ;
#
# // cache off all the saved pending documents about to be deleted so that we can restore later if needed.
# while select RecId from vendPackingSlipTrans
# join InvoiceInfoTableRefId from localpurchParmLine
# exists join vendInvoiceInfoLine
# exists join vendInvoiceInfoSubLine
# where
# localpurchParmLine.ParmId == purchParmUpdate.ParmId &&
# vendInvoiceInfoLine.TableRefId == localpurchParmLine.InvoiceInfoTableRefId &&
# vendInvoiceInfoLine.InventTransId == localpurchParmLine.InventTransId &&
# vendInvoiceInfoSubLine.LineRefRecId == vendInvoiceInfoLine.RecId &&
# vendPackingSlipTrans.RecId == vendInvoiceInfoSubLine.JournalRefRecId &&
# vendPackingSlipTrans.TableId == vendInvoiceInfoSubLine.JournalRefTableId
# {
# vendPackingSlipTransRecIdTableRefIdMap.insert(vendPackingSlipTrans.RecId,localpurchParmLine.InvoiceInfoTableRefId);
# }
#
# this.recordInsertListInit();
# ttsbegin;
#
# while (enumerator.moveNext())
# {
# tmpFrmVirtual.data(enumerator.current());
# tmpFrmVirtual.insert();
# }
#
# //BP Deviation Documented
# tmpVendPackingSlipJour.setTmp();
#
# while select tmpFrmVirtual
# order by Id
# join vendPackingSlipJour
# where
# tmpFrmVirtual.RecordNo == vendPackingSlipJour.RecId &&
# tmpFrmVirtual.TableNum == vendPackingSlipJour.TableId
# join vendPackingSlipTrans
# where vendPackingSlipJour.PurchId == vendPackingSlipTrans.PurchId &&
# vendPackingSlipJour.PackingSlipId == vendPackingSlipTrans.PackingSlipId &&
# vendPackingSlipJour.DeliveryDate == vendPackingSlipTrans.DeliveryDate &&
# vendPackingSlipJour.InternalPackingSlipId == vendPackingSlipTrans.InternalPackingSlipId
# join localPurchLine
# where localPurchLine.InventTransId == vendPackingSlipTrans.InventTransId
# exists join inventTrans
# where inventTrans.InventTransId == localPurchLine.InventTransId &&
# inventTrans.VoucherPhysical == vendPackingSlipJour.LedgerVoucher &&
# inventTrans.StatusReceipt != StatusReceipt::Purchased &&
# inventTrans.PackingSlipReturned == NoYes::No
# {
# if (!allowPostingMap.exists(vendPackingSlipTrans.OrigPurchid))
# {
# localPurchTable = PurchTable::find(vendPackingSlipTrans.OrigPurchid);
# allowPostingMap.insert(vendPackingSlipTrans.OrigPurchid, this.mayJournalBePosted(localPurchTable));
# }
# if (!allowPostingMap.lookup(vendPackingSlipTrans.OrigPurchid))
# continue;
#
#
# if (vendPackingSlipTrans.remainInventFinancial(purchParmUpdate.ParmId) == 0.0)
# {
# //The Inventory quantity to match for packing slip %1 item %2 cannot be reserved.
#
# checkFailed(strfmt(strfmt("@SYS111789",vendPackingSlipJour.PackingSlipId,localPurchLine.ItemId)));
# continue;
# }
#
# if (localPurchLine.PurchQty > 0.0)
# {
# if (vendPackingSlipTrans.InventQty < vendPackingSlipTrans.remainInventFinancial(purchParmUpdate.ParmId))
# {
# //The Inventory quantity to match for packing slip %1 item %2 cannot be reserved.
#
# checkFailed(strfmt(strfmt("@SYS111789",vendPackingSlipJour.PackingSlipId,localPurchLine.ItemId)));
# continue;
# }
# }
# else
# {
# if (vendPackingSlipTrans.InventQty > vendPackingSlipTrans.remainInventFinancial(this.parmId()))
# {
# checkFailed(strfmt(strfmt("@SYS111789",vendPackingSlipJour.PackingSlipId,localPurchLine.ItemId)));
# //logPurchParmLineMessage();
# continue;
# }
# }
#
# if (vendPackingSlipTransRecIdTableRefIdMap.exists(vendPackingSlipTrans.RecId))
# {
#
# // a match was found, do a deep copy and continue so that another set of PurchParm* records are not created.
#
# tableRef = vendPackingSlipTransRecIdTableRefIdMap.lookup(vendPackingSlipTrans.RecId);
#
# select vendInvoiceInfoTable where vendInvoiceInfoTable.TableRefId == tableRef;
#
# if (vendInvoiceInfoTable.RecId)
# {
# if (vendInvoiceInfoTableMap.exists(vendInvoiceInfoTable))
# {
# vendPackingSlipTransSet = Set::create(vendInvoiceInfoTableMap.lookup(vendInvoiceInfoTable));
# }
# else
# {
# vendPackingSlipTransSet = new Set(Types::Record);
# }
#
# vendPackingSlipTransSet.add(vendPackingSlipTrans);
# vendInvoiceInfoTableMap.insert(vendInvoiceInfoTable, vendPackingSlipTransSet.pack());
# }
#
# continue;
# }
#
# if (purchIdLinesMap.exists(vendPackingSlipTrans.OrigPurchid))
# purchLinePackingSlipLineMap = Map::create(purchIdLinesMap.lookup(vendPackingSlipTrans.OrigPurchid));
# else
# purchLinePackingSlipLineMap = new Map(Types::Record, Types::Container);
#
# if (purchLinePackingSlipLineMap.exists(localPurchLine))
# packingSlipLineMap = Map::create(purchLinePackingSlipLineMap.lookup(localPurchLine));
# else
# packingSlipLineMap = new Map(typeId2Type(typeid(recId)), Types::Record);
#
# packingSlipLineMap.insert(vendPackingSlipTrans.RecId, vendPackingSlipTrans);
# purchLinePackingSlipLineMap.insert(localPurchLine,packingSlipLineMap.pack());
# purchIdLinesMap.insert(vendPackingSlipTrans.OrigPurchid, purchLinePackingSlipLineMap.pack());
# }
#
# PurchParmTable::deleteWithoutUpdate(purchParmUpdate.ParmId);
#
# me = vendInvoiceInfoTableMap.getEnumerator();
# while (me.moveNext())
# {
# vendInvoiceInfoTable = me.currentKey();
# vendPackingSlipTransSet = Set::create(me.currentValue());
# this.deepCopyFromVendInvoiceInfoTable(vendInvoiceInfoTable, vendPackingSlipTransSet);
# }
#
# me = purchIdLinesMap.getEnumerator();
# while (me.moveNext())
# {
# tableRef = FormLetter::getTableRef();
# localPurchTable = PurchTable::find(me.currentKey());
# currentInterCompanyInvoiceNum = this.interCompanyInvoiceNum(localPurchTable);
# lineEnumerator = Map::create(me.currentValue()).getEnumerator();
# while (lineEnumerator.moveNext())
# {
# localPurchLine = lineEnumerator.currentKey();
# this.createParmLineAndSubLines(localPurchLine, lineEnumerator.currentValue(), tableRef);
# }
# createParmTable();
# }
# this.recordInsertListInsert();
# ttscommit;
#
# purchParmTable = _purchParmTable;
#}
#
ENDSOURCE
SOURCE #selectFromJournalLines
#///
#/// Updates invoice lines based on matched packing slips.
#///
#///
#/// A packed set of SalesPurchParmSubLineLinkTmp table records which represents matches between invoice lines and packing slip lines.
#///
#public void selectFromJournalLines(container _packedRecordList)
#{
# List packingSlipLinkList = List::create(_packedRecordList);
# ListEnumerator enumerator = packingSlipLinkList.getEnumerator();
# VendPackingSlipTrans localvendPackingSlipTrans;
# VendPackingSlipJour localvendPackingSlipJour;
# SalesPurchParmSubLineLinkTmp packingSlipLink;
# PurchParmLine localpurchParmLine;
# PurchParmLine localpurchParmLine2;
# PurchLine localPurchLine;
# NoYes firstRow = true;
# RefRecId purchParmLineRecId;
# PurchParmSubLine purchParmSubLine;
# InventQty tmpInventNow;
# PurchQty tmpReceiveNow; //added to get correct purch qty when partial invoice matching
# boolean updateInvoiceLine; // indicates whether invoice line needs to be updated
#
# void logPurchParmLineMessage()
# {
# //Cannot reserve packing slip quantity
# setprefix('@SYS112742');
#
# //Invoice line: item %1
# setprefix(strfmt('@SYS112743',localPurchLine.ItemId));
#
# //The inventory quantity to match for packing slip %1 item %2 cannot be reserved.
# checkFailed(strfmt('@SYS111789',localvendPackingSlipJour.PackingSlipId,localPurchLine.ItemId));
# }
# ;
#
# ttsbegin;
#
# while (enumerator.moveNext())
# {
# packingSlipLink.data(enumerator.current());
# packingSlipLink.insert();
# }
#
# while select packingSlipLink
# order by packingSlipLink.GrandParentRecId //this will get contiguous PurchParmLine records so we can detect when we've moved to a new purchparmline
# join localvendPackingSlipTrans
# where localvendPackingSlipTrans.RecId == packingSlipLink.ChildRecId
# join localpurchParmLine
# where localpurchParmLine.RecId == packingSlipLink.GrandParentRecId
# join localPurchLine
# where localPurchLine.InventTransId == localvendPackingSlipTrans.InventTransId
# join localvendPackingSlipJour
# where localvendPackingSlipJour.InternalPackingSlipId == localvendPackingSlipTrans.InternalPackingSlipId
# {
#
# if (packingSlipLink.Matched == NoYes::Yes)
# {
#
# if (packingSlipLink.InventQty == 0.0)
# {
#
# logPurchParmLineMessage();
# continue;
# }
#
# if (localPurchLine.PurchQty > 0.0)
# {
# if (localvendPackingSlipTrans.InventQty < localvendPackingSlipTrans.remainInventFinancial(this.parmId()))
# {
#
# logPurchParmLineMessage();
# continue;
# }
# }
# else
# {
# if (localvendPackingSlipTrans.InventQty > localvendPackingSlipTrans.remainInventFinancial(this.parmId()))
# {
#
# logPurchParmLineMessage();
# continue;
# }
# }
# }
#
# if ((purchParmLineRecId != localpurchParmLine.RecId) || (firstRow))
# {
# // Positioned on a different purchParmLine
#
# firstRow = NoYes::No;
#
# if (updateInvoiceLine)
# {
# // commit the previous record
# localpurchParmLine2.update();
# }
#
# localpurchParmLine2.clear();
# tmpInventNow = 0.0;
# tmpReceiveNow = 0.0;
# updateInvoiceLine = false;
#
# select forupdate localpurchParmLine2 where localpurchParmLine2.RecId == localpurchParmLine.RecId;
#
# delete_from purchParmSubLine
# where
# purchParmSubLine.LineRefRecId == localpurchParmLine.RecId;
#
# }
#
# if (packingSlipLink.Matched == NoYes::Yes)
# {
#
# tmpInventNow += packingSlipLink.InventQty;
# tmpReceiveNow += packingSlipLink.PurchQty;
#
# newPostingInventQty = tmpInventNow;
# newPostingPurchQty = tmpReceiveNow;
#
# [localpurchParmLine2.ReceiveNow, localpurchParmLine2.RemainBefore, localpurchParmLine2.RemainAfterInvent] = this.qtyPurch(localPurchLine, tmpReceiveNow);
# [localpurchParmLine2.InventNow, localpurchParmLine2.RemainBeforeInvent, localpurchParmLine2.RemainAfterInvent] = this.qtyInvent(localPurchLine, tmpInventNow);
# localpurchParmLine2.LineAmount = localpurchParmLine2.calcLineAmount(); //if the PurchQty was changed in the matching window, update the line amount.
#
# // Matching, create a purchParmSubLine.
#
# purchParmSubLine.clear();
# purchParmSubLine.initFromPurchParmLine(localpurchParmLine2);
# purchParmSubLine.initFromVendPackingSlipTrans(localvendPackingSlipTrans);
#
# purchParmSubLine.ReceiveNow = packingSlipLink.PurchQty;
# purchParmSubLine.InventNow = packingSlipLink.InventQty;
# purchParmSubLine.insert();
# }
#
# purchParmLineRecId = localpurchParmLine.RecId;
#
#
# if (packingSlipLink.Matched != packingSlipLink.OriginalMatched || packingSlipLink.PurchQty != packingSlipLink.OriginalPurchQty)
# {
# updateInvoiceLine = true;
# }
# }
#
# if (updateInvoiceLine)
# {
# // commit the previous record
# localpurchParmLine2.update();
# }
#
# ttscommit;
#
#}
#
#
#
#
ENDSOURCE
SOURCE #setReverseCharge_UK
#///
#/// Checks if reverse charge applies to the current invoice update and if so updates the applicable lines with the reverse charge sales tax group.
#///
#///
#/// If the reverse charge feature is disabled, no additional checks are performed.
#///
#protected void setReverseCharge_UK()
#{
# if (ReverseChargeParameters_UK::find().rcEnabled)
# {
# if ((ReverseCharge_invoice_UK::isPurchLineReverseChargeApplicable(purchTable.PurchId,purchParmTable.ParmId,purchParmTable.TableRefId) ||
# (ReverseChargeParameters_UK::find().rcInvoiceThreshold &&
# ReverseCharge_invoice_UK::reverseChargePurchTotal(purchTable.PurchId,purchParmTable.ParmId,purchParmTable.TableRefId)>=ReverseChargeParameters_UK::find().rcInvoiceThresholdAmount)) &&
# ReverseCharge_invoice_UK::isPurchDomestic(purchTable) &&
# ReverseCharge_invoice_UK::isReverseChargeApplicablePurchase(purchTable.PurchId,purchParmTable.ParmId,purchParmTable.TableRefId))
# {
# if (purchTable.vatNum)
# {
# ReverseCharge_invoice_UK::setReverseChargePurchItemSalesTaxGroup(purchTable.PurchId,purchParmTable.ParmId,purchParmTable.TableRefId);
# }
# else
# {
# warning("@SYS125408");
# }
# }
# }
#}
ENDSOURCE
SOURCE #syncToNewInvoice
#///
#/// Performs any synchronization needed when a new PurchParmTable table record is created.
#///
#///
#/// The newly created PurchParmTable table record.
#///
#///
#/// The invoice number used by an intercompany invoice.
#///
#///
#/// The MarkupTrans records associated with a PurchTable table record are copied to the new PurchParmSubTable table record.
#///
#protected void syncToNewInvoice(PurchParmTable _purchParmTable, Num _interCompanyInvoiceNum)
#{
# PurchTable localPurchTable;
# PurchParmSubTable localParmSubTable;
# str parmSubTableKey = this.purchParmSubTableMapKey(_purchParmTable.TableRefId, _purchParmTable.PurchId);
# ;
# super(_purchParmTable, _interCompanyInvoiceNum);
# if(purchParmSubTableMap.exists(parmSubTableKey))
# {
# select firstonly localPurchTable
# where localPurchTable.PurchId == _purchParmTable.PurchId;
# localParmSubTable = purchParmSubTableMap.lookup(parmSubTableKey);
# Markup::copyFromPurchOrder(localPurchTable, localParmSubTable, _interCompanyInvoiceNum, _purchParmTable.CurrencyCode);
# }
#}
ENDSOURCE
SOURCE #transactionLogTxt
#TransTxt transactionLogTxt()
#{;
# return "@SYS25471";
#}
ENDSOURCE
SOURCE #transactionLogType
#TransactionLogType transactionLogType()
#{
# return TransactionLogType::PurchInvoice;
#}
ENDSOURCE
SOURCE #unpack
#boolean unpack(container packedClass)
#{
# Integer version = conpeek(packedClass,1);
# NoYes remain;
# NoYes approved;
# EmplId approvedBy;
# NoYes printPromissoryNote;
#
# #LOCALMACRO.ParmList_v25sp2
# ParmId,
# purchParmUpdate.SpecQty,
# remain,
# purchParmUpdate.CreditRemaining,
# QueryCriteria,
# Editing,
# approved,
# approvedBy,
# Printout,
# PrintFormletter,
# PrinterSettingsFormLetter,
# printEuVatInvoice,
# printerSettingsEuVatInvoice
# #ENDMACRO
#
# #LOCALMACRO.ParmList_v30
# parmId,
# purchParmUpdate,
# QueryCriteria,
# Editing,
# Printout,
# PrintFormletter,
# PrinterSettingsFormLetter,
# printEuVatInvoice,
# printerSettingsEuVatInvoice,
# printPromissoryNote,
# printerSettingsPromissoryNote
# #ENDMACRO
#
# #LOCALMACRO.ParmList_v40
# parmId,
# purchParmUpdate,
# QueryCriteria,
# Editing,
# Printout,
# PrintFormletter,
# PrinterSettingsFormLetter,
# printEuVatInvoice,
# printerSettingsEuVatInvoice,
# printerSettingsPromissoryNote,
# PrintSalesFormletter,
# printerSettingsFormletterCopy
# #ENDMACRO
# ;
#
# switch (version)
# {
# case #CurrentVersion + #ParentVersion : [version, #ParmList, #ParmListCommonCS] = packedClass;
# break;
#
# case 9 : [version, #ParmList_v40] = packedClass;
# break;
#
# case 8 : [version, #ParmList_v30] = packedClass;
# printerSettingsFormLetterCopy = printerSettingsFormLetter;
# break;
#
# case 5 : [version, #ParmList_v25sp2] = packedClass;
# break;
#
# default : return false;
# }
#
# return true;
#}
#
ENDSOURCE
SOURCE #updateAssetAcquisitionPrice
#///
#/// Updates the AcquisitionPrice field value on the related AssetBook table
#///
#///
#/// The AssetId value of the AssetBook and AssetDepBook table records to update
#///
#///
#/// The BookId value of the AssetBook table record to update
#///
#///
#/// The value which the Acquisition Price field should be updated.
#///
#public void updateAssetAcquisitionPrice(AssetId _assetId, AssetBookIdPurchSalesInvent _assetBookId,
# PurchLineAmount _lineAmount)
#{
# AssetBook assetBook;
# ;
#
# // Update the asset book
# update_recordset assetBook
# setting AcquisitionPrice = _lineAmount
# where assetBook.AssetId == _assetId &&
# assetBook.Status == AssetStatus::NoAcquisition &&
# assetBook.BookId == _assetBookId;
#
#}
#
ENDSOURCE
SOURCE #updateAssetPurchLineRecId
#///
#/// Updates the PurchLineRecNo
#///
#///
#/// The Id value to which to set the PurchLineRecId value.
#///
#///
#/// The Id value of the asset to be updated.
#///
#public void updateAssetPurchLineRecId(PurchLineRefRecId _purchLineRecId, AssetId _assetId)
#{
# AssetTable assetTable;
#
# ;
#
# if ((_purchLineRecId) && (_assetId))
# {
# update_recordset assetTable setting PurchLineRecId = _purchLineRecId
# where assetTable.AssetId == _assetId;
# }
#}
ENDSOURCE
SOURCE #updateInventory
#protected void updateInventory(InventMovement _inventMovement,
# AmountCur _purchValue)
#{
# InventUpd_Financial inventUpd_Financial;
# LedgerVoucherObject ledgerVoucherObject;
# PurchParmLine localPurchParmLine;
# PurchParmSubLine purchParmSubLine;
# AmountCur purchValue;
# AmountCur orgPurchValue;
# PurchQty receiveNow;
# InventQty inventNow;
# PurchQty localInvoiceUpdatedOnly;
# InventQty localupdateNowInvent;
# List list;
# ListEnumerator le;
# Counter subLines;
# InventQty inventQtyLeft;
# PurchQty purchQtyLeft, purchQtySubTotal;
# PurchQty factor;
# void updateInventory()
# {;
# inventUpd_Financial = InventUpd_Financial::newPurchInvoice(_inventMovement,
# ledgerVoucher,
# purchParmTable.Num, // number,
# purchValue,
# purchLine.CurrencyCode,
# this.fixedExchRate(),
# this.fixedExchRateSecondary(),
# this.fixedEuroTriangulation(),
# localPurchParmLine,
# purchParmSubLine);
#
# if (localPurchParmLine.ReceiveNow < 0)
# {
# if (purchTable.InterCompanyDirectDelivery && purchTable.interCompanyEndpointActionPolicy().PostSalesInvoice)
# inventUpd_Financial.parmAllowNegativePhysical(true);
#
# if (purchTable.ProjId && purchLine.Scrap)
# {
# inventUpd_Financial.parmAllowNegativePhysical(true);
# inventUpd_Financial.parmAllowNegativeFinancial(true);
# }
# }
#
# inventUpd_Financial.updateNow();
#
# receiveNow += inventUpd_Financial.updFinancialUnit();
# inventNow += inventUpd_Financial.updPhysical();
# localInvoiceUpdatedOnly += inventUpd_Financial.updPhysicalUnit();
# localupdateNowInvent += inventUpd_Financial.updFinancial();
# }
#
# if (purchParmTable.useDocumentDate())
# {
# ledgerVoucherObject = ledgerVoucher.findLedgerVoucherObject();
# ledgerVoucherObject.parmTransDate(purchParmTable.documentDate());
# ledgerVoucher.lastTransDate(ledgerVoucherObject.parmTransDate());
# }
#
#
# orgPurchValue = _purchValue;
#
# if (PurchParmSubLine::existPurchParmLine(purchParmLine.RecId))
# {
# list = new List(Types::Record);
# while select purchParmSubLine
# where purchParmSubLine.LineRefRecId == purchParmLine.RecId
# {
# list.addEnd(purchParmSubLine);
# purchQtySubTotal += purchParmSubLine.ReceiveNow;
# }
#
# subLines = list.elements();
# le = list.getEnumerator();
# purchQtyLeft = purchParmLine.ReceiveNow;
# inventQtyLeft = purchParmLine.InventNow;
#
# factor = purchParmLine.ReceiveNow/purchQtySubTotal < 1 ? purchParmLine.ReceiveNow/purchQtySubTotal : 1;
#
# while (le.moveNext())
# {
# purchParmSubLine = le.current();
# localPurchParmLine = purchParmLine.data();
#
# if (subLines == 1)
# {
# localPurchParmLine.ReceiveNow = purchQtyLeft;
# localPurchParmLine.InventNow = inventQtyLeft;
# purchValue = orgPurchValue;
# }
# else
# {
# localPurchParmLine.ReceiveNow = purchParmSubLine.ReceiveNow * factor;
# localPurchParmLine.InventNow = purchParmSubLine.InventNow;
# purchValue = Currency::amount(_purchValue * localPurchParmLine.ReceiveNow/purchParmLine.ReceiveNow);
# }
#
# updateInventory();
# subLines--;
# purchQtyLeft -= purchParmSubLine.ReceiveNow * factor;
# inventQtyLeft -= purchParmSubLine.InventNow;
# orgPurchValue -= purchValue;
# }
# }
# else
# {
# purchValue = orgPurchValue;
# localPurchParmLine = purchParmLine;
# updateInventory();
# }
#
# /* Quantity actual updated is collected */
# purchParmLine.ReceiveNow = receiveNow;
# purchParmLine.InventNow = inventNow;
# invoiceUpdatedOnly = localInvoiceUpdatedOnly;
# updateNowInvent = localupdateNowInvent;
#
# if (vendInvoiceTrans.Qty < 0)
# MarkupAdjustment::adjustCreditNote(purchParmLine.ReceiveNow, purchParmLine.lineAmountExclTax(vendInvoiceJour.InvoiceDate), ledgerVoucher, vendInvoiceTrans, purchParmLine);
# else
# MarkupAdjustment::adjustInvoice(purchParmLine.ReceiveNow, purchParmLine.lineAmountExclTax(vendInvoiceJour.InvoiceDate), ledgerVoucher, vendInvoiceTrans, purchParmLine, vendInvoiceTrans);
#
# if (purchParmTable.useDocumentDate())
# {
# ledgerVoucherObject = ledgerVoucher.findLedgerVoucherObject();
# ledgerVoucherObject.parmTransDate(purchParmTable.DocumentDate);
# ledgerVoucher.lastTransDate(ledgerVoucherObject.parmTransDate());
# }
#}
#
ENDSOURCE
SOURCE #updateNow
#///
#/// Prepares to save the invoice information and verifies various PurchFormLetter_Invoice field values
#///
#///
#/// true if the record was updated; otherwise, false.
#///
#boolean updateNow()
#{
# AmountCur discValue;
# AmountCur purchValue;
# AmountCur taxReverseAmount;
#
# LedgerVoucherObject ledgerVoucherObject;
#
# LedgerAccount accountDisc;
# LedgerAccount accountOffsetAccountPckSlp;
# InventMovement inventMovement;
# PurchLineType purchLineType;
# TransactionTxt transactionTxt;
#
# PurchQty salesUpdateQty;
# PurchQty qtyDeliveredNoInvoice;
#
# AmountCur tmpTax1099Amount;
# TmpTaxWorkTrans localTmpTaxWorkTrans;
#
# boolean onlyOneCashDiscOnInvoice = true;
# LedgerAccount cashDiscAccount;
# LedgerSystemAccounts ledgerSystemAccounts;
# SalesLine salesLine;
# boolean useQualityManagement = InventParameters::find().UseQualityManagement;
#
# #Tax1099
# Set tableRefIdsToDelete = new Set(Types::String);
# SetEnumerator setEnum;
# VendInvoiceInfoLine vendInvoiceInfoLine;
# TaxParameters taxParameters;
# LedgerTable postingLedgerTable;
# ;
#
# this.initJournal();
# transactionTxt = this.initTransactionTxt(creditNote ? LedgerTransTxt::PurchCreditNoteLedger : LedgerTransTxt::PurchInvoiceLedger);
#
# this.initLedgerVoucher(transactionTxt, purchParmTable.updateDate());
#
# updateSalesLinesQuery = new SysQueryRun(querystr(SalesUpdate));
#
# this.initMarkup();
# this.initRecordListInventReportDimHistory();
#
# purchLine.clear();
# purchParmLine.clear();
# firstTax1099Box = '';
# firstTax1099State = '';
# totalTax1099Amount = 0;
# totalTax1099StateAmount = 0;
#
# taxParameters = TaxParameters::find();
# recordListPurchParmLine.first(purchParmLine);
# while (purchParmLine)
# {
# if (! this.checkDiscardLine())
# {
# purchLine = this.getPurchLine(purchParmLine, true);
#
# if (useQualityManagement)
# {
# if (InventQualityOrderTable::openDestructiveTestOrderExists(InventTestReferenceType::Purch, purchLine.PurchId, purchLine.InventTransId))
# throw error("@SYS114216");
# }
#
# // If the tax codes are to be verified, check if sales tax id and Item tax id
# // are defined per line. If the ledger account requires a tax code, and tax code
# // is not provided, the posting will be stopped.
# if (taxParameters.ValidateTaxCode)
# {
# postingLedgerTable = LedgerTable::find(
# InventPosting::accountItem(InventAccountType::PurchReceipt,
# purchLine.ItemId,
# purchLine.inventTable().ItemGroupId,
# purchLine.VendAccount,
# purchLine.VendGroup,
# purchLine.TaxGroup ));
#
# if (!this.tax().checkNoTax(postingLedgerTable,
# purchLine.TaxGroup,
# purchLine.TaxItemGroup))
# {
# throw error("@SYS21533");
# }
# }
#
# setprefix(#PreFixField(purchline, purchId));
#
# this.checkBeforePosting();
# this.displayProgress();
#
# #LinePrefix(purchLine,purchLine.inventdim().prefixitemdim(purchLine.inventTable().dimGroupId))
#
# lineValue = purchParmLine.lineAmountExclTax(vendInvoiceJour.InvoiceDate);
# lineValueInclTax = purchParmLine.LineAmount;
# discValue = purchParmLine.lineDiscExclTax(vendInvoiceJour.InvoiceDate);
#
# this.initJournalLine();
# this.initJournalLineLedger();
# if (!markup.transDate())
# {
# markup.transDate(vendInvoiceJour.InvoiceDate);
# }
# this.postMarkupLine();
#
#
# //Create the fixed asset and update the PurchParmLine.
# purchParmLine_Asset = purchParmLine.purchParmLine_Asset(true);
#
# if ((purchParmLine_Asset.CreateFixedAsset == NoYes::Yes)
# && (AssetParameters::find().AssetAllowCreate == NoYes::Yes)
# && (purchParmLine.ReceiveNow > 0))
# {
# this.createFixedAsset(purchParmLine, purchParmLine_Asset);
# }
#
# purchLine.initFromPurchParmLine_Asset(purchParmLine_Asset);
#
# if (purchLine.orig().AssetId != purchLine.AssetId)
# {
# purchLine.assetUpdateInventTrans();
# }
#
# purchValue = lineValue;
# accountDisc = purchLine.accountDisc();
#
# if (accountDisc)
# purchValue += discValue; // discvalue is aleady subtracted from the value in parmline
#
# purchValue += markup.markupItem();
#
#
# tmpTax1099Amount = purchValue;
# purchValue += this.tax().taxInCostPrice(purchLine.TableId, purchLine.RecId);
#
# /* Updating/posting of inventory */
# inventMovement = InventMovement::construct(purchLine);
# this.updateInventory(inventMovement, purchValue);
#
# if (purchLine.DeliveryType == TradeLineDlvType::DropShip)
# {
# salesLine = SalesLine::findInventTransId(purchLine.InventRefTransId);
#
# qtyDeliveredNoInvoice = salesLine.deliveredInTotal() - purchLine.invoicedInTotal() + purchParmLine.ReceiveNow;
#
# // if more has already been delivered than invoiced, adjust the sales update quantity,
# // that is discount with items already delivered but not yet invoiced
# if (purchParmLine.ReceiveNow > 0)
# {
# salesUpdateQty = purchParmLine.ReceiveNow - qtyDeliveredNoInvoice > 0 ? purchParmLine.ReceiveNow - qtyDeliveredNoInvoice : 0 ;
# }
# else
# {
# salesUpdateQty = purchParmLine.ReceiveNow - qtyDeliveredNoInvoice < 0 ? purchParmLine.ReceiveNow - qtyDeliveredNoInvoice : 0 ;
# }
# this.updateSalesLine(purchLine, salesUpdateQty);
# }
#
# if (purchParmTable.useDocumentDate())
# {
# accountOffsetAccountPckSlp = purchLine.accountOffsetAccountPckSlp();
#
# ledgerVoucherObject = ledgerVoucher.findLedgerVoucherObject();
#
# ledgerVoucher.addTrans(
# LedgerVoucherTransObject::newCreateTrans(
# ledgerVoucherObject,
# LedgerPostingType::PurchOffsetAccountPckSlp,
# accountOffsetAccountPckSlp,
# purchLine.Dimension,
# purchLine.CurrencyCode,
# purchValue,
# purchLine.TableId,
# purchLine.RecId,
# 0,
# this.fixedExchRate(),
# this.fixedExchRateSecondary(),
# this.fixedEuroTriangulation(),
# false,
# // Project Integration
# purchLine.ProjId ? ProjLedger::newProjectPurch(purchLine.ProjId,purchLine.ProjCategoryId,purchLine.InventTransId,number,inventMovement.projAdjustRefId(),purchLine.ItemId) : null
# // Project Integration
# ));
#
# ledgerVoucherObject.parmTransDate(purchParmTable.documentDate());
# ledgerVoucher.lastTransDate(ledgerVoucherObject.parmTransDate());
#
# ledgerVoucher.addTrans(
# LedgerVoucherTransObject::newCreateTrans(
# ledgerVoucherObject,
# LedgerPostingType::PurchOffsetAccountPckSlp,
# accountOffsetAccountPckSlp,
# purchLine.Dimension,
# purchLine.CurrencyCode,
# -purchValue,
# purchLine.TableId,
# purchLine.RecId,
# 0,
# this.fixedExchRate(),
# this.fixedExchRateSecondary(),
# this.fixedEuroTriangulation(),
# false,
# // Project Integration
# purchLine.ProjId ? ProjLedger::newProjectPurch(purchLine.ProjId,purchLine.ProjCategoryId,purchLine.InventTransId,number,inventMovement.projAdjustRefId(),purchLine.ItemId) : null
# // Project Integration
# ));
#
# ledgerVoucherObject.parmTransDate(purchParmTable.DocumentDate);
# ledgerVoucher.lastTransDate(ledgerVoucherObject.parmTransDate());
# }
#
# /* Calculating purchprice and update InventTable */
# this.calcLastPurchPrice();
#
# if (discValue && accountDisc)
# {
# ledgerVoucher.addTrans(
# LedgerVoucherTransObject::newCreateTrans(
# ledgerVoucher.findLedgerVoucherObject(),
# LedgerPostingType::PurchDisc,
# accountDisc,
# purchLine.Dimension,
# purchLine.CurrencyCode,
# -discValue,
# purchLine.TableId,
# purchLine.RecId,
# 0,
# this.fixedExchRate(),
# this.fixedExchRateSecondary(),
# this.fixedEuroTriangulation(),
# false,
# // Project Integration
# purchLine.ProjId ? ProjLedger::newProjectPurch(purchLine.ProjId,purchLine.ProjCategoryId,purchLine.InventTransId,number,inventMovement.projAdjustRefId(),purchLine.ItemId) : null
# // Project Integration
# ));
#
# discValue = ledgerVoucher.lastAmountMST(ledgerVoucher.lastVoucher());
# }
# if (purchTable.CashDiscPercent && onlyOneCashDiscOnInvoice && TaxParameters::canApplyCashDiscOnInvoice_ES())
# {
# onlyOneCashDiscOnInvoice = false;
# cashDiscAccount = CashDisc::find(purchTable.CashDisc).AccountReceived;
#
# if (cashDiscAccount)
# {
# ledgerVoucher.addTrans(
# LedgerVoucherTransObject::newCreateTrans(ledgerVoucher.findLedgerVoucherObject(),
# LedgerPostingType::VendCashDisc,
# cashDiscAccount,
# purchLine.Dimension,
# purchLine.CurrencyCode,
# -cashDiscAmount,
# purchLine.TableId,
# purchLine.RecId,
# 0,
# this.fixedExchRate(),
# this.fixedExchRateSecondary(),
# this.fixedEuroTriangulation(),
# false,
# purchLine.ProjId ? ProjLedger::newProjectPurch(purchLine.ProjId, purchLine.ProjCategoryId, purchLine.InventTransId, number, inventMovement.projAdjustRefId()) : null));
# }
# else
# {
# ledgerSystemAccounts = LedgerSystemAccounts::find(LedgerPostingType::VendCashDisc);
#
# if (ledgerSystemAccounts.AccountNum)
# {
# ledgerVoucher.addTrans(
# LedgerVoucherTransObject::newCreateTrans(ledgerVoucher.findLedgerVoucherObject(),
# LedgerPostingType::VendCashDisc,
# ledgerSystemAccounts.AccountNum,
# purchLine.Dimension,
# purchLine.CurrencyCode,
# -cashDiscAmount,
# purchLine.TableId,
# purchLine.RecId,
# 0,
# this.fixedExchRate(),
# this.fixedExchRateSecondary(),
# this.fixedEuroTriangulation(),
# false,
# purchLine.ProjId ? ProjLedger::newProjectPurch(purchLine.ProjId, purchLine.ProjCategoryId, purchLine.InventTransId, number, inventMovement.projAdjustRefId()) : null ));
# }
# else
# throw error("@SYS99049");
# }
# }
#
# localTmpTaxWorkTrans = tax.tmpTaxWorkTrans();
# if (tax.tmpTaxWorkTrans().TaxDirection == TaxDirection::IncomingTax)
# {
# tmpTax1099Amount = purchValue;
# }
#
# if (purchLine.Tax1099Box)
# {
# tmpTax1099Amount = purchLine.Tax1099Amount == 0 ? tmpTax1099Amount : purchLine.Tax1099Amount;
# if (purchLine.Tax1099Box == #Misc_16 && tmpTax1099Amount != 0)
# {
# tmpTax1099Amount = 0;
# }
#
# purchLine.Tax1099Amount = tmpTax1099Amount;
# vendInvoiceTrans.Tax1099Amount = purchLine.Tax1099Amount;
# vendInvoiceTrans.Tax1099Box = purchLine.Tax1099Box;
# totalTax1099Amount += purchLine.Tax1099Amount;
# firstTax1099Box = firstTax1099Box == '' ? purchLine.Tax1099Box : firstTax1099Box;
# }
# else
# {
# purchLine.Tax1099Amount = 0;
# }
#
# if (purchLine.Tax1099State)
# {
# purchLine.Tax1099StateAmount = purchLine.Tax1099StateAmount == 0 ? purchValue : purchLine.Tax1099StateAmount;
# if (purchLine.Tax1099State == #Misc_04 && purchLine.Tax1099StateAmount != 0)
# {
# purchLine.Tax1099StateAmount = 0;
# }
#
# vendInvoiceTrans.Tax1099StateAmount = purchLine.Tax1099StateAmount;
# vendInvoiceTrans.Tax1099State = purchLine.Tax1099State;
# totalTax1099StateAmount += purchLine.Tax1099StateAmount;
# firstTax1099State = firstTax1099State == '' ? purchLine.Tax1099State : firstTax1099State;
# }
# else
# {
# purchLine.Tax1099StateAmount = 0;
# }
#
# // Per bug 38257, the 1099 amount on the purchLine should be set to zero
# // after each invoice.
# purchLine.Tax1099Amount = 0;
# purchLine.Tax1099StateAmount = 0;
#
# this.writeJournalLine();
#
# this.endJournalLineLedger();
#
# this.updateProjectJournal(updateNowInvent);
#
# if(purchParmLine.InventNow)
# this.updateProduction(purchParmLine.InventNow);
#
# purchValueMap.insert(purchLine.RecId, purchLine.Tax1099Amount);
# recordListPurchLine.del(purchLine);
# recordListPurchLine.ins(purchLine);
#
# if (purchParmTable.PurchId != purchParmLine.OrigPurchId)
# this.updateSumPurchId();
#
# #if.never //#Speedtest
#
# if (speedExecute_Purch)
# speedExecute_Purch.timing(SpeedPurchTiming::LineInvoice, purchParmLine.itemId);
# #endif
#
# if (purchParmLine.InvoiceInfoTableRefId)
# {
# tableRefIdsToDelete.add(purchParmLine.InvoiceInfoTableRefId);
#
# vendInvoiceInfoLine = VendInvoiceInfoLine::findTableRefIdInventTransId(purchParmLine.InvoiceInfoTableRefId,purchParmLine.InventTransId,true);
# if (vendInvoiceInfoLine.RecId != 0)
# {
# vendInvoiceInfoLine.delete();
# }
# }
#
# purchLineType = PurchLineType::construct(purchLine);
# purchLineType.updatePurchLine(inventMovement.transIdSum());
#
# switch (purchLineType.parmStatusUpdateResults())
# {
# case PurchStatus::Invoiced:
# checkFailed("@SYS113195"); //Status was not changed to Invoiced because one or more pending invoices exist.
# break;
# case PurchStatus::Canceled:
# checkFailed("@SYS113196"); //Status was not changed to Canceled because one or more pending invoices exist.
# break;
# }
#
# if (purchParmLine_Asset.AssetId != "")
# {
#
# if ((purchParmLine_Asset.AssetTransTypePurch == AssetTransTypePurch::Acquisition) &&
# (!AssetParameters::canUserCreateAssetAcquisition()))
# {
# this.updateAssetAcquisitionPrice(purchParmLine_Asset.AssetId, purchParmLine_Asset.AssetBookId,
# purchLine.LineAmount);
# }
#
# this.updateAssetPurchLineRecId(purchLine.RecId, purchParmLine_Asset.AssetId);
# }
#
# purchLine.doUpdate();
# if (!this.checkLineAfterPosting())
# {
# return false;
# }
#
# this.interCompanyTransferBatchSerial(StatusIssue::Sold);
# }
#
# if (!recordListPurchParmLine.next(purchParmLine))
# break;
# }
#
# setEnum = tableRefIdsToDelete.getEnumerator();
# while (setEnum.moveNext())
# {
# VendInvoiceInfoTable::deleteTableRefId(setEnum.current());
# }
#
# if (!this.checkIfSomethingIsPosted())
# return false;
#
#
# progress.setText("@SYS25781");
#
# this.writeJournal();
# this.writeRecordListInventReportDimHistory();
# this.createPaymentSched();
# this.postMarkupTable();
# taxReverseAmount = this.reversePostedTax(ledgerVoucher, purchParmTable);
# this.postTax(true);
#
# // We need to set the InvoiceProject field in the VendTrans if the proj id in the
# // PurchTable is set
# if (str2int(this.purchTable().ProjId) > 0)
# {
# this.createVendTrans(true);
# }
# else
# {
# this.createVendTrans(false);
# }
#
# this.postPurgeLedgerAccount(ledgerVoucher, taxReverseAmount, purchParmTable);
#
# this.postInvoiceRoundOff();
# this.postEndDisc();
#
# this.endJournalLedger();
#
# ledgerVoucher.end();
# #if.never // #Speedtest
# if (speedExecute_Purch)
# speedExecute_Purch.timing(SpeedPurchTiming::InvoiceEnd,'');
# #endif
#
# return true;
#}
#
ENDSOURCE
SOURCE #updateParmTableWithErrors
#///
#/// Updates the current PurchParmTable table record with the provided log text.
#///
#///
#/// The log text to be assigned to the current PurchParmTable table record.
#///
#public void updateParmTableWithErrors(LogText _logText)
#{
# super(_logText);
#
# // If user was attempting to post, save failed invoice
# if (!this.proforma())
# {
# purchParmTable.VendInvoiceSaveStatus = VendInvoiceSaveStatus::Pending;
# this.insertDraft();
# }
#}
ENDSOURCE
SOURCE #updateProduction
#void updateProduction(InventQty _qtyUpdateNow)
#{
# ProdBOM prodBOM;
# ;
#
# if(purchLine.InventRefId && purchLine.ItemRefType == InventRefType::ProdLine)
# {
# prodBOM = ProdBOM::findTransId(purchLine.InventRefTransId);
#
# if(prodBOM)
# {
# prodBOM.postVendorProdBOM(this.updateDate(), _qtyUpdateNow, purchLine);
# prodBOM.postVendorProdRoute(this.updateDate(), _qtyUpdateNow, purchLine);
# }
# }
#}
ENDSOURCE
SOURCE #updateProjectJournal
#void updateProjectJournal(InventQty _inventQtyUpdateNow)
#{
# InventJournalTrans inventJournalTrans;
# ;
#
# if (purchLine.ProjId)
# {
# select firstonly forupdate inventJournalTrans
# index hint TransIdIdx
# where inventJournalTrans.InventTransId == purchLine.InventRefTransId;
#
# if (inventJournalTrans && !inventJournalTrans.inventJournalTable().Posted && inventJournalTrans.Qty <= _inventQtyUpdateNow + purchLine.receivedInventInTotal())
# {
# inventJournalTrans.TransDate = this.updateDate();
# inventJournalTrans.update();
#
# }
# }
#}
#
ENDSOURCE
SOURCE #updateQueryBuild
#void updateQueryBuild()
#{
# QueryBuildDataSource qbds;
# QueryBuildRange qbr;
# str range;
# ;
#
# super();
#
# if (purchParmUpdate.SpecQty == PurchUpdate::PackingSlip)
# {
# qbds = chooseLines.query().dataSourceTable(tablenum(InventTrans));
# if (qbds)
# {
# range = strfmt("(((%1.%2== %4) && (%1.%3== %5)) || ((%1.%2==%6) && (%1.%3==%7)))",
# qbds.name(),
# fieldstr(InventTrans,StatusReceipt),
# fieldstr(InventTrans,StatusIssue),
# queryValue(enum2int(StatusReceipt::Received)),
# queryValue(enum2int(StatusIssue::None)),
# queryValue(enum2int(StatusReceipt::None)),
# queryValue(enum2int(StatusIssue::Deducted)));
#
#
# qbr = SysQuery::findOrCreateRange(qbds, fieldnum(InventTrans, StatusReceipt));
# qbr.value(range);
# qbr.status(RangeStatus::Hidden);
# }
# }
#}
#
ENDSOURCE
SOURCE #updateQueryDocumentRanges
#///
#/// Adds document ranges to the chooseLines query.
#///
#protected void updateQueryDocumentRanges()
#{
# VendInvoiceInfoTable localVendInvoiceInfoTable;
# container viiTableContainer;
# Map mapViiTable;
# MapEnumerator mapViiTableEnumerator;
# boolean purchTableInitialized;
# ;
#
# super();
#
# switch(this.parmCallerTable().TableId)
# {
# case tablenum(VendInvoiceInfoTable):
# viiTableContainer = FormLetter::getFormRecord(callerFormDataSource);
# if (viiTableContainer)
# {
# mapViiTable = Map::create(viiTableContainer);
# mapViiTableEnumerator = mapViiTable.getEnumerator();
#
# while (mapViiTableEnumerator.moveNext())
# {
# localVendInvoiceInfoTable = mapViiTableEnumerator.currentValue();
#
# if (!purchTableInitialized)
# {
# this.initParmPurchTable(PurchTable::find(localVendInvoiceInfoTable.PurchId));
# purchTableInitialized = true;
# }
#
# chooseLines.query().dataSourceTable(tablenum(VendInvoiceInfoTable)).addRange(fieldnum(VendInvoiceInfoTable, TableRefId)).value(queryValue(localVendInvoiceInfoTable.TableRefId));
# }
# }
# break;
# case tablenum(PurchTable):
# // This disables the VendInvoiceInfoTable data source if the PurchTable data source is disabled.
# // The PurchTable data source can become disabled in the super() method, which must run first,
# // because all of the PO's the user selected were rejected. See the comment in the super() method
# // about "selectedPOs == 0".
# chooseLines.query().dataSourceTable(tablenum(VendInvoiceInfoTable)).enabled(chooseLines.query().dataSourceTable(tablenum(PurchTable)).enabled());
# break;
# }
#}
ENDSOURCE
SOURCE #validateNum
#boolean validateNum(PurchParmTable _purchParmTable)
#{
# boolean ok = true;
# boolean ret;
#
# ret = super(_purchParmTable);
#
# if (_purchParmTable.Num)
# {
# if (VendParameters::find().CheckInvoice != ReuseVoucher::AcceptDuplicate)
# {
# ok = _purchParmTable.vendTable_OrderAccount().checkInvoice(_purchParmTable.Num, _purchParmTable.documentDate());
# }
# }
# if(ok && _purchParmTable.VendInvoiceSaveStatus != VendInvoiceSaveStatus::Pending && _purchParmTable.purchTable().isInterCompanyOrder())
# {
# this.recopyPurchMarkupTrans(_purchParmTable);
# }
#
# return ret;
#}
#
ENDSOURCE
SOURCE #vendAccountInQuery
#boolean vendAccountInQuery()
#{
# return false;
#}
ENDSOURCE
SOURCE #vendBankAccountId
#VendBankAccountId vendBankAccountId(PurchTable _purchTable)
#{
# return _purchTable.vendTable_InvoiceAccount().BankAccount;
#}
ENDSOURCE
SOURCE #writeCreditInvoicingJour
#protected void writeCreditInvoicingJour(PurchTable _purchTable)
#{
# CustVendCreditInvoicingTable custVendCreditInvoicingTable;
# CustVendCreditInvoicingJour custVendCreditInvoicingJour;
# ;
# if(VendParameters::find().CreditInvoicing)
# {
# if(_purchTable)
# {
# custVendCreditInvoicingTable = CustVendCreditInvoicingTable::findRefId(purchTable.TableId,
# purchTable.RecId,
# true);
# if(custVendCreditInvoicingTable)
# {
# custVendCreditInvoicingJour.insertFromCustVendCreditInvoicingTable(custVendCreditInvoicingTable,
# vendInvoiceJour);
# }
# }
# }
#}
ENDSOURCE
SOURCE #writeCreditInvoicingTrans
#protected void writeCreditInvoicingTrans(PurchLine _purchLine)
#{
# CustVendCreditInvoicingLine custVendCreditInvoicingLine;
# CustVendCreditInvoicingTrans custVendCreditInvoicingTrans;
# ;
# if(VendParameters::find().CreditInvoicing)
# {
# if(_purchLine)
# {
# custVendCreditInvoicingLine = CustVendCreditInvoicingLine::findRefId(purchLine.TableId,
# purchLine.RecId,
# true);
# if(custVendCreditInvoicingLine)
# {
# custVendCreditInvoicingTrans.insertFromCustVendCreditInvoicingLine(custVendCreditInvoicingLine,
# vendInvoiceTrans);
# }
# }
# }
#}
ENDSOURCE
SOURCE #writeJournal
#protected void writeJournal()
#{;
# vendInvoiceJour.initFromPurchTable(purchTable);
# vendInvoiceJour.initFromPurchParmTable(purchParmTable);
# if (ReverseChargeParameters_UK::find().rcEnabled)
# {
# vendInvoiceJour.initFromPurchTotals(purchTotals, ReverseCharge_invoice_UK::setReverseChargePurchTotal(purchTable.PurchId, purchParmLine.ParmId, purchParmLine.TableRefId));
# }
# else
# {
# vendInvoiceJour.initFromPurchTotals(purchTotals);
# }
#
# vendInvoiceJour.InterCompanyLedgerVoucher = this.interCompanyVoucher();
#
# vendInvoiceJour.calcDue();
# vendInvoiceJour.write();
#
# this.writeCreditInvoicingJour(purchTable);
#
# journalList.ins(vendInvoiceJour);
#
# this.writeTmpTaxWorkTrans(vendInvoiceJour.RecId);
#
# this.writeJournalPurchLink();
#
# TradeBLWIFormCodes::initClassFromVend(vendInvoiceJour, TradeBLWITypeOfForm::VendInvoiceJour, TradeBLWITypeOfForm::PurchTable);
#}
ENDSOURCE
SOURCE #writeJournalLine
#protected void writeJournalLine()
#{;
# super();
#
# vendInvoiceTrans.QtyPhysical = invoiceUpdatedOnly;
# vendInvoiceTrans.InventQty = updateNowInvent;
# vendInvoiceTrans.LineAmount = lineValue;
# vendInvoiceTrans.LineAmountTax = lineValueInclTax - lineValue;
# vendInvoiceTrans.PartDelivery = !(purchLine.PurchStatus == PurchStatus::Invoiced &&
# purchLine.PurchQty == vendInvoiceTrans.Qty);
#
# if(!this.proforma())
# {
# this.addToInventReportDimHistory(vendInvoiceTrans);
# }
#
# vendInvoiceTrans.write();
#
# this.writeCreditInvoicingTrans(purchLine);
#
# if (vendInvoiceTrans.QtyPhysical && purchLine.salesLine().SalesType == SalesType::ItemReq)
# {
# journalTransList.ins(vendInvoiceTrans);
# }
#}
#
ENDSOURCE
SOURCE #writeJournalPurchLink
#void writeJournalPurchLink()
#{
# PurchParmLine localPurchParmLine;
# VendInvoicePurchLink vendInvoicePurchLink;
# ;
#
# ttsbegin;
#
# while select localPurchParmLine
# group by OrigPurchId
# where localPurchParmLine.ParmId == purchParmTable.ParmId
# && localPurchParmLine.TableRefId == purchParmTable.TableRefId
# {
# vendInvoicePurchLink.clear();
# vendInvoicePurchLink.initFromPurchParmLine (localPurchParmLine);
# vendInvoicePurchLink.initFromVendInvoiceJour (vendInvoiceJour);
# vendInvoicePurchLink.insert();
# }
#
# ttscommit;
#}
ENDSOURCE
SOURCE #description
#static ClassDescription description()
#{
# return "@SYS23176";
#}
ENDSOURCE
ENDMETHODS
ENDCLASS
en-us
Posting has been canceled.
@SYS21533
0
0
he
הרישום בוטל.
@SYS21533
0
0
en-us
Import portfolio lines has no cost allocations.
@BPL66
0
0
he
לא התבצעה העמסה על שורת תיק היבוא.
@BPL66
0
0
en-us
Import portfolio %1 has cost lines with no cost allocation
@BPL87
0
0
he
לא התבצעה כל העמסות על שורת תיק היבוא %1
@BPL87
0
0
en-us
Transaction has already been posted.
@SYS23025
0
0
he
התנועה כבר נרשמה.
@SYS23025
0
0
en-us
Update quantity is greater than remaining quantity on order line.
@SYS109412
0
0
he
הכמות לעדכון גדולה מהכמות הנותרת בשורת ההזמנה.
@SYS109412
0
0
en-us
Multiple lines on invoice %1 refer to the same purchase order line
@SYS122954
0
0
he
שורות מרובות בחשבונית %1 מפנות לשורת הזמנת רכש זהה
@SYS122954
0
0
en-us
A purchase order cannot be updated by separate lines on the same invoice.
@SYS122955
0
0
he
אין אפשרות לעדכן הזמנת רכש לפי שורות נפרדות באותה חשבונית.
@SYS122955
0
0
en-us
Either combine the invoice lines, or move one to a separate invoice.
@SYS122956
0
0
he
שלב בין השורות או העבר אחת מהן לחשבונית נפרדת.
@SYS122956
0
0
en-us
Purchase %1 does not exist.
@SYS15741
0
0
he
רכישה %1 אינה קיימת.
@SYS15741
0
0
en-us
Purchase %1 has no account reference for the vendor table.
@SYS19291
0
0
he
ברכישה %1 אין אסמכתא לחשבון עבור טבלת הספק.
@SYS19291
0
0
en-us
Account reference %1 for purchase %2 does not exist.
@SYS19292
0
0
he
אסמכתא %1 לחשבון עבור רכישה %2 אינה קיימת.
@SYS19292
0
0
en-us
Purchase %1 has no invoice account reference for the vendor table.
@SYS19293
0
0
he
ברכישה %1 אין אסמכתא לחשבון חשבוניות עבור טבלת הספק.
@SYS19293
0
0
en-us
Invoice account reference %1 in purchase %2 does not exist.
@SYS19294
0
0
he
אסמכתא %1 לחשבון חשבוניות ברכישה %2 אינה קיימת.
@SYS19294
0
0
en-us
Currency code %1 for purchase %2 does not exist.
@SYS19295
0
0
he
קוד מטבע %1 עבור רכישה %2 אינו קיים.
@SYS19295
0
0
en-us
Tax exempt number for purchase order %1 not specified.
@SYS54453
0
0
he
לא צוין מספר פטור ממס עבור הזמנת רכש %1.
@SYS54453
0
0
en-us
Document date has not been specified
@SYS95922
0
0
he
לא צוין תאריך מסמך.
@SYS95922
0
0
en-us
Document date is greater than the posting date
@SYS95923
0
0
he
תאריך המסמך גדול מתאריך הרישום
@SYS95923
0
0
en-us
Insufficient inventory transactions with status %1.
@SYS54028
0
0
he
תנועות מלאי עם מצב %1 שאינן מספיקות.
@SYS54028
0
0
en-us
Compare purchase order and invoice values
MiscChgs: Label for the MarkupUseInMatching enumerated data type
@SYS115807
0
0
he
השווה ערכים של הזמנת רכש וחשבונית
MiscChgs: Label for the MarkupUseInMatching enumerated data type
@SYS115807
0
0
en-us
Invoice %1 could not post because it contained matching errors which must be approved.
@SYS117291
0
0
he
לא היתה אפשרות לרשום את החשבונית %1 מכיוון שהיא הכילה שגיאות התאמה שיש לאשר.
@SYS117291
0
0
en-us
Cannot find invoice %1 in company %2 with parmId = %3.
Intercompany
@SYS94315
0
0
he
אין אפשרות למצוא את החשבונית %1 בחברה %2 עם parmId = %3.
Intercompany
@SYS94315
0
0
en-us
Sales invoice in company %1 = %2, purchase is updated with %3.
Intercompany
@SYS94316
0
0
he
חשבונית מכירה בחברה %1 = %2, הרכישה עודכנה עם %3.
Intercompany
@SYS94316
0
0
en-us
One or more pending invoices cannot be displayed because they are in use.
@SYS112584
0
0
he
אין אפשרות להציג חשבונית ממתינה אחת או יותר מכיוון שהן נמצאות בשימוש.
@SYS112584
0
0
en-us
Update has been canceled.
@SYS18447
0
0
he
העדכון בוטל.
@SYS18447
0
0
en-us
Consume items for the project immediately.
@SYS70024
0
0
he
צרוך פריטים עבור הפרוייקט מיידית.
@SYS70024
0
0
en-us
Voucher number cannot be selected automatically.
@SYS71652
0
0
he
אין אפשרות לבחור מספר שובר באופן אוטומטי.
@SYS71652
0
0
en-us
Number sequence %1 is not a continuous number sequence.
@SYS26207
0
0
he
רצף מספרים %1 אינו רצף מספרים רציף.
@SYS26207
0
0
en-us
Misc. charges that are of the type Item have not been allocated.
MiscChgs: Error messsage when a PO Header has item MarkupTrans not yet redistributed to the PO's lines.
@SYS115806
0
0
he
חיובים שונים שהם מסוג 'פריט' לא הוקצו.
MiscChgs: Error messsage when a PO Header has item MarkupTrans not yet redistributed to the PO's lines.
@SYS115806
0
0
en-us
Invoice must be specified for purchase %1
@SYS23051
0
0
he
יש לציין חשבונית עבור רכישה %1
@SYS23051
0
0
en-us
%1 %2
@SYS76498
0
0
he
%1 %2
@SYS76498
0
0
en-us
Purchase order
@SYS15812
0
0
he
הזמנת רכש
@SYS15812
0
0
en-us
The inventory quantity to match for packing slip %1 item %2 cannot be reserved.
@SYS111789
0
0
he
אין אפשרות לשריין את כמות המלאי שיש להתאים עבור פריט %2 של תעודת משלוח %1 .
@SYS111789
0
0
en-us
Cannot reserve packing slip quantity
@SYS112742
0
0
he
אין אפשרות לשריין כמות של תעודות משלוח
@SYS112742
0
0
en-us
Invoice line: item %1
@SYS112743
0
0
he
שורת חשבונית: פריט %1
@SYS112743
0
0
en-us
Reverse charge transaction - Transaction has been posted without a VAT number.
@SYS125408
0
0
he
תנועת היפוך חיוב - התנועה נרשמה ללא מספר מע"מ.
@SYS125408
0
0
en-us
Purchase order - Invoice
@SYS25471
0
0
he
הזמנת רכש - חשבונית
@SYS25471
0
0
en-us
Invoicing failed because destructive quality orders are still open.
@SYS114216
0
0
he
הפקת החשבונית נכשלה מכיוון שהזמנות איכות הרסניות עדיין פתוחות.
@SYS114216
0
0
en-us
No account is specified for vendor cash discount
Translate into Spanish. Use in feature Spanish cash discount
@SYS99049
0
0
he
לא צוין חשבון עבור הנחת מזומן של ספק
Translate into Spanish. Use in feature Spanish cash discount
@SYS99049
0
0
en-us
Status was not changed to Invoiced because one or more pending invoices exist.
@SYS113195
0
0
he
המצב לא השתנה ל'חויב' מכיוון שקיימות אחת או יותר חשבוניות ממתינות.
@SYS113195
0
0
en-us
Status was not changed to Canceled because one or more pending invoices exist.
@SYS113196
0
0
he
המצב לא השתנה ל'בוטל' מכיוון שקיימות אחת או יותר חשבוניות ממתינות.
@SYS113196
0
0
en-us
Posting
ES: Registrar
@SYS25781
0
0
he
רישום
ES: Registrar
@SYS25781
0
0
en-us
Purchase invoice
@SYS23176
0
0
he
חשבונית רכישה
@SYS23176
0
0
***Element: CLS
; Microsoft Dynamics AX Class: AxPurchLine unloaded
; --------------------------------------------------------------------------------
CLSVERSION 1
CLASS #AxPurchLine
Id 6751
PROPERTIES
Name #AxPurchLine
Extends #AxInternalBase
RunOn #Called from
ENDPROPERTIES
METHODS
Version: 3
SOURCE #AxInventDim
#public AxInventDim_PurchLine axInventDim(AxInventDim_PurchLine _axInventDim = axInventDim)
#{
# ;
# axInventDim = _axInventDim;
#
# return axInventDim;
#}
#
ENDSOURCE
SOURCE #AxOrig
#public AxPurchLine axOrig()
#{
# return super();
#}
ENDSOURCE
SOURCE #AxPurchTable
#public AxPurchTable axPurchTable(AxPurchTable _axPurchTable = null)
#{
# AxPurchTable axPurchTable;
#
# if (!axPurchTableIdx)
# {
# axPurchTableIdx = this.nextCacheIdx();
# }
#
# if (!prmisdefault(_axPurchTable))
# {
# this.classCacheInsert(axPurchTableIdx, _axPurchTable);
# axPurchTable = _axPurchTable;
# }
# else
# {
# if (this.classCacheExist(axPurchTableIdx))
# {
# axPurchTable = this.classCacheLookup(axPurchTableIdx);
# }
# else
# {
# this.setPurchId();
# axPurchTable = PurchTable::find(this.parmPurchId()).axPurchTable();
#
# this.classCacheInsert(axPurchTableIdx, axPurchTable);
# }
# }
#
# return axPurchTable;
#}
#
ENDSOURCE
SOURCE #classDeclaration
#class AxPurchLine extends AxInternalBase implements AxInventSiteDimensionable
#{
# PurchLine purchLine;
# AxInventDim_PurchLine axInventDim;
#
# int inventItemBarcodeIdx;
# int inventTableIdx;
# int purchParametersIdx;
# int priceParametersIdx;
# int returnActionDefaultsIdx;
#
# int axPurchTableIdx;
# int priceDisc_PriceIdx;
# int priceDisc_LineDiscIdx;
# int vendExternalItemDescriptionIdx;
# int zipCodeIdx;
# str county;
# str state;
# str item;
# LineNum lineNum;
#}
#
ENDSOURCE
SOURCE #createOrUpdateRelatedRecords
#protected void createOrUpdateRelatedRecords()
#{
# if (this.isSetMethodsCalledFromSave())
# {
# InventMovement::bufferSetRemainQty(this.currentRecord());
#
# this.setAxPurchTableFields();
# if (this.axPurchTable().isFieldModified(fieldnum(PurchTable, MarkupGroup)) || this.axPurchTable().isFieldModified(fieldnum(PurchTable, OrderAccount)))
# {
# this.purchLine().createMarkupTrans(this.axPurchTable().purchTable());
# }
# }
#}
ENDSOURCE
SOURCE #currentRecord
#public PurchLine currentRecord(PurchLine _purchLine = purchLine)
#{
# if (!prmisdefault(_purchLine))
# {
# super(_purchLine);
# purchLine = _purchLine;
# }
# else
# {
# super();
# }
#
# return purchLine;
#}
#
ENDSOURCE
SOURCE #dimensionElement
#public SysDim dimensionElement(int _array, SysDim _dimensionElement = '')
#{
# if (_array <1 || _array > new SysDictField(tablenum(PurchLine), fieldnum(PurchLine, Dimension)).arraySize())
# {
# return '';
# }
#
# if (!prmisdefault(_dimensionElement))
# {
# this.setField(new SysDictField(tablenum(PurchLine), fieldnum(PurchLine, Dimension), _array).id(), _dimensionElement);
# }
#
# return purchLine.Dimension[_array];
#}
ENDSOURCE
SOURCE #emptyRecord
#protected PurchLine emptyRecord()
#{
# PurchLine localPurchLine;
# return localPurchLine;
#}
#
ENDSOURCE
SOURCE #end
#public void end()
#{
# super();
# lineNum = 0;
#}
ENDSOURCE
SOURCE #initMandatoryFieldsExemptionList
#protected void initMandatoryFieldsExemptionList()
#{
# super();
# this.setParmMethodAsNotMandatory(methodstr(AxPurchLine,parmPurchId));
# this.setParmMethodAsNotMandatory(methodstr(AxPurchLine,parmVendGroup));
# this.setParmMethodAsNotMandatory(methodstr(AxPurchLine,parmCurrencyCode));
# this.setParmMethodAsNotMandatory(methodstr(AxPurchLine,parmVendAccount));
#}
ENDSOURCE
SOURCE #InventItemBarcodeRecord
#public InventItemBarcode inventItemBarcodeRecord(InventItemBarcode _inventItemBarcode = null)
#{
# InventItemBarcode inventItemBarcode;
#
# if (!inventItemBarcodeIdx)
# {
# inventItemBarcodeIdx = this.nextCacheIdx();
# }
#
# if (!prmisdefault(_inventItemBarcode))
# {
# this.tableCacheInsert(inventItemBarcodeIdx, _inventItemBarcode);
# inventItemBarcode = _inventItemBarcode;
# }
# else
# {
# if (this.tableCacheExist(inventItemBarcodeIdx))
# {
# inventItemBarcode = this.tableCacheLookup(inventItemBarcodeIdx);
# }
# else
# {
# this.setInventItemBarcodeRecordFields();
# inventItemBarcode = InventItemBarcode::findPurchBarcode(this.parmItemId());
# this.tableCacheInsert(inventItemBarcodeIdx, inventItemBarcode);
# }
# }
#
# return inventItemBarcode;
#}
#
#
ENDSOURCE
SOURCE #inventSiteDimensionLink
#protected InventSiteDimensionLink inventSiteDimensionLink()
#{
# ;
# return InventSiteDimensionLink::newDimensionTables(this.purchLine(), this.axInventDim().inventDim());
#}
ENDSOURCE
SOURCE #inventTableRecord
#public InventTable inventTableRecord(InventTable _inventTable = null)
#{
# InventTable inventTable;
#
# if (!inventTableIdx)
# {
# inventTableIdx = this.nextCacheIdx();
# }
#
# if (!prmisdefault(_inventTable))
# {
# this.tableCacheInsert(inventTableIdx, _inventTable);
# inventTable = _inventTable;
# }
# else
# {
# if (this.tableCacheExist(inventTableIdx))
# {
# inventTable = this.tableCacheLookup(inventTableIdx);
# }
# else
# {
# this.setInventTableRecordFields();
# inventTable = InventTable::find(this.parmItemId());
# this.tableCacheInsert(inventTableIdx, inventTable);
# }
# }
#
# return inventTable;
#}
#
ENDSOURCE
SOURCE #isAxPurchTableFieldsSet
#public boolean isAxPurchTableFieldsSet()
#{
# return this.isFieldSet(fieldnum(PurchLine, PurchId));
#}
ENDSOURCE
SOURCE #isInventItemBarcodeRecordFieldsSet
#protected boolean isInventItemBarcodeRecordFieldsSet()
#{
# return this.isFieldSet(fieldnum(PurchLine, ItemId));
#}
ENDSOURCE
SOURCE #isInventTableRecordFieldsSet
#public boolean isInventTableRecordFieldsSet()
#{
# return this.isFieldSet(fieldnum(PurchLine, ItemId));
#}
ENDSOURCE
SOURCE #isPriceDisc_FieldsEmpty
#public boolean isPriceDisc_FieldsEmpty()
#{
# return purchLine.PurchPrice == 0
# && purchLine.PurchMarkup == 0
# && purchLine.LinePercent == 0
# && purchLine.LineDisc == 0
# && purchLine.MultiLnPercent == 0
# && purchLine.MultiLnDisc == 0;
#}
ENDSOURCE
SOURCE #isPriceDisc_LineDiscFieldsSet
#protected boolean isPriceDisc_LineDiscFieldsSet()
#{
# return this.isFieldSet(fieldnum(PurchLine, ItemId)) ||
# this.isFieldSet(fieldnum(PurchLine, PurchUnit)) ||
# this.isFieldSet(fieldnum(PurchLine, PurchQty)) ||
# (this.axPurchTable().isFieldModified(fieldnum(PurchTable, OrderAccount)) &&
# this.priceParametersRecord().isPurchLineDiscVendAccountActive()) ||
# (this.axPurchTable().isFieldModified(fieldnum(PurchTable, LineDisc)) &&
# this.priceParametersRecord().isPurchLineDiscGroupActive()) ||
# this.isInventTableRecordFieldsSet() ||
# (this.isInventTableRecordFieldsSet() &&
# this.inventTableRecord().purchLineDisc() != this.axOrig().inventTableRecord().purchLineDisc()) ||
# this.axInventDim().isPurchPriceDiscFieldsSet(this.inventTableRecord());
#}
ENDSOURCE
SOURCE #isPriceDisc_PriceFieldsSet
#protected boolean isPriceDisc_PriceFieldsSet()
#{
# return this.isFieldSet(fieldnum(PurchLine, ItemId)) ||
# this.isFieldSet(fieldnum(PurchLine, PurchUnit)) ||
# this.isFieldSet(fieldnum(PurchLine, PurchQty)) ||
# this.isInventTableRecordFieldsSet() ||
# (this.axPurchTable().isFieldModified(fieldnum(PurchTable, OrderAccount)) &&
# this.priceParametersRecord().isPurchPriceVendAccountActive()) ||
# (this.axPurchTable().isFieldModified(fieldnum(PurchTable, PriceGroupId)) &&
# this.priceParametersRecord().isPurchPriceGroupActive()) ||
# this.axInventDim().isPurchPriceDiscFieldsSet(this.inventTableRecord());
#}
ENDSOURCE
SOURCE #isReturnActionDefaultsRecordFieldsSet
#public boolean isReturnActionDefaultsRecordFieldsSet()
#{
# return this.isFieldSet(fieldnum(PurchLine, ReturnActionId));
#}
ENDSOURCE
SOURCE #isStorageDimFieldSet
#public boolean isStorageDimFieldSet(fieldId _fieldId)
#{
# return this.axInventDim().isFieldSet(_fieldId);
#}
ENDSOURCE
SOURCE #isVendExternalItemDescriptionFieldsSet
#protected boolean isVendExternalItemDescriptionFieldsSet()
#{
# return this.isFieldSet(fieldnum(PurchLine, ItemId)) ||
# this.axInventDim().isFieldSet(fieldnum(InventDim, ConfigId)) ||
# this.axPurchTable().isFieldModified(fieldnum(PurchTable, OrderAccount));
#}
ENDSOURCE
SOURCE #isZipCodeRecordFieldsSet
#protected boolean isZipCodeRecordFieldsSet()
#{
#;
# return (this.isFieldSet(fieldnum(PurchLine, DeliveryZipCode))
# || this.isFieldSet(fieldnum(PurchLine, DeliveryCity))
# || this.isFieldSet(fieldnum(PurchLine, DeliveryCountryRegionId)));
#}
ENDSOURCE
SOURCE #new
#void new()
#{
# ;
# axInventDim = AxInventDim_PurchLine::newAxPurchLine(this);
#
# super();
#}
ENDSOURCE
SOURCE #parmActivityNumber
#public ProjActivityNumber parmActivityNumber(ProjActivityNumber _activityNumber = '')
#{
# if (!prmisdefault(_activityNumber))
# {
# this.setField(fieldnum(PurchLine, ActivityNumber), _activityNumber);
# }
#
# return purchLine.ActivityNumber;
#}
#
ENDSOURCE
SOURCE #parmAddressRefRecId
#public AddressRefRecId parmAddressRefRecId(AddressRefRecId _addressRefRecId = 0)
#{
# if (!prmisdefault(_addressRefRecId))
# {
# this.setField(fieldnum(PurchLine, AddressRefRecId), _addressRefRecId);
# }
#
# return purchLine.AddressRefRecId;
#}
#
ENDSOURCE
SOURCE #parmAddressRefTableId
#public AddressRefTableId parmAddressRefTableId(AddressRefTableId _addressRefTableId = 0)
#{
# if (!prmisdefault(_addressRefTableId))
# {
# this.setField(fieldnum(PurchLine, AddressRefTableId), _addressRefTableId);
# }
#
# return purchLine.AddressRefTableId;
#}
#
ENDSOURCE
SOURCE #parmAssetBookId
#public AssetBookIdPurchSalesInvent parmAssetBookId(AssetBookIdPurchSalesInvent _assetBookId = '')
#{
# if (!prmisdefault(_assetBookId))
# {
# this.setField(fieldnum(PurchLine, AssetBookId), _assetBookId);
# }
#
# return purchLine.AssetBookId;
#}
#
ENDSOURCE
SOURCE #parmAssetGroup
#public AssetGroupId parmAssetGroup(AssetGroupId _assetGroup = '')
#{
# ;
#
# if (!prmisdefault(_assetGroup))
# {
# this.setField(fieldnum(PurchLine, AssetGroup), _assetGroup);
# }
#
# return purchLine.AssetGroup;
#}
ENDSOURCE
SOURCE #parmAssetId
#public AssetIdOpen parmAssetId(AssetIdOpen _assetId = '')
#{
# if (!prmisdefault(_assetId))
# {
# this.setField(fieldnum(PurchLine, AssetId), _assetId);
# }
#
# return purchLine.AssetId;
#}
#
ENDSOURCE
SOURCE #parmAssetTransTypePurch
#public AssetTransTypePurchEDT parmAssetTransTypePurch(AssetTransTypePurchEDT _assetTransTypePurch = AssetTransTypePurch::Acquisition)
#{
# if (!prmisdefault(_assetTransTypePurch))
# {
# this.setField(fieldnum(PurchLine, AssetTransTypePurch), _assetTransTypePurch);
# }
#
# return purchLine.AssetTransTypePurch;
#}
#
ENDSOURCE
SOURCE #parmBarCode
#public PurchBarCode parmBarCode(PurchBarCode _barCode = '')
#{
# if (!prmisdefault(_barCode))
# {
# this.setField(fieldnum(PurchLine, BarCode), _barCode);
# }
#
# return purchLine.BarCode;
#}
#
ENDSOURCE
SOURCE #parmBarCodeType
#public BarcodeSetupId parmBarCodeType(BarcodeSetupId _barCodeType = '')
#{
# if (!prmisdefault(_barCodeType))
# {
# this.setField(fieldnum(PurchLine, BarCodeType), _barCodeType);
# }
#
# return purchLine.BarCodeType;
#}
#
ENDSOURCE
SOURCE #parmBlanketRefTransId
#public PurchBlanketRefTransId parmBlanketRefTransId(PurchBlanketRefTransId _blanketRefTransId = '')
#{
# if (!prmisdefault(_blanketRefTransId))
# {
# this.setField(fieldnum(PurchLine, BlanketRefTransId), _blanketRefTransId);
# }
#
# return purchLine.BlanketRefTransId;
#}
#
ENDSOURCE
SOURCE #parmBlocked
#public LineStopped parmBlocked(LineStopped _blocked = NoYes::No)
#{
# if (!prmisdefault(_blocked))
# {
# this.setField(fieldnum(PurchLine, Blocked), _blocked);
# }
#
# return purchLine.Blocked;
#}
#
ENDSOURCE
SOURCE #parmCaseTagging
#public RFIDCaseTagging parmCaseTagging(RFIDCaseTagging _caseTagging = NoYes::No)
#{
# if (!prmisdefault(_caseTagging))
# {
# this.setField(fieldnum(PurchLine, CaseTagging), _caseTagging);
# }
#
# return purchLine.CaseTagging;
#}
#
ENDSOURCE
SOURCE #parmComplete
#public LineComplete parmComplete(LineComplete _complete = NoYes::No)
#{
# if (!prmisdefault(_complete))
# {
# this.setField(fieldnum(PurchLine, Complete), _complete);
# }
#
# return purchLine.Complete;
#}
#
ENDSOURCE
SOURCE #parmConfirmedDlv
#public PurchLineDlvDate parmConfirmedDlv(PurchLineDlvDate _confirmedDlv = dateNull())
#{
# if (!prmisdefault(_confirmedDlv))
# {
# this.setField(fieldnum(PurchLine, ConfirmedDlv), _confirmedDlv);
# // Israel-Localisation-Prodware-ImportFolder-Begin
# purchLine.BPLmodifyDeliveryDates(fieldnum(PurchLine, ConfirmedDlv));
# // Israel-Localisation-Prodware-ImportFolder-End
# }
# return purchLine.ConfirmedDlv;
#}
#
ENDSOURCE
SOURCE #parmCountyOrigDest
#public AddressCountyOrigDest parmCountyOrigDest(AddressCountyOrigDest _countyOrigDest = '')
#{
# if (!prmisdefault(_countyOrigDest))
# {
# this.setField(fieldnum(PurchLine, CountyOrigDest), _countyOrigDest);
# }
#
# return purchLine.CountyOrigDest;
#}
ENDSOURCE
SOURCE #parmCovRef
#public PurchCovRef parmCovRef(PurchCovRef _covRef = PurchCovRef::None)
#{
# if (!prmisdefault(_covRef))
# {
# this.setField(fieldnum(PurchLine, CovRef), _covRef);
# }
#
# return purchLine.CovRef;
#}
#
ENDSOURCE
SOURCE #parmCreateFixedAsset
#public NoYes parmCreateFixedAsset(NoYes _createFixedAsset = NoYes::No)
#{
# ;
#
# if (!prmisdefault(_createFixedAsset))
# {
# this.setField(fieldnum(PurchLine, CreateFixedAsset), _createFixedAsset);
# }
#
# return purchLine.CreateFixedAsset;
#}
#
ENDSOURCE
SOURCE #parmCurrencyCode
#public str parmCurrencyCode(str _currencyCode = '')
#{
# DictField dictField;
# ;
# if (!prmisdefault(_currencyCode))
# {
# dictField = new DictField(tablenum(PurchLine), fieldnum(PurchLine, CurrencyCode));
# this.validateInboundCurrencyString(_currencyCode,dictField);
#
# if(this.valueMappingInbound())
# {
# _currencyCode = this.axCurrencyCode(_currencyCode);
#
# }
#
# this.setField(fieldnum(PurchLine, CurrencyCode), _currencyCode);
# }
#
# if (this.valueMappingOutbound())
# {
# return this.axCurrencyCode(purchLine.CurrencyCode);
# }
# else
# {
# return purchLine.CurrencyCode;
# }
#}
#
ENDSOURCE
SOURCE #parmCustomerRef
#public CustRefLine parmCustomerRef(CustRefLine _customerRef = '')
#{
# if (!prmisdefault(_customerRef))
# {
# this.setField(fieldnum(PurchLine, CustomerRef), _customerRef);
# }
#
# return purchLine.CustomerRef;
#}
#
ENDSOURCE
SOURCE #parmCustPurchaseOrderFormNum
#public CustPurchaseOrder parmCustPurchaseOrderFormNum(CustPurchaseOrder _custPurchaseOrderFormNum = '')
#{
# if (!prmisdefault(_custPurchaseOrderFormNum))
# {
# this.setField(fieldnum(PurchLine, CustPurchaseOrderFormNum), _custPurchaseOrderFormNum);
# }
#
# return purchLine.CustPurchaseOrderFormNum;
#}
#
ENDSOURCE
SOURCE #parmDeliveryAddress
#public Addressing parmDeliveryAddress(Addressing _deliveryAddress = '')
#{
# if (!prmisdefault(_deliveryAddress))
# {
# this.setField(fieldnum(PurchLine, DeliveryAddress), _deliveryAddress);
# }
#
# return purchLine.DeliveryAddress;
#}
#
ENDSOURCE
SOURCE #parmDeliveryCity
#public AddressCity parmDeliveryCity(AddressCity _deliveryCity = '')
#{
# if (!prmisdefault(_deliveryCity))
# {
# this.setField(fieldnum(PurchLine, DeliveryCity), _deliveryCity);
# }
#
# return purchLine.DeliveryCity;
#}
#
ENDSOURCE
SOURCE #parmDeliveryCountryRegionId
#public str parmDeliveryCountryRegionId(str _deliveryCountryRegionId = '')
#{
# DictField dictField;
# ;
# if (!prmisdefault(_deliveryCountryRegionId))
# {
# dictField = new DictField(tablenum(PurchLine),fieldnum(PurchLine,DeliveryCountryRegionId));
# if(this.valueMappingInbound())
# {
# this.validateInboundString(_deliveryCountryRegionId,dictField,this.mapPolicy().xMLMapCountryRegion());
# _deliveryCountryRegionId = this.axAddressCountryRegionId(_deliveryCountryRegionId);
# }
# else
# {
# this.validateInboundString(_deliveryCountryRegionId,dictField);
# }
#
# this.setField(fieldnum(PurchLine, DeliveryCountryRegionId), _deliveryCountryRegionId);
# }
#
# if ( this.valueMappingOutbound())
# {
# return this.axAddressCountryRegionId(purchLine.DeliveryCountryRegionId);
# }
# else
# {
# return purchLine.DeliveryCountryRegionId;
# }
#}
#
ENDSOURCE
SOURCE #parmDeliveryCounty
#public str parmDeliveryCounty(str _deliveryCounty = '')
#{
# DictField dictField;
# ;
# if (!prmisdefault(_deliveryCounty))
# {
# dictField = new DictField(tablenum(PurchLine),fieldnum(PurchLine,DeliveryCounty));
# if(this.valueMappingInbound())
# {
# county = _deliveryCounty;
# this.validateInboundString(_deliveryCounty,dictField,this.mapPolicy().xMLMapCounty());
# }
# else
# {
# this.validateInboundString(_deliveryCounty,dictField);
# }
#
# this.setField(fieldnum(PurchLine, DeliveryCounty), _deliveryCounty);
# }
#
# if (this.valueMappingOutbound())
# {
# return this.axAddressCountyId(purchLine.DeliveryCounty,purchLine.DeliveryCountryRegionId,purchLine.DeliveryState);
# }
# else
# {
# return purchLine.DeliveryCounty;
# }
#}
#
ENDSOURCE
SOURCE #parmDeliveryDate
#public PurchLineDlvDate parmDeliveryDate(PurchLineDlvDate _deliveryDate = dateNull())
#{
# if (!prmisdefault(_deliveryDate))
# {
# this.setField(fieldnum(PurchLine, DeliveryDate), _deliveryDate);
# // Israel-Localisation-Prodware-ImportFolder-Begin
# purchLine.BPLmodifyDeliveryDates(fieldnum(PurchLine, DeliveryDate));
# // Israel-Localisation-Prodware-ImportFolder-End
# }
#
# return purchLine.DeliveryDate;
#}
#
ENDSOURCE
SOURCE #parmDeliveryName
#public Name parmDeliveryName(Name _deliveryName = '')
#{
# if (!prmisdefault(_deliveryName))
# {
# this.setField(fieldnum(PurchLine, DeliveryName), _deliveryName);
# }
#
# return purchLine.DeliveryName;
#}
#
ENDSOURCE
SOURCE #parmDeliveryState
#public str parmDeliveryState(str _deliveryState = '')
#{
# DictField dictField;
# ;
# if (!prmisdefault(_deliveryState))
# {
# dictField = new DictField(tablenum(PurchLine), fieldnum(PurchLine, DeliveryState));
# if(this.valueMappingInbound())
# {
# state = _deliveryState;
# this.validateInboundString(_deliveryState,dictField,this.mapPolicy().xMLMapState());
# }
# else
# {
# this.validateInboundString(_deliveryState,dictField);
# }
#
# this.setField(fieldnum(PurchLine, DeliveryState), _deliveryState);
# }
#
# if (this.valueMappingOutbound())
# {
# return this.axAddressStateId(purchLine.DeliveryState, purchLine.DeliveryCountryRegionId);
# }
# else
# {
# return purchLine.DeliveryState;
# }
#}
#
ENDSOURCE
SOURCE #parmDeliveryStreet
#public AddressStreet parmDeliveryStreet(AddressStreet _deliveryStreet = '')
#{
# if (!prmisdefault(_deliveryStreet))
# {
# this.setField(fieldnum(PurchLine, DeliveryStreet), _deliveryStreet);
# }
#
# return purchLine.DeliveryStreet;
#}
#
ENDSOURCE
SOURCE #parmDeliveryType
#public TradeLineDlvTypeId parmDeliveryType(TradeLineDlvTypeId _deliveryType = TradeLineDlvType::None)
#{
# if (!prmisdefault(_deliveryType))
# {
# this.setField(fieldnum(PurchLine, DeliveryType), _deliveryType);
# }
#
# return purchLine.DeliveryType;
#}
#
ENDSOURCE
SOURCE #parmDeliveryZipCode
#public str parmDeliveryZipCode(str _deliveryZipCode = '')
#{
# DictField dictField;
# ;
# if (!prmisdefault(_deliveryZipCode))
# {
# dictField = new DictField(tablenum(PurchLine),fieldnum(PurchLine,DeliveryZipCode));
# if(this.valueMappingInbound())
# {
# this.validateInboundString(_deliveryZipCode,dictField,this.mapPolicy().xMLMapZipCode());
# _deliveryZipCode = this.axAddressZipCodeId(_deliveryZipCode);
# }
# else
# {
# this.validateInboundString(_deliveryZipCode,dictField);
# }
#
# this.setField(fieldnum(PurchLine, DeliveryZipCode), _deliveryZipCode);
# }
#
# if (this.valueMappingOutbound())
# {
# return this.axAddressZipCodeId(purchLine.DeliveryZipCode);
# }
# else
# {
# return purchLine.DeliveryZipCode;
# }
#}
#
ENDSOURCE
SOURCE #parmDepreciationStartDate
#public AssetDepreciationStartDate parmDepreciationStartDate(AssetDepreciationStartDate _depreciationStartDate = dateNull())
#{
# if (!prmisdefault(_depreciationStartDate))
# {
# this.setField(fieldnum(PurchLine, DepreciationStartDate), _depreciationStartDate);
# }
#
# return purchLine.DepreciationStartDate;
#}
#
ENDSOURCE
SOURCE #parmDimension
#public Dimension parmDimension(Dimension _dimension = Dimensions::emptyDimension())
#{
# ;
# if (!prmisdefault(_dimension))
# {
# this.inventSiteDimensionLink().axParmDimensionSet(this, _dimension);
# }
#
# return purchLine.Dimension;
#}
#
ENDSOURCE
SOURCE #parmExternalItemId
#public PurchExternalItemId parmExternalItemId(PurchExternalItemId _externalItemId = '')
#{
# if (!prmisdefault(_externalItemId))
# {
# this.setField(fieldnum(PurchLine, ExternalItemId), _externalItemId);
# }
#
# return purchLine.ExternalItemId;
#}
#
ENDSOURCE
SOURCE #parmGSTHSTTaxType_CA
#//
#public GSTHSTTaxType_CA parmGSTHSTTaxType_CA(GSTHSTTaxType_CA _gstHSTTaxType = GSTHSTTaxType_CA::None)
#{
# if (!prmisdefault(_gstHSTTaxType))
# {
# this.setField(fieldnum(PurchLine, GSTHSTTaxType_CA), _gstHSTTaxType);
# }
#
# return purchLine.GSTHSTTaxType_CA;
#}
#//
ENDSOURCE
SOURCE #parmInterCompanyInventTransId
#public InventTransId parmInterCompanyInventTransId(InventTransId _interCompanyInventTransId = '')
#{
# if (!prmisdefault(_interCompanyInventTransId))
# {
# this.setField(fieldnum(PurchLine, InterCompanyInventTransId), _interCompanyInventTransId);
# }
#
# return purchLine.InterCompanyInventTransId;
#}
#
ENDSOURCE
SOURCE #parmInterCompanyOrigin
#public InterCompanyOrigin parmInterCompanyOrigin(InterCompanyOrigin _interCompanyOrigin = InterCompanyOrigin::Source)
#{
# if (!prmisdefault(_interCompanyOrigin))
# {
# this.setField(fieldnum(PurchLine, InterCompanyOrigin), _interCompanyOrigin);
# }
#
# return purchLine.InterCompanyOrigin;
#}
#
ENDSOURCE
SOURCE #parmInventDimId
#public InventDimId parmInventDimId(InventDimId _inventDimId = '')
#{
# if (!prmisdefault(_inventDimId))
# {
# this.setField(fieldnum(PurchLine, InventDimId), _inventDimId);
# }
#
# return purchLine.InventDimId;
#}
#
ENDSOURCE
SOURCE #parmInventReceivedNow
#public InventQty parmInventReceivedNow(InventQty _inventReceivedNow = 0)
#{
# if (!prmisdefault(_inventReceivedNow))
# {
# this.setField(fieldnum(PurchLine, InventReceivedNow), _inventReceivedNow);
# }
#
# return purchLine.InventReceivedNow;
#}
#
ENDSOURCE
SOURCE #parmInventRefId
#public InventRefId parmInventRefId(InventRefId _inventRefId = '')
#{
# if (!prmisdefault(_inventRefId))
# {
# this.setField(fieldnum(PurchLine, InventRefId), _inventRefId);
# }
#
# return purchLine.InventRefId;
#}
#
ENDSOURCE
SOURCE #parmInventRefTransId
#public InventRefTransId parmInventRefTransId(InventRefTransId _inventRefTransId = '')
#{
# if (!prmisdefault(_inventRefTransId))
# {
# this.setField(fieldnum(PurchLine, InventRefTransId), _inventRefTransId);
# }
#
# return purchLine.InventRefTransId;
#}
#
ENDSOURCE
SOURCE #parmInventTransId
#public InventTransId parmInventTransId(InventTransId _inventTransId = '')
#{
# if (!prmisdefault(_inventTransId))
# {
# this.setField(fieldnum(PurchLine, InventTransId), _inventTransId);
# }
#
# return purchLine.InventTransId;
#}
#
ENDSOURCE
SOURCE #parmItemBOMId
#public ItemBOMId parmItemBOMId(ItemBOMId _itemBOMId = '')
#{
# if (!prmisdefault(_itemBOMId))
# {
# this.setField(fieldnum(PurchLine, ItemBOMId), _itemBOMId);
# }
#
# return purchLine.ItemBOMId;
#}
#
ENDSOURCE
SOURCE #parmItemId
#public str parmItemId(str _itemId = '')
#{
# DictField dictField;
# ;
# if (!prmisdefault(_itemId))
# {
# dictField = new DictField(tablenum(PurchLine), fieldnum(PurchLine, ItemId));
# this.validateInboundItemIdString(_itemId,dictField);
# if (this.valueMappingInbound())
# {
# item = _itemId;
# }
#
# this.setField(fieldnum(PurchLine, ItemId), _itemId);
# }
#
# if (this.valueMappingOutbound())
# {
# return conpeek(this.axPurchItemId(purchLine.VendAccount,purchLine.ItemId,purchLine.inventDim()),1);
# }
# else
# {
# return purchLine.ItemId;
# }
#}
#
ENDSOURCE
SOURCE #parmitemPBAId
#public PBAId parmitemPBAId(PBAId _itemPBAId = '')
#{
# if (!prmisdefault(_itemPBAId))
# {
# this.setField(fieldnum(PurchLine, ItemPBAId), _itemPBAId);
# }
#
# return purchLine.ItemPBAId;
#}
#
ENDSOURCE
SOURCE #parmItemRefType
#public InventRefType parmItemRefType(InventRefType _itemRefType = InventRefType::None)
#{
# if (!prmisdefault(_itemRefType))
# {
# this.setField(fieldnum(PurchLine, ItemRefType), _itemRefType);
# }
#
# return purchLine.ItemRefType;
#}
#
ENDSOURCE
SOURCE #parmItemRouteId
#public ItemRouteId parmItemRouteId(ItemRouteId _itemRouteId = '')
#{
# if (!prmisdefault(_itemRouteId))
# {
# this.setField(fieldnum(PurchLine, ItemRouteId), _itemRouteId);
# }
#
# return purchLine.ItemRouteId;
#}
#
ENDSOURCE
SOURCE #parmitemTagging
#public RFIDItemTagging parmItemTagging(RFIDItemTagging _itemTagging = NoYes::No)
#{
# if (!prmisdefault(_itemTagging))
# {
# this.setField(fieldnum(PurchLine, ItemTagging), _itemTagging);
# }
#
# return purchLine.ItemTagging;
#}
#
ENDSOURCE
SOURCE #parmLedgerAccount
#public PurchLedgerAccount parmLedgerAccount(PurchLedgerAccount _ledgerAccount = '')
#{
# if (!prmisdefault(_ledgerAccount))
# {
# this.setField(fieldnum(PurchLine, LedgerAccount), _ledgerAccount);
# }
#
# return purchLine.LedgerAccount;
#}
#
ENDSOURCE
SOURCE #parmLineAmount
#public PurchLineAmount parmLineAmount(PurchLineAmount _lineAmount = 0)
#{
# if (!prmisdefault(_lineAmount))
# {
# this.setField(fieldnum(PurchLine, LineAmount), _lineAmount);
# }
#
# return purchLine.LineAmount;
#}
#
ENDSOURCE
SOURCE #parmLineDisc
#public PurchLineDisc parmLineDisc(PurchLineDisc _lineDisc = 0)
#{
# if (!prmisdefault(_lineDisc))
# {
# this.setField(fieldnum(PurchLine, LineDisc), _lineDisc);
# }
#
# return purchLine.LineDisc;
#}
#
ENDSOURCE
SOURCE #parmLineHeader
#public LineHeader parmLineHeader(LineHeader _lineHeader = '')
#{
# if (!prmisdefault(_lineHeader))
# {
# this.setField(fieldnum(PurchLine, LineHeader), _lineHeader);
# }
#
# return purchLine.LineHeader;
#}
#
ENDSOURCE
SOURCE #parmLineNum
#public LineNum parmLineNum(LineNum _lineNum = 0)
#{
# if (!prmisdefault(_lineNum))
# {
# this.setField(fieldnum(PurchLine, LineNum), _lineNum);
# }
#
# return purchLine.LineNum;
#}
#
ENDSOURCE
SOURCE #parmLinePercent
#public PurchLinePercent parmLinePercent(PurchLinePercent _linePercent = 0)
#{
# if (!prmisdefault(_linePercent))
# {
# this.setField(fieldnum(PurchLine, LinePercent), _linePercent);
# }
#
# return purchLine.LinePercent;
#}
#
ENDSOURCE
SOURCE #parmMultiLnDisc
#public PurchMultiLnDisc parmMultiLnDisc(PurchMultiLnDisc _multiLnDisc = 0)
#{
# if (!prmisdefault(_multiLnDisc))
# {
# this.setField(fieldnum(PurchLine, MultiLnDisc), _multiLnDisc);
# }
#
# return purchLine.MultiLnDisc;
#}
#
ENDSOURCE
SOURCE #parmMultiLnPercent
#public PurchMultiLnPercent parmMultiLnPercent(PurchMultiLnPercent _multiLnPercent = 0)
#{
# if (!prmisdefault(_multiLnPercent))
# {
# this.setField(fieldnum(PurchLine, MultiLnPercent), _multiLnPercent);
# }
#
# return purchLine.MultiLnPercent;
#}
#
ENDSOURCE
SOURCE #parmName
#public ItemFreeTxt parmName(ItemFreeTxt _name = '')
#{
# if (!prmisdefault(_name))
# {
# this.setField(fieldnum(PurchLine, Name), _name);
# }
#
# return purchLine.Name;
#}
#
ENDSOURCE
SOURCE #parmOverDeliveryPct
#public PurchOverDeliveryPct parmOverDeliveryPct(PurchOverDeliveryPct _overDeliveryPct = 0)
#{
# if (!prmisdefault(_overDeliveryPct))
# {
# this.setField(fieldnum(PurchLine, OverDeliveryPct), _overDeliveryPct);
# }
#
# return purchLine.OverDeliveryPct;
#}
#
ENDSOURCE
SOURCE #parmPalletTagging
#public RFIDPalletTagging parmPalletTagging(RFIDPalletTagging _palletTagging = NoYes::No)
#{
# if (!prmisdefault(_palletTagging))
# {
# this.setField(fieldnum(PurchLine, PalletTagging), _palletTagging);
# }
#
# return purchLine.PalletTagging;
#}
#
ENDSOURCE
SOURCE #parmPort
#public IntrastatPortId parmPort(IntrastatPortId _port = '')
#{
# if (!prmisdefault(_port))
# {
# this.setField(fieldnum(PurchLine, Port), _port);
# }
#
# return purchLine.Port;
#}
#
ENDSOURCE
SOURCE #parmPriceUnit
#public PriceUnit parmPriceUnit(PriceUnit _priceUnit = 0)
#{
# if (!prmisdefault(_priceUnit))
# {
# this.setField(fieldnum(PurchLine, PriceUnit), _priceUnit);
# }
#
# return purchLine.PriceUnit;
#}
#
ENDSOURCE
SOURCE #parmProjCategoryId
#public ProjCategoryId parmProjCategoryId(ProjCategoryId _projCategoryId = '')
#{
# if (!prmisdefault(_projCategoryId))
# {
# this.setField(fieldnum(PurchLine, ProjCategoryId), _projCategoryId);
# }
#
# return purchLine.ProjCategoryId;
#}
#
ENDSOURCE
SOURCE #parmProjId
#public ProjId parmProjId(ProjId _projId = '')
#{
# if (!prmisdefault(_projId))
# {
# this.setField(fieldnum(PurchLine, ProjId), _projId);
# }
#
# return purchLine.ProjId;
#}
#
ENDSOURCE
SOURCE #parmProjLinePropertyId
#public ProjLinePropertyId parmProjLinePropertyId(ProjLinePropertyId _projLinePropertyId = '')
#{
# if (!prmisdefault(_projLinePropertyId))
# {
# this.setField(fieldnum(PurchLine, ProjLinePropertyId), _projLinePropertyId);
# }
#
# return purchLine.ProjLinePropertyId;
#}
#
ENDSOURCE
SOURCE #parmProjSalesCurrencyId
#public str parmProjSalesCurrencyId(str _projSalesCurrencyId = '')
#{
# DictField dictField;
# ;
# if (!prmisdefault(_projSalesCurrencyId))
# {
# dictField = new DictField(tablenum(PurchLine), fieldnum(PurchLine, ProjSalesCurrencyId));
# this.validateInboundCurrencyString(_projSalesCurrencyId,dictField);
#
# if(this.valueMappingInbound())
# {
# _projSalesCurrencyId = this.axCurrencyCode(_projSalesCurrencyId);
#
# }
#
# this.setField(fieldnum(PurchLine, ProjSalesCurrencyId), _projSalesCurrencyId);
# }
#
# if (this.valueMappingOutbound())
# {
# return this.axCurrencyCode(purchLine.ProjSalesCurrencyId);
# }
# else
# {
# return purchLine.ProjSalesCurrencyId;
# }
#}
#
ENDSOURCE
SOURCE #parmProjSalesPrice
#public ProjSalesPriceCost parmProjSalesPrice(ProjSalesPriceCost _projSalesPrice = 0)
#{
# if (!prmisdefault(_projSalesPrice))
# {
# this.setField(fieldnum(PurchLine, ProjSalesPrice), _projSalesPrice);
# }
#
# return purchLine.ProjSalesPrice;
#}
#
ENDSOURCE
SOURCE #parmProjSalesUnitId
#public str parmProjSalesUnitId(str _projSalesUnitId = '')
#{
# DictField dictField;
# ;
# if (!prmisdefault(_projSalesUnitId))
# {
# dictField = new DictField(tablenum(PurchLine),fieldnum(PurchLine, ProjSalesUnitId));
# if(this.valueMappingInbound())
# {
# this.validateInboundString(_projSalesUnitId,dictField,this.mapPolicy().xMLMapUnitId());
# _projSalesUnitId = this.axUnitId(_projSalesUnitId);
# }
# else
# {
# this.validateInboundString(_projSalesUnitId,dictField);
# }
#
# this.setField(fieldnum(PurchLine, ProjSalesUnitId), _projSalesUnitId);
# }
#
# if (this.valueMappingOutbound())
# {
# return this.axUnitId(purchLine.ProjSalesUnitId);
# }
# else
# {
# return purchLine.ProjSalesUnitId;
# }
#}
#
ENDSOURCE
SOURCE #parmProjTaxGroupId
#public ProjTaxGroup parmProjTaxGroupId(ProjTaxGroup _projTaxGroupId = '')
#{
# if (!prmisdefault(_projTaxGroupId))
# {
# this.setField(fieldnum(PurchLine, ProjTaxGroupId), _projTaxGroupId);
# }
#
# return purchLine.ProjTaxGroupId;
#}
#
ENDSOURCE
SOURCE #parmProjTaxItemGroupId
#public ProjTaxItemGroup parmProjTaxItemGroupId(ProjTaxItemGroup _projTaxItemGroupId = '')
#{
# if (!prmisdefault(_projTaxItemGroupId))
# {
# this.setField(fieldnum(PurchLine, ProjTaxItemGroupId), _projTaxItemGroupId);
# }
#
# return purchLine.ProjTaxItemGroupId;
#}
#
ENDSOURCE
SOURCE #parmProjTransId
#public ProjItemTransId parmProjTransId(ProjItemTransId _projTransId = '')
#{;
# if (!prmisdefault(_projTransId))
# {
# this.setField(fieldnum(PurchLine, ProjTransId), _projTransId);
# }
#
# return purchLine.ProjTransId;
#}
ENDSOURCE
SOURCE #parmPurchaseType
#public PurchaseType parmPurchaseType(PurchaseType _purchaseType = PurchaseType::Journal)
#{
# if (!prmisdefault(_purchaseType))
# {
# this.setField(fieldnum(PurchLine, PurchaseType), _purchaseType);
# }
#
# return purchLine.PurchaseType;
#}
#
ENDSOURCE
SOURCE #parmPurchId
#public PurchIdBase parmPurchId(PurchIdBase _purchId = '')
#{
# if (!prmisdefault(_purchId))
# {
# this.setField(fieldnum(PurchLine, PurchId), _purchId);
# }
#
# return purchLine.PurchId;
#}
#
ENDSOURCE
SOURCE #parmPurchMarkup
#public PurchMarkup parmPurchMarkup(PurchMarkup _purchMarkup = 0)
#{
# if (!prmisdefault(_purchMarkup))
# {
# this.setField(fieldnum(PurchLine, PurchMarkup), _purchMarkup);
# }
#
# return purchLine.PurchMarkup;
#}
#
ENDSOURCE
SOURCE #parmPurchPrice
#public PurchPrice parmPurchPrice(PurchPrice _purchPrice = 0)
#{
# if (!prmisdefault(_purchPrice))
# {
# this.setField(fieldnum(PurchLine, PurchPrice), _purchPrice);
# }
#
# return purchLine.PurchPrice;
#}
#
ENDSOURCE
SOURCE #parmPurchQty
#public PurchOrderedQty parmPurchQty(PurchOrderedQty _purchQty = 0)
#{
# if (!prmisdefault(_purchQty))
# {
# this.setField(fieldnum(PurchLine, PurchQty), _purchQty);
# }
#
# return purchLine.PurchQty;
#}
#
ENDSOURCE
SOURCE #parmPurchReceivedNow
#public PurchQty parmPurchReceivedNow(PurchQty _purchReceivedNow = 0)
#{
# if (!prmisdefault(_purchReceivedNow))
# {
# this.setField(fieldnum(PurchLine, PurchReceivedNow), _purchReceivedNow);
# }
#
# return purchLine.PurchReceivedNow;
#}
#
ENDSOURCE
SOURCE #parmPurchReqId
#public PurchReqId parmPurchReqId(PurchReqId _purchReqId = '')
#{
# if (!prmisdefault(_purchReqId))
# {
# this.setField(fieldnum(PurchLine, PurchReqId), _purchReqId);
# }
#
# return purchLine.PurchReqId;
#}
ENDSOURCE
SOURCE #parmPurchReqLineRefId
#public PurchReqLineRefId parmPurchReqLineRefId(PurchReqLineRefId _purchReqLineRefId = nullValueBaseType(Types::Guid))
#{;
# if (!prmisdefault(_purchReqLineRefId))
# {
# this.setField(fieldnum(PurchLine, PurchReqLineRefId), _purchReqLineRefId);
# }
#
# return purchLine.PurchReqLineRefId;
#}
ENDSOURCE
SOURCE #parmPurchStatus
#public PurchStatus parmPurchStatus(PurchStatus _purchStatus = PurchStatus::None)
#{
# if (!prmisdefault(_purchStatus))
# {
# this.setField(fieldnum(PurchLine, PurchStatus), _purchStatus);
# }
#
# return purchLine.PurchStatus;
#}
#
ENDSOURCE
SOURCE #parmPurchUnit
#public str parmPurchUnit(str _purchUnit = '')
#{
# DictField dictField;
# ;
# if (!prmisdefault(_purchUnit))
# {
# dictField = new DictField(tablenum(PurchLine),fieldnum(PurchLine,PurchUnit));
# if(this.valueMappingInbound())
# {
# this.validateInboundString(_purchUnit,dictField,this.mapPolicy().xMLMapUnitId());
# _purchUnit = this.axUnitId(_purchUnit);
# }
# else
# {
# this.validateInboundString(_purchUnit,dictField);
# }
#
# this.setField(fieldnum(PurchLine, PurchUnit), _purchUnit);
# }
#
# if (this.valueMappingOutbound())
# {
# return this.axUnitId(purchLine.PurchUnit);
# }
# else
# {
# return purchLine.PurchUnit;
# }
#}
#
ENDSOURCE
SOURCE #parmQtyOrdered
#public InventQty parmQtyOrdered(InventQty _qtyOrdered = 0)
#{
# if (!prmisdefault(_qtyOrdered))
# {
# this.setField(fieldnum(PurchLine, QtyOrdered), _qtyOrdered);
# }
#
# return purchLine.QtyOrdered;
#}
#
ENDSOURCE
SOURCE #parmRemainInventFinancial
#public InventQty parmRemainInventFinancial(InventQty _remainInventFinancial = 0)
#{
# if (!prmisdefault(_remainInventFinancial))
# {
# this.setField(fieldnum(PurchLine, RemainInventFinancial), _remainInventFinancial);
# }
#
# return purchLine.RemainInventFinancial;
#}
#
ENDSOURCE
SOURCE #parmRemainInventPhysical
#public InventQty parmRemainInventPhysical(InventQty _remainInventPhysical = 0)
#{
# if (!prmisdefault(_remainInventPhysical))
# {
# this.setField(fieldnum(PurchLine, RemainInventPhysical), _remainInventPhysical);
# }
#
# return purchLine.RemainInventPhysical;
#}
#
ENDSOURCE
SOURCE #parmRemainPurchFinancial
#public PurchQty parmRemainPurchFinancial(PurchQty _remainPurchFinancial = 0)
#{
# if (!prmisdefault(_remainPurchFinancial))
# {
# this.setField(fieldnum(PurchLine, RemainPurchFinancial), _remainPurchFinancial);
# }
#
# return purchLine.RemainPurchFinancial;
#}
#
ENDSOURCE
SOURCE #parmRemainPurchPhysical
#public PurchQty parmRemainPurchPhysical(PurchQty _remainPurchPhysical = 0)
#{
# if (!prmisdefault(_remainPurchPhysical))
# {
# this.setField(fieldnum(PurchLine, RemainPurchPhysical), _remainPurchPhysical);
# }
#
# return purchLine.RemainPurchPhysical;
#}
#
ENDSOURCE
SOURCE #parmReqAttention
#public PurchReqAttention parmReqAttention(PurchReqAttention _reqAttention = '')
#{
# if (!prmisdefault(_reqAttention))
# {
# this.setField(fieldnum(PurchLine, ReqAttention), _reqAttention);
# }
#
# return purchLine.ReqAttention;
#}
ENDSOURCE
SOURCE #parmReqPlanIdSched
#public ReqPlanIdSched parmReqPlanIdSched(ReqPlanIdSched _reqPlanIdSched = '')
#{
# if (!prmisdefault(_reqPlanIdSched))
# {
# this.setField(fieldnum(PurchLine, ReqPlanIdSched), _reqPlanIdSched);
# }
#
# return purchLine.ReqPlanIdSched;
#}
#
ENDSOURCE
SOURCE #parmReqPOId
#public ReqPOId parmReqPOId(ReqPOId _reqPOId = '')
#{
# if (!prmisdefault(_reqPOId))
# {
# this.setField(fieldnum(PurchLine, ReqPOId), _reqPOId);
# }
#
# return purchLine.ReqPOId;
#}
#
ENDSOURCE
SOURCE #parmRequisitioner
#public PurchRequisitioner parmRequisitioner(PurchRequisitioner _requisitioner = '')
#{;
# if (!prmisdefault(_requisitioner))
# {
# this.setField(fieldnum(PurchLine, Requisitioner), _requisitioner);
# }
#
# return purchLine.Requisitioner;
#}
ENDSOURCE
SOURCE #parmReturnActionId
#public PurchReturnActionId parmReturnActionId(PurchReturnActionId _returnActionId = '')
#{
# if (!prmisdefault(_returnActionId))
# {
# this.setField(fieldnum(PurchLine, ReturnActionId), _returnActionId);
# }
#
# return purchLine.ReturnActionId;
#}
#
ENDSOURCE
SOURCE #parmReturnDispositionCodeId
#public ReturnDispositionCodeId parmReturnDispositionCodeId(ReturnDispositionCodeId _returnDispositionCodeId = '')
#{
# if (!prmisdefault(_returnDispositionCodeId))
# {
# this.setField(fieldnum(PurchLine, ReturnDispositionCodeId), _returnDispositionCodeId);
# }
#
# return purchLine.ReturnDispositionCodeId;
#}
#
ENDSOURCE
SOURCE #parmReturnStatus
#public ReturnStatusLine parmReturnStatus(ReturnStatusLine _returnStatus = ReturnStatusLine::None)
#{
# if (!prmisdefault(_returnStatus))
# {
# this.setField(fieldnum(PurchLine, ReturnStatus), _returnStatus);
# }
#
# return purchLine.ReturnStatus;
#}
#
ENDSOURCE
SOURCE #parmScrap
#public NoYes parmScrap(NoYes _scrap = NoYes::No)
#{
# if (!prmisdefault(_scrap))
# {
# this.setField(fieldnum(PurchLine, Scrap), _scrap);
# }
#
# return purchLine.Scrap;
#}
#
ENDSOURCE
SOURCE #parmShippingDateConfirmed
#public SalesShippingDateConfirmed parmShippingDateConfirmed(SalesShippingDateConfirmed _shippingDateConfirmed = dateNull())
#{;
# if (!prmisdefault(_shippingDateConfirmed))
# {
# this.setField(fieldnum(PurchLine, ShippingDateConfirmed), _shippingDateConfirmed);
# }
# return purchLine.ShippingDateConfirmed;
#}
#
ENDSOURCE
SOURCE #parmShippingDateRequested
#public SalesShippingDateRequested parmShippingDateRequested(SalesShippingDateRequested _shippingDateRequested = dateNull())
#{;
# if (!prmisdefault(_shippingDateRequested))
# {
# this.setField(fieldnum(PurchLine, ShippingDateRequested), _shippingDateRequested);
# }
# return purchLine.ShippingDateRequested;
#}
#
ENDSOURCE
SOURCE #parmSkipUpdate
#public InterCompanySkipUpdate parmSkipUpdate(InterCompanySkipUpdate _skipUpdate = InterCompanySkipUpdate::No)
#{
# if (!prmisdefault(_skipUpdate))
# {
# this.setField(fieldnum(PurchLine, SkipUpdate), _skipUpdate);
# }
#
# return purchLine.SkipUpdate;
#}
#
ENDSOURCE
SOURCE #parmStatProcId
#public IntrastatProcId parmStatProcId(IntrastatProcId _statProcId = '')
#{
# if (!prmisdefault(_statProcId))
# {
# this.setField(fieldnum(PurchLine, StatProcId), _statProcId);
# }
#
# return purchLine.StatProcId;
#}
#
ENDSOURCE
SOURCE #parmStatTriangularDeal
#public IntrastatTriangularDeal parmStatTriangularDeal(IntrastatTriangularDeal _statTriangularDeal = NoYes::No)
#{
# if (!prmisdefault(_statTriangularDeal))
# {
# this.setField(fieldnum(PurchLine, StatTriangularDeal), _statTriangularDeal);
# }
#
# return purchLine.StatTriangularDeal;
#}
#
ENDSOURCE
SOURCE #parmTax1099Amount
#public Tax1099Amount parmTax1099Amount(Tax1099Amount _tax1099Amount = 0)
#{
# if (!prmisdefault(_tax1099Amount))
# {
# this.setField(fieldnum(PurchLine, Tax1099Amount), _tax1099Amount);
# }
#
# return purchLine.Tax1099Amount;
#}
#
ENDSOURCE
SOURCE #parmTax1099Box
#public Tax1099Box parmTax1099Box(Tax1099Box _tax1099Box = '')
#{
# if (!prmisdefault(_tax1099Box))
# {
# this.setField(fieldnum(PurchLine, Tax1099Box), _tax1099Box);
# }
#
# return purchLine.Tax1099Box;
#}
#
ENDSOURCE
SOURCE #parmTax1099State
#public Tax1099State parmTax1099State(Tax1099State _tax1099State = '')
#{
# if (!prmisdefault(_tax1099State))
# {
# this.setField(fieldnum(PurchLine, Tax1099State), _tax1099State);
# }
#
# return purchLine.Tax1099State;
#}
#
ENDSOURCE
SOURCE #parmTax1099StateAmount
#public Tax1099StateAmount parmTax1099StateAmount(Tax1099StateAmount _tax1099StateAmount = 0)
#{
# if (!prmisdefault(_tax1099StateAmount))
# {
# this.setField(fieldnum(PurchLine, Tax1099StateAmount), _tax1099StateAmount);
# }
#
# return purchLine.Tax1099StateAmount;
#}
#
ENDSOURCE
SOURCE #parmTaxAutogenerated
#public TaxAutoGenerated parmTaxAutogenerated(TaxAutoGenerated _taxAutoGenerated = NoYes::No)
#{
# if (!prmisdefault(_taxAutoGenerated))
# {
# this.setField(fieldnum(PurchLine, TaxAutogenerated), _taxAutoGenerated);
# }
#
# return purchLine.TaxAutogenerated;
#}
#
ENDSOURCE
SOURCE #parmTaxGroup
#public TaxGroup parmTaxGroup(TaxGroup _taxGroup = '')
#{
# if (!prmisdefault(_taxGroup))
# {
# this.setField(fieldnum(PurchLine, TaxGroup), _taxGroup);
# }
#
# return purchLine.TaxGroup;
#}
#
ENDSOURCE
SOURCE #parmTaxItemGroup
#public TaxItemGroup parmTaxItemGroup(TaxItemGroup _taxItemGroup = '')
#{
# if (!prmisdefault(_taxItemGroup))
# {
# this.setField(fieldnum(PurchLine, TaxItemGroup), _taxItemGroup);
# }
#
# return purchLine.TaxItemGroup;
#}
#
ENDSOURCE
SOURCE #parmTransactionCode
#public IntrastatTransactionCodeId parmTransactionCode(IntrastatTransactionCodeId _transactionCode = '')
#{
# if (!prmisdefault(_transactionCode))
# {
# this.setField(fieldnum(PurchLine, TransactionCode), _transactionCode);
# }
#
# return purchLine.TransactionCode;
#}
#
ENDSOURCE
SOURCE #parmTransport
#public IntrastatTransport parmTransport(IntrastatTransport _transport = '')
#{
# if (!prmisdefault(_transport))
# {
# this.setField(fieldnum(PurchLine, Transport), _transport);
# }
#
# return purchLine.Transport;
#}
#
ENDSOURCE
SOURCE #parmUnderDeliveryPct
#public PurchUnderDeliveryPct parmUnderDeliveryPct(PurchUnderDeliveryPct _underDeliveryPct = 0)
#{
# if (!prmisdefault(_underDeliveryPct))
# {
# this.setField(fieldnum(PurchLine, UnderDeliveryPct), _underDeliveryPct);
# }
#
# return purchLine.UnderDeliveryPct;
#}
#
ENDSOURCE
SOURCE #parmVendAccount
#public str parmVendAccount(str _vendAccount = '')
#{
# DictField dictField;
# ;
# if (!prmisdefault(_vendAccount))
# {
# dictField = new DictField(tablenum(PurchLine), fieldnum(PurchLine, VendAccount));
#
# if(this.valueMappingInbound())
# {
# this.validateInboundString(_vendAccount,dictField,this.mapPolicy().xMLMapVendAccount());
# _vendAccount = this.axVendAccount(_vendAccount);
# }
# else
# {
# this.validateInboundString(_vendAccount,dictField);
# }
#
# this.setField(fieldnum(PurchLine, VendAccount), _vendAccount);
# }
#
# if (this.valueMappingOutbound())
# {
# return this.axVendAccount(purchLine.VendAccount);
# }
# else
# {
# return purchLine.VendAccount;
# }
#}
#
ENDSOURCE
SOURCE #parmVendGroup
#public VendGroupId parmVendGroup(VendGroupId _vendGroup = '')
#{
# if (!prmisdefault(_vendGroup))
# {
# this.setField(fieldnum(PurchLine, VendGroup), _vendGroup);
# }
#
# return purchLine.VendGroup;
#}
#
ENDSOURCE
SOURCE #priceDisc_LineDisc
#public PriceDisc_LineDisc priceDisc_LineDisc(PriceDisc_LineDisc _priceDisc_LineDisc = null)
#{
# PriceDisc_LineDisc priceDisc_LineDisc;
#
# if (!priceDisc_LineDiscIdx)
# {
# priceDisc_LineDiscIdx = this.nextCacheIdx();
# }
#
# if (!prmisdefault(_priceDisc_LineDisc))
# {
# this.classCacheInsert(priceDisc_LineDiscIdx, _priceDisc_LineDisc);
# priceDisc_LineDisc = _priceDisc_LineDisc;
# }
# else
# {
# if (this.classCacheExist(priceDisc_LineDiscIdx))
# {
# priceDisc_LineDisc = this.classCacheLookup(priceDisc_LineDiscIdx);
# }
# else
# {
# this.setPriceDisc_LineDiscFields();
#
# priceDisc_LineDisc = new PriceDisc_LineDisc();
# priceDisc_LineDisc.parmModuleType(ModuleInventPurchSales::Purch);
# priceDisc_LineDisc.parmItemId(this.parmItemId());
# priceDisc_LineDisc.parmInventDim(this.axInventDim().inventDim());
# priceDisc_LineDisc.parmUnitID(this.parmPurchUnit());
# priceDisc_LineDisc.parmDiscDate(systemdateget());
# priceDisc_LineDisc.parmQty(this.parmPurchQty());
# priceDisc_LineDisc.parmAccountNum(this.axPurchTable().parmOrderAccount());
# priceDisc_LineDisc.parmCurrencyCode(this.axPurchTable().parmCurrencyCode());
# priceDisc_LineDisc.parmAccountLineDiscCode(this.axPurchTable().parmLineDisc());
# priceDisc_LineDisc.parmItemLineDiscCode(this.inventTableRecord().purchLineDisc());
#
# this.classCacheInsert(priceDisc_LineDiscIdx, priceDisc_LineDisc);
# }
# }
#
# return priceDisc_LineDisc;
#}
#
ENDSOURCE
SOURCE #priceDisc_Price
#public PriceDisc_Price priceDisc_Price(PriceDisc_Price _priceDisc_Price = null)
#{
# PriceDisc_Price priceDisc_Price;
#
# if (!priceDisc_PriceIdx)
# {
# priceDisc_PriceIdx = this.nextCacheIdx();
# }
#
# if (!prmisdefault(_priceDisc_Price))
# {
# this.classCacheInsert(priceDisc_PriceIdx, _priceDisc_Price);
# priceDisc_Price = _priceDisc_Price;
# }
# else
# {
# if (this.classCacheExist(priceDisc_PriceIdx))
# {
# priceDisc_Price = this.classCacheLookup(priceDisc_PriceIdx);
# }
# else
# {
# this.setPriceDisc_PriceFields();
#
# priceDisc_Price = new PriceDisc_Price();
# priceDisc_Price.parmModuleType(ModuleInventPurchSales::Purch);
# priceDisc_Price.parmItemId(this.parmItemId());
# priceDisc_Price.parmInventDim(this.axInventDim().inventDim());
# priceDisc_Price.parmUnitID(this.parmPurchUnit());
# priceDisc_Price.parmPriceDate(systemdateget());
# priceDisc_Price.parmQty(this.parmPurchQty());
# priceDisc_Price.parmAccountNum(this.axPurchTable().parmOrderAccount());
# priceDisc_Price.parmCurrencyCode(this.axPurchTable().parmCurrencyCode());
# priceDisc_Price.parmPriceGroupId(this.axPurchTable().parmPriceGroupId());
#
# this.classCacheInsert(priceDisc_PriceIdx, priceDisc_Price);
# }
# }
#
# return priceDisc_Price;
#}
#
ENDSOURCE
SOURCE #PriceParametersRecord
#public PriceParameters priceParametersRecord(PriceParameters _priceParameters = null)
#{
# PriceParameters priceParameters;
#
# if (!priceParametersIdx)
# {
# priceParametersIdx = this.nextCacheIdx();
# }
#
# if (!prmisdefault(_priceParameters))
# {
# this.tableCacheInsert(priceParametersIdx, _priceParameters);
# priceParameters = _priceParameters;
# }
# else
# {
# if (this.tableCacheExist(priceParametersIdx))
# {
# priceParameters = this.tableCacheLookup(priceParametersIdx);
# }
# else
# {
# priceParameters = PriceParameters::find();
# this.tableCacheInsert(priceParametersIdx, priceParameters);
# }
# }
#
# return priceParameters;
#}
#
ENDSOURCE
SOURCE #purchLine
#public PurchLine purchLine(PurchLine _purchLine = purchLine)
#{
# if (!prmisdefault(_purchLine))
# {
# this.setCurrentRecordFromExternal(_purchLine);
# }
#
# return this.currentRecord();
#}
ENDSOURCE
SOURCE #PurchParametersRecord
#public PurchParameters purchParametersRecord(PurchParameters _purchParameters = null)
#{
# PurchParameters purchParameters;
#
# if (!purchParametersIdx)
# {
# purchParametersIdx = this.nextCacheIdx();
# }
#
# if (!prmisdefault(_purchParameters))
# {
# this.tableCacheInsert(purchParametersIdx, _purchParameters);
# purchParameters = _purchParameters;
# }
# else
# {
# if (this.tableCacheExist(purchParametersIdx))
# {
# purchParameters = this.tableCacheLookup(purchParametersIdx);
# }
# else
# {
# purchParameters = PurchParameters::find();
# this.tableCacheInsert(purchParametersIdx, purchParameters);
# }
# }
#
# return purchParameters;
#}
#
ENDSOURCE
SOURCE #resetInternalValues
#public void resetInternalValues()
#{
# super();
#
# axInventDim.inventDim(purchLine.inventDim());
#}
ENDSOURCE
SOURCE #ReturnActionDefaultsRecord
#public ReturnActionDefaults returnActionDefaultsRecord(ReturnActionDefaults _returnActionDefaults = null)
#{
# ReturnActionDefaults returnActionDefaults;
#
# if (!returnActionDefaultsIdx)
# {
# returnActionDefaultsIdx = this.nextCacheIdx();
# }
#
# if (!prmisdefault(_returnActionDefaults))
# {
# this.tableCacheInsert(returnActionDefaultsIdx, _returnActionDefaults);
# returnActionDefaults = _returnActionDefaults;
# }
# else
# {
# if (this.tableCacheExist(returnActionDefaultsIdx))
# {
# returnActionDefaults = this.tableCacheLookup(returnActionDefaultsIdx);
# }
# else
# {
# this.setReturnActionDefaultsRecordFields();
# returnActionDefaults = ReturnActionDefaults::find(ModuleInventPurchSales::Purch, this.parmReturnActionId());
# this.tableCacheInsert(returnActionDefaultsIdx, returnActionDefaults);
# }
# }
#
# return returnActionDefaults;
#}
#
#
ENDSOURCE
SOURCE #setActivityNumber
#protected void setActivityNumber()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, ActivityNumber)))
# {
# return;
# }
#}
#
#
ENDSOURCE
SOURCE #setAddressRefRecId
#protected void setAddressRefRecId()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, AddressRefRecId)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setAddressRefTableId
#protected void setAddressRefTableId()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, AddressRefTableId)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setAssetBookId
#protected void setAssetBookId()
#{
# AssetBook assetBook;
# AssetBookTable assetBookTable;
#
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, AssetBookId)))
# {
# return;
# }
#
# this.setAssetId();
#
# if (this.isFieldSet(fieldnum(PurchLine, AssetId)))
# {
# if (this.parmAssetId())
# {
# assetBook = AssetBook::find(this.parmAssetId(), AssetParameters::find().BookIdDefault);
# if(assetBook &&
# AssetBookTable::find(AssetParameters::find().BookIdDefault).CurrentOperationsTax == CurrentOperationsTax::Current &&
# (assetBook.Status == AssetStatus::NoAcquisition ||
# assetBook.Status == AssetStatus::Open))
# {
# this.parmAssetBookId(AssetParameters::find().BookIdDefault);
# }
# else
# {
# select firstonly assetBook
# where assetBook.AssetId == this.parmAssetId() &&
# (assetBook.Status == AssetStatus::NoAcquisition ||
# assetBook.Status == AssetStatus::Open)
# join assetBookTable
# where assetBookTable.BookId == assetBook.BookId &&
# assetBookTable.CurrentOperationsTax == CurrentOperationsTax::Current;
#
# if (assetBook)
# {
# this.parmAssetBookId(assetBook.BookId);
# }
# else
# {
# this.parmAssetBookId('');
# }
# }
#
# }
# else
# {
# this.parmAssetBookId('');
# }
# }
#}
ENDSOURCE
SOURCE #setAssetGroup
#protected void setAssetGroup()
#{
# ;
#
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, AssetGroup)))
# {
# return;
# }
# this.setCreateFixedAsset();
#}
#
ENDSOURCE
SOURCE #setAssetId
#protected void setAssetId()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, AssetId)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setAssetTransTypePurch
#protected void setAssetTransTypePurch()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, AssetTransTypePurch)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setAxPurchTableFields
#public void setAxPurchTableFields()
#{
# this.setPurchId();
#}
ENDSOURCE
SOURCE #setBarCode
#protected void setBarCode()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, BarCode)))
# {
# return;
# }
#
# this.setInventItemBarcodeRecordFields();
#
# if (this.isInventItemBarcodeRecordFieldsSet())
# {
# this.parmBarCode(this.inventItemBarcodeRecord().ItemBarCode);
# }
#}
#
ENDSOURCE
SOURCE #setBarCodeType
#protected void setBarCodeType()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, BarCodeType)))
# {
# return;
# }
#
# this.setInventItemBarcodeRecordFields();
#
# if (this.isInventItemBarcodeRecordFieldsSet())
# {
# this.parmBarCodeType(this.inventItemBarcodeRecord().BarcodeSetupId);
# }
#}
#
ENDSOURCE
SOURCE #setBlanketRefTransId
#protected void setBlanketRefTransId()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, BlanketRefTransId)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setBlocked
#protected void setBlocked()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, Blocked)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setCaseTagging
#protected void setCaseTagging()
#{
# InventDimSearch dimSearch;
# ;
#
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, CaseTagging)))
# {
# return;
# }
#
# this.setItemId();
#
# if (this.isFieldSet(fieldnum(PurchLine, ItemId)))
# {
# dimSearch = new InventDimSearch();
# dimSearch.find(this.inventTableRecord().DimGroupId, fieldnum(InventDim, InventSerialId));
#
# if (dimSearch.dimActive() && !dimSearch.dimAllowBlankReceipt())
# {
# switch(this.inventTableRecord().ItemTaggingLevel)
# {
# case RFIDItemTaggingLevel::None :
# case RFIDItemTaggingLevel::ItemLevel :
# this.parmCaseTagging(false);
# return;
#
# case RFIDItemTaggingLevel::CaseLevel :
# this.parmCaseTagging(true);
# return;
# }
# }
# }
#}
#
ENDSOURCE
SOURCE #setComplete
#protected void setComplete()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, Complete)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setConfirmedDlv
#protected void setConfirmedDlv()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, ConfirmedDlv)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setCovRef
#protected void setCovRef()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, CovRef)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setCreateFixedAsset
#protected void setCreateFixedAsset()
#{
# ;
#
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, CreateFixedAsset)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setCurrencyCode
#protected void setCurrencyCode()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, CurrencyCode)))
# {
# return;
# }
#
# this.setAxPurchTableFields();
#
# if (this.parmCurrencyCode() != this.axPurchTable().parmCurrencyCode())
# {
# this.parmCurrencyCode(this.axPurchTable().parmCurrencyCode());
# }
#}
#
ENDSOURCE
SOURCE #setCustomerRef
#protected void setCustomerRef()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, CustomerRef)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setCustPurchaseOrderFormNum
#protected void setCustPurchaseOrderFormNum()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, CustPurchaseOrderFormNum)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setDeliveryAddress
#protected void setDeliveryAddress()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, DeliveryAddress)))
# {
# return;
# }
#
# this.setDeliveryZipCode();
# this.setDeliveryCity();
# this.setDeliveryStreet();
# this.setDeliveryCounty();
# this.setDeliveryState();
# this.setDeliveryCountryRegionId();
#
# if (this.isFieldSet(fieldnum(PurchLine, DeliveryZipCode)) ||
# this.isFieldSet(fieldnum(PurchLine, DeliveryCity)) ||
# this.isFieldSet(fieldnum(PurchLine, DeliveryStreet)) ||
# this.isFieldSet(fieldnum(PurchLine, DeliveryCounty)) ||
# this.isFieldSet(fieldnum(PurchLine, DeliveryState)) ||
# this.isFieldSet(fieldnum(PurchLine, DeliveryCountryRegionId)))
# {
# purchLine.DeliveryAddress = Address::formatAddress(this.parmDeliveryStreet(),
# this.parmDeliveryZipCode(),
# this.parmDeliveryCity(),
# this.parmDeliveryCountryRegionId(),
# this.parmDeliveryState(),
# this.parmDeliveryCounty());
# }
#}
#
ENDSOURCE
SOURCE #setDeliveryCity
#protected void setDeliveryCity()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, DeliveryCity)))
# {
# return;
# }
#
# this.setAxPurchTableFields();
# if (this.isAxPurchTableFieldsSet())
# {
# this.parmDeliveryCity(this.axPurchTable().parmDeliveryCity());
# return;
# }
#
# this.setZipCodeRecordFields();
#
# if (this.isZipCodeRecordFieldsSet())
# {
# this.parmDeliveryCity(this.zipCodeRecord().City);
# }
#}
#
ENDSOURCE
SOURCE #setDeliveryCountryRegionId
#protected void setDeliveryCountryRegionId()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, DeliveryCountryRegionId)))
# {
# return;
# }
#
# this.setAxPurchTableFields();
# if (this.isAxPurchTableFieldsSet())
# {
# this.parmDeliveryCountryRegionId(this.axPurchTable().parmDlvCountryRegionId());
# return;
# }
#
# this.setZipCodeRecordFields();
#
# if (this.isZipCodeRecordFieldsSet())
# {
# this.parmDeliveryCountryRegionId(this.zipCodeRecord().CountryRegionId);
# }
#}
#
ENDSOURCE
SOURCE #setDeliveryCounty
#protected void setDeliveryCounty()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, DeliveryCounty)))
# {
# return;
# }
#
# this.setAxPurchTableFields();
# if (this.isAxPurchTableFieldsSet())
# {
# this.parmDeliveryCounty(this.axPurchTable().parmDlvCounty());
# return;
# }
#
# this.setZipCodeRecordFields();
#
# if (this.isZipCodeRecordFieldsSet())
# {
# this.parmDeliveryCounty(this.zipCodeRecord().County);
# return;
# }
#}
#
ENDSOURCE
SOURCE #setDeliveryDate
#protected void setDeliveryDate()
#{
# SchedDate schedDate;
# WorkCalendarSched workCalendarSched;
#
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, DeliveryDate)))
# {
# return;
# }
#
# this.setPriceDisc_PriceFields();
# this.setAxPurchTableFields();
#
# if (this.isPriceDisc_PriceFieldsSet() || this.axPurchTable().isFieldModified(fieldnum(PurchTable, DeliveryDate)))
# {
# if (this.priceDisc_Price().deliveryDays())
# {
# workCalendarSched = new WorkCalendarSched();
# schedDate = workCalendarSched.schedDate(SchedDirection::Forward,
# systemdateget(), // FromDate
# this.priceDisc_Price().deliveryDays(), // LeadTime
# this.priceDisc_Price().calendarDays(),
# VendTable::find(this.priceDisc_Price().parmAccountNum()).PurchCalendarId,
# purchLine.type().internalCalendarId());
#
# this.parmDeliveryDate(max(schedDate, this.axPurchTable().parmDeliveryDate()));
#// this.DeliveryDate(max(systemdateGet() + this.priceDisc_Price().deliveryDays(), this.AxPurchTable().DeliveryDate()));
# }
# else
# {
# this.parmDeliveryDate(this.axPurchTable().parmDeliveryDate());
# }
# }
#}
#
ENDSOURCE
SOURCE #setDeliveryName
#protected void setDeliveryName()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, DeliveryName)))
# {
# return;
# }
#
# this.setAxPurchTableFields();
# if (this.isAxPurchTableFieldsSet())
# {
# this.parmDeliveryName(this.axPurchTable().parmDeliveryName());
# }
#}
#
ENDSOURCE
SOURCE #setDeliveryState
#protected void setDeliveryState()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, DeliveryState)))
# {
# return;
# }
#
# this.setZipCodeRecordFields();
#
# if (this.isZipCodeRecordFieldsSet())
# {
# this.parmDeliveryState(this.zipCodeRecord().State);
# return;
# }
#
# this.setAxPurchTableFields();
# if (this.isAxPurchTableFieldsSet())
# {
# this.parmDeliveryState(this.axPurchTable().parmDlvState());
# }
#}
#
ENDSOURCE
SOURCE #setDeliveryStreet
#protected void setDeliveryStreet()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, DeliveryStreet)))
# {
# return;
# }
#
# this.setAxPurchTableFields();
# if (this.isAxPurchTableFieldsSet())
# {
# this.parmDeliveryStreet(this.axPurchTable().parmDeliveryStreet());
# return;
# }
#
# this.setZipCodeRecordFields();
#
# if (this.isZipCodeRecordFieldsSet())
# {
# if (this.zipCodeRecord().StreetName)
# {
# this.parmDeliveryStreet(this.zipCodeRecord().StreetName);
# return;
# }
# }
#}
#
ENDSOURCE
SOURCE #setDeliveryType
#protected void setDeliveryType()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, DeliveryType)))
# {
# return;
# }
#}
ENDSOURCE
SOURCE #setDeliveryZipCode
#protected void setDeliveryZipCode()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, DeliveryZipCode)))
# {
# return;
# }
#
# this.setAxPurchTableFields();
# if (this.isAxPurchTableFieldsSet())
# {
# this.parmDeliveryZipCode(this.axPurchTable().parmDeliveryZipCode());
# }
#}
#
ENDSOURCE
SOURCE #setDepreciationStartDate
#protected void setDepreciationStartDate()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, DepreciationStartDate)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setDimension
#protected void setDimension()
#{
# SysDictField sysDictField;
# int array;
# int arraySize;
#
# Dimension dimension;
# boolean allDimensionsAreSet = true;
# ;
#
# if (this.isMethodExecuted(funcname()))
# {
# return;
# }
#
# sysDictField = this.sysDictFieldFind(fieldnum(PurchLine, Dimension));
# arraySize = sysDictField.arraySize() ;
# for (array = 1; array <= arraySize && allDimensionsAreSet ; array++)
# {
# if (!this.isFieldSet(new SysDictField(sysDictField.tableid(), sysDictField.id(), array).id()))
# {
# allDimensionsAreSet = false;
# }
# }
#
# if (allDimensionsAreSet)
# {
# return;
# }
#
# this.setInventDimId();
# this.inventSiteDimensionLink().axSetDimension(this);
#
# this.setAxPurchTableFields();
#
# if (this.isAxPurchTableFieldsSet() ||
# this.axPurchTable().isFieldModified(fieldnum(PurchTable, Dimension)) ||
# this.isInventTableRecordFieldsSet())
# {
# this.parmDimension(Dimensions::findDimension(this.axPurchTable().purchTable(), this.inventTableRecord(), dimension));
# }
#}
#
ENDSOURCE
SOURCE #setDimensionElement
#public void setDimensionElement(int _array, SysDim _dimensionElement)
#{;
# if (!prmisdefault(_dimensionElement))
# {
# if (_array > 0 || _array <= new SysDictField(tablenum(PurchLine), fieldnum(PurchLine, Dimension)).arraySize())
# {
# this.setField(new SysDictField(tablenum(PurchLine), fieldnum(PurchLine, Dimension), _array).id(), _dimensionElement);
# }
# }
#}
#
ENDSOURCE
SOURCE #setExternalItemId
#protected void setExternalItemId()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, ExternalItemId)))
# {
# return;
# }
#
# this.setVendExternalItemDescriptionFields();
#
# if (this.isVendExternalItemDescriptionFieldsSet())
# {
# this.parmExternalItemId(this.vendExternalItemDescription().externalItemId());
# }
#}
#
ENDSOURCE
SOURCE #setGSTHSTTaxType_CA
#//
#protected void setGSTHSTTaxType_CA()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, GSTHSTTaxType_CA)))
# {
# return;
# }
#}
#//
ENDSOURCE
SOURCE #setInterCompanyInventTransId
#protected void setInterCompanyInventTransId()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, InterCompanyInventTransId)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setInterCompanyOrigin
#protected void setInterCompanyOrigin()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, InterCompanyOrigin)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setInventDimId
#protected void setInventDimId()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, InventDimId)))
# {
# return;
# }
#
# this.axInventDim().setInventDimId();
#
# if (this.axInventDim().isFieldSet(fieldnum(InventDim, InventDimId)))
# {
# this.parmInventDimId(this.axInventDim().parmInventDimId());
# }
#}
#
ENDSOURCE
SOURCE #setInventItemBarcodeRecordFields
#protected void setInventItemBarcodeRecordFields()
#{
# this.setItemId();
#}
ENDSOURCE
SOURCE #setInventReceivedNow
#protected void setInventReceivedNow()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, InventReceivedNow)))
# {
# return;
# }
#
# this.setItemId();
# this.setPurchUnit();
# this.setPurchReceivedNow();
# this.setInventTableRecordFields();
#
# if (this.isFieldSet(fieldnum(PurchLine, ItemId)) ||
# this.isFieldSet(fieldnum(PurchLine, PurchUnit)) ||
# this.isFieldSet(fieldnum(PurchLine, PurchReceivedNow)) ||
# this.isInventTableRecordFieldsSet())
# {
# this.parmInventReceivedNow(UnitConvert::qty(this.parmPurchReceivedNow(),
# this.parmPurchUnit(),
# this.inventTableRecord().inventUnitId(),
# this.parmItemId()));
# }
#}
#
ENDSOURCE
SOURCE #setInventRefId
#protected void setInventRefId()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, InventRefId)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setInventRefTransId
#protected void setInventRefTransId()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, InventRefTransId)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setInventTableRecordFields
#public void setInventTableRecordFields()
#{
# this.setItemId();
#}
ENDSOURCE
SOURCE #setInventTransId
#protected void setInventTransId()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, InventTransId)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setItemBOMId
#protected void setItemBOMId()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, ItemBOMId)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setItemId
#protected void setItemId()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, ItemId)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setitemPBAId
#protected void setitemPBAId()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, ItemPBAId)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setItemRefType
#protected void setItemRefType()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, ItemRefType)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setItemRouteId
#protected void setItemRouteId()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, ItemRouteId)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setItemTagging
#protected void setItemTagging()
#{
# InventDimSearch dimSearch;
# ;
#
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, ItemTagging)))
# {
# return;
# }
#
# this.setItemId();
#
# if (this.isFieldSet(fieldnum(PurchLine, ItemId)))
# {
# dimSearch = new InventDimSearch();
# dimSearch.find(this.inventTableRecord().DimGroupId, fieldnum(InventDim, InventSerialId));
#
# if (dimSearch.dimActive() && !dimSearch.dimAllowBlankReceipt())
# {
# switch(this.inventTableRecord().ItemTaggingLevel)
# {
# case RFIDItemTaggingLevel::None :
# case RFIDItemTaggingLevel::CaseLevel :
# this.parmItemTagging(false);
# return;
#
# case RFIDItemTaggingLevel::ItemLevel :
# this.parmItemTagging(true);
# return;
# }
# }
# }
#}
#
ENDSOURCE
SOURCE #setLedgerAccount
#protected void setLedgerAccount()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, LedgerAccount)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setLineAmount
#protected void setLineAmount()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, LineAmount)))
# {
# return;
# }
#
# this.setPurchPrice();
# this.setPriceUnit();
# this.setLineDisc();
# this.setLinePercent();
# this.setPurchQty();
# this.setPurchMarkup();
# this.setMultiLnDisc();
# this.setMultiLnPercent();
# this.setPurchQty();
#
# if (this.isFieldSet(fieldnum(PurchLine, PurchPrice)) ||
# this.isFieldSet(fieldnum(PurchLine, PriceUnit)) ||
# this.isFieldSet(fieldnum(PurchLine, LineDisc)) ||
# this.isFieldSet(fieldnum(PurchLine, LinePercent)) ||
# this.isFieldSet(fieldnum(PurchLine, PurchQty)) ||
# this.isFieldSet(fieldnum(PurchLine, PurchMarkup)) ||
# this.isFieldSet(fieldnum(PurchLine, MultiLnDisc)) ||
# this.isFieldSet(fieldnum(PurchLine, MultiLnPercent)))
# {
# this.parmLineAmount(this.currentRecord().calcLineAmountForced());
# return;
# }
#
# this.setCurrencyCode();
#
# if (this.isFieldSet(fieldnum(PurchLine, CurrencyCode)))
# {
# if (this.axOrig().parmCurrencyCode())
# {
# this.parmLineAmount(Currency::curAmount2CurAmount(this.parmLineAmount(), this.axOrig().parmCurrencyCode(), this.parmCurrencyCode()));
# }
# }
#}
#
ENDSOURCE
SOURCE #setLineDisc
#protected void setLineDisc()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, LineDisc)))
# {
# return;
# }
#
# if (this.isFieldSetExternally(fieldnum(PurchLine, LineAmount)))
# {
# this.parmLineDisc(0);
# return;
# }
#
# this.setPriceDisc_LineDiscFields();
#
# if (this.isPriceDisc_LineDiscFieldsSet())
# {
# this.parmLineDisc(this.priceDisc_LineDisc().discAmount());
# }
#
# this.setCurrencyCode();
#
# if (this.isFieldSet(fieldnum(PurchLine, CurrencyCode)))
# {
# if (this.axOrig().parmCurrencyCode())
# {
# this.parmLineDisc(Currency::curPrice2CurPrice(this.parmLineDisc(), this.axOrig().parmCurrencyCode(), this.parmCurrencyCode()));
# }
# }
#}
#
ENDSOURCE
SOURCE #setLineHeader
#protected void setLineHeader()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, LineHeader)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setLineNum
#protected void setLineNum()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, LineNum)))
# {
# return;
# }
#
# this.setPurchId();
#
# if (this.isFieldSet(fieldnum(PurchLine, PurchId)))
# {
# if (!lineNum)
# {
# lineNum = PurchLine::lastLineNum(this.parmPurchId());
# }
# lineNum +=1;
#
# this.parmLineNum(lineNum);
# }
#}
#
ENDSOURCE
SOURCE #setLinePercent
#protected void setLinePercent()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, LinePercent)))
# {
# return;
# }
#
# if (this.isFieldSetExternally(fieldnum(PurchLine, LineAmount)))
# {
# this.parmLinePercent(0);
# return;
# }
#
# this.setPriceDisc_LineDiscFields();
#
# if (this.isPriceDisc_LineDiscFieldsSet())
# {
# this.parmLinePercent(this.priceDisc_LineDisc().discPct());
# }
#}
#
ENDSOURCE
SOURCE #setMultiLnDisc
#protected void setMultiLnDisc()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, MultiLnDisc)))
# {
# return;
# }
#
# if (this.isFieldSetExternally(fieldnum(PurchLine, LineAmount)))
# {
# this.parmMultiLnDisc(0);
# return;
# }
#
# this.setCurrencyCode();
#
# if (this.isFieldSet(fieldnum(PurchLine, CurrencyCode)))
# {
# if (this.axOrig().parmCurrencyCode())
# {
# this.parmMultiLnDisc(Currency::curPrice2CurPrice(this.parmMultiLnDisc(), this.axOrig().parmCurrencyCode(), this.parmCurrencyCode()));
# }
# }
#}
#
ENDSOURCE
SOURCE #setMultiLnPercent
#protected void setMultiLnPercent()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, MultiLnPercent)))
# {
# return;
# }
#
# if (this.isFieldSetExternally(fieldnum(PurchLine, LineAmount)))
# {
# this.parmMultiLnPercent(0);
# return;
# }
#}
#
ENDSOURCE
SOURCE #setName
#protected void setName()
#{
# ItemFreeTxt itemName;
#
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, Name)))
# {
# return;
# }
#
#
# this.setVendExternalItemDescriptionFields();
#
# if (this.isVendExternalItemDescriptionFieldsSet() || this.axPurchTable().isFieldModified(fieldnum(PurchTable, LanguageId)))
# {
# if (this.vendExternalItemDescription().externalItemFreeTxt())
# {
# if (VendFormletterParameters::find().ExternalItemOverwriteAppend == OverwriteAppend::Overwrite)
# {
# this.parmName(this.vendExternalItemDescription().externalItemFreeTxt());
# }
# else
# {
# itemName = PurchParameters::nameAndOrDescription(this.inventTableRecord(), this.axPurchTable().parmLanguageId(), this.parmInventDimId());
# if (itemName)
# {
# itemName += '\n';
# }
# itemName += this.vendExternalItemDescription().externalItemFreeTxt();
# this.parmName(itemName);
# }
# }
# else
# {
# this.parmName(PurchParameters::nameAndOrDescription(this.inventTableRecord(), this.axPurchTable().parmLanguageId(), this.parmInventDimId()));
# }
# return;
# }
#
# this.setInventTableRecordFields();
# this.setAxPurchTableFields();
#
# if (this.isInventTableRecordFieldsSet() ||
# this.isAxPurchTableFieldsSet() ||
# this.axPurchTable().isFieldSet(fieldnum(PurchTable, LanguageId)))
# {
# this.parmName(PurchParameters::nameAndOrDescription(this.inventTableRecord(), this.axPurchTable().parmLanguageId(), this.parmInventDimId()));
# }
#}
#
ENDSOURCE
SOURCE #setOverDeliveryPct
#protected void setOverDeliveryPct()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, OverDeliveryPct)))
# {
# return;
# }
#
# this.setInventTableRecordFields();
#
# if (this.isInventTableRecordFieldsSet())
# {
# this.parmOverDeliveryPct(this.inventTableRecord().purchOverDeliveryPct());
# }
#}
#
ENDSOURCE
SOURCE #setPalletTagging
#protected void setPalletTagging()
#{
# InventDimSearch dimSearch;
# ;
#
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, PalletTagging)))
# {
# return;
# }
#
# this.setItemId();
#
# if (this.isFieldSet(fieldnum(PurchLine, ItemId)))
# {
# dimSearch = new InventDimSearch();
# dimSearch.find(this.inventTableRecord().DimGroupId, fieldnum(InventDim, wmsPalletId));
#
# if (dimSearch.dimActive())
# {
# if (!dimSearch.dimAllowBlankReceipt())
# this.parmPalletTagging(this.inventTableRecord().PalletTagging);
# else
# this.parmPalletTagging(false);
# }
# }
#}
#
ENDSOURCE
SOURCE #setPort
#protected void setPort()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, Port)))
# {
# return;
# }
#
# this.setAxPurchTableFields();
#
# if (this.isAxPurchTableFieldsSet() || this.axPurchTable().isFieldModified(fieldnum(PurchTable, Port)))
# {
# this.parmPort(this.axPurchTable().parmPort());
# }
#}
#
ENDSOURCE
SOURCE #setPriceDisc_LineDiscFields
#protected void setPriceDisc_LineDiscFields()
#{
# this.setItemId();
# this.setPurchQty();
# this.setPurchUnit();
# this.setInventTableRecordFields();
# this.setAxPurchTableFields();
# this.axInventDim().setPurchPriceDiscFields(this.inventTableRecord());
#}
ENDSOURCE
SOURCE #setPriceDisc_PriceFields
#protected void setPriceDisc_PriceFields()
#{
# this.setItemId();
# this.setPurchQty();
# this.setPurchUnit();
# this.setInventTableRecordFields();
# this.setAxPurchTableFields();
# this.axInventDim().setPurchPriceDiscFields(this.inventTableRecord());
#}
ENDSOURCE
SOURCE #setPriceUnit
#protected void setPriceUnit()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, PriceUnit)))
# {
# return;
# }
#
# this.setPriceDisc_PriceFields();
#
# if (this.isPriceDisc_PriceFieldsSet())
# {
# this.parmPriceUnit(this.priceDisc_Price().priceUnit());
# }
#}
#
ENDSOURCE
SOURCE #setProjCategoryId
#protected void setProjCategoryId()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, ProjCategoryId)))
# {
# return;
# }
#
# this.setProjId();
# this.setInventTableRecordFields();
#
# if (this.isInventTableRecordFieldsSet() || this.isFieldSet(fieldnum(PurchLine, ProjId)))
# {
# if (this.isInventTableRecordFieldsSet() || !ProjValProjCategorySetUp::checkProjCategory(this.parmProjId(),this.parmProjCategoryId()))
# {
# if (!ProjValProjCategorySetUp::checkProjCategory(this.parmProjId(),this.inventTableRecord().ProjCategoryId))
# {
# this.parmProjCategoryId('');
# }
# else
# {
# this.parmProjCategoryId(this.inventTableRecord().ProjCategoryId);
# }
# }
# }
#}
#
ENDSOURCE
SOURCE #setProjId
#protected void setProjId()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, ProjId)))
# {
# return;
# }
#
# this.setAxPurchTableFields();
#
# if (this.parmProjId() != this.axPurchTable().parmProjId())
# {
# this.parmProjId(this.axPurchTable().parmProjId());
# }
#}
#
ENDSOURCE
SOURCE #setProjLinePropertyId
#protected void setProjLinePropertyId()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, ProjLinePropertyId)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setProjSalesCurrencyId
#protected void setProjSalesCurrencyId()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, ProjSalesCurrencyId)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setProjSalesPrice
#protected void setProjSalesPrice()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, ProjSalesPrice)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setProjSalesUnitId
#protected void setProjSalesUnitId()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, ProjSalesUnitId)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setProjTaxGroupId
#protected void setProjTaxGroupId()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, ProjTaxGroupId)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setProjTaxItemGroupId
#protected void setProjTaxItemGroupId()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, ProjTaxItemGroupId)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setPurchaseType
#protected void setPurchaseType()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, PurchaseType)))
# {
# return;
# }
#
# this.setAxPurchTableFields();
#
# if (this.parmPurchaseType() != this.axPurchTable().parmPurchaseType())
# {
# this.parmPurchaseType(this.axPurchTable().parmPurchaseType());
# }
#}
#
ENDSOURCE
SOURCE #setPurchId
#protected void setPurchId()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, PurchId)))
# {
# return;
# }
#
# if (!this.parmPurchId())
# {
# this.parmPurchId(this.axPurchTable().parmPurchId());
# }
#}
#
ENDSOURCE
SOURCE #setPurchMarkup
#protected void setPurchMarkup()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, PurchMarkup)))
# {
# return;
# }
#
# if (this.isFieldSetExternally(fieldnum(PurchLine, LineAmount)))
# {
# this.parmPurchMarkup(0);
# return;
# }
#
# this.setPriceDisc_PriceFields();
#
# if (this.isPriceDisc_PriceFieldsSet())
# {
# this.parmPurchMarkup(this.priceDisc_Price().priceMarkup());
# }
#
# this.setCurrencyCode();
#
# if (this.isFieldSet(fieldnum(PurchLine, CurrencyCode)))
# {
# if (this.axOrig().parmCurrencyCode())
# {
# this.parmPurchMarkup(Currency::curPrice2CurPrice(this.parmPurchMarkup(), this.axOrig().parmCurrencyCode(), this.parmCurrencyCode()));
# }
# }
#}
#
ENDSOURCE
SOURCE #setPurchPrice
#protected void setPurchPrice()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, PurchPrice)))
# {
# return;
# }
#
# if (this.isFieldSetExternally(fieldnum(PurchLine, LineAmount)))
# {
# this.parmPurchPrice(0);
# return;
# }
#
# this.setPriceDisc_PriceFields();
#
# if (this.isPriceDisc_PriceFieldsSet())
# {
# this.parmPurchPrice(this.priceDisc_Price().price());
# }
#
# this.setCurrencyCode();
#
# if (this.isFieldSet(fieldnum(PurchLine, CurrencyCode)))
# {
# if (this.axOrig().parmCurrencyCode())
# {
# this.parmPurchPrice(Currency::curPrice2CurPrice(this.parmPurchPrice(), this.axOrig().parmCurrencyCode(), this.parmCurrencyCode()));
# }
# }
#}
#
ENDSOURCE
SOURCE #setPurchQty
#protected void setPurchQty()
#{
# PurchQty purchQty;
#
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, PurchQty)))
# {
# return;
# }
#
# this.setPurchaseType();
# this.setInventTableRecordFields();
#
# if (this.isInventTableRecordFieldsSet())
# {
# if (this.parmPurchaseType() != PurchaseType::ReturnItem)
# {
# this.setInventDimId();
# purchQty = this.inventTableRecord().purchStandardQty(this.parmInventDimId());
#
# this.setPurchUnit();
#
# if (this.isFieldSet(fieldnum(PurchLine, PurchUnit)) &&
# this.parmPurchUnit() != this.inventTableRecord().purchUnitId())
# {
# this.setItemId();
#
# purchQty = UnitConvert::qty(UnitConvert::qty(purchQty,
# this.inventTableRecord().purchUnitId(),
# this.inventTableRecord().inventUnitId(),
# this.parmItemId()),
# this.inventTableRecord().inventUnitId(),
# this.parmPurchUnit(),
# this.parmItemId());
# }
#
# this.parmPurchQty(purchQty);
# }
# return;
# }
#
# this.setPurchUnit();
#
# if (this.isFieldSet(fieldnum(PurchLine, PurchUnit)))
# {
# this.parmPurchQty(decround(this.parmPurchQty(),Unit::decimals(this.parmPurchUnit())));
# }
#}
#
ENDSOURCE
SOURCE #setPurchReceivedNow
#protected void setPurchReceivedNow()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, PurchReceivedNow)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setPurchStatus
#protected void setPurchStatus()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, PurchStatus)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setPurchUnit
#protected void setPurchUnit()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, PurchUnit)))
# {
# return;
# }
#
# this.setInventTableRecordFields();
#
# if (this.isInventTableRecordFieldsSet())
# {
# this.parmPurchUnit(this.inventTableRecord().purchUnitId());
# }
#}
#
ENDSOURCE
SOURCE #setQtyOrdered
#protected void setQtyOrdered()
#{
# InventQty inventQty;
#
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, QtyOrdered)))
# {
# return;
# }
#
# this.setInventTableRecordFields();
# this.setItemId();
# this.setPurchQty();
# this.setPurchUnit();
#
# if (this.isInventTableRecordFieldsSet() ||
# this.isFieldSet(fieldnum(PurchLine, ItemId)) ||
# this.isFieldSet(fieldnum(PurchLine, PurchQty)) ||
# this.isFieldSet(fieldnum(PurchLine, PurchUnit)))
# {
# inventQty = UnitConvert::qty(this.parmPurchQty(),
# this.parmPurchUnit(),
# this.inventTableRecord().inventUnitId(),
# this.parmItemId());
#
# this.parmQtyOrdered(decround(inventQty,InventTable::inventDecimals(this.parmItemId())));
# }
#}
#
ENDSOURCE
SOURCE #setRemainInventPhysical
#protected void setRemainInventPhysical()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, RemainInventPhysical)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setRemainPurchFinancial
#protected void setRemainPurchFinancial()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, RemainPurchFinancial)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setRemainPurchPhysical
#protected void setRemainPurchPhysical()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, RemainPurchPhysical)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setReqPlanIdSched
#protected void setReqPlanIdSched()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, ReqPlanIdSched)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setReqPOId
#protected void setReqPOId()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, ReqPOId)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setReturnActionDefaultsRecordFields
#public void setReturnActionDefaultsRecordFields()
#{
# this.setReturnActionId();
#}
ENDSOURCE
SOURCE #setReturnActionId
#protected void setReturnActionId()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, ReturnActionId)))
# {
# return;
# }
#
# this.setPurchaseType();
#
# if (this.parmPurchaseType() == PurchaseType::ReturnItem)
# {
# if (this.isFieldSet(fieldnum(PurchLine, PurchaseType)))
# {
# this.parmReturnActionId(this.purchParametersRecord().ReturnActionDefault);
# }
# }
# else
# {
# this.setPurchQty();
#
# if (this.isFieldSet(fieldnum(PurchLine, PurchQty)))
# {
# if (this.parmPurchQty() > 0)
# {
# this.parmReturnActionId('');
# }
# }
# }
#}
#
ENDSOURCE
SOURCE #setReturnDispositionCodeId
#protected void setReturnDispositionCodeId()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, ReturnDispositionCodeId)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setScrap
#protected void setScrap()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, Scrap)))
# {
# return;
# }
#
# this.setPurchaseType();
#
# if (this.parmPurchaseType() != PurchaseType::ReturnItem)
# {
# this.setPurchQty();
#
# if (this.isFieldSet(fieldnum(PurchLine, PurchQty)))
# {
# if (this.parmPurchQty() <= 0)
# {
# this.parmScrap(NoYes::No);
# return;
# }
# }
# }
#
# this.setReturnActionDefaultsRecordFields();
#
# if (this.isReturnActionDefaultsRecordFieldsSet())
# {
# this.parmScrap(this.returnActionDefaultsRecord().Scrap);
# }
#}
#
ENDSOURCE
SOURCE #setShippingDateConfirmed
#protected void setShippingDateConfirmed()
#{;
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, ShippingDateConfirmed)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setShippingDateRequested
#protected void setShippingDateRequested()
#{;
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, ShippingDateRequested)))
# {
# return;
# }
#}
ENDSOURCE
SOURCE #setSkipUpdate
#protected void setSkipUpdate()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, SkipUpdate)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setStatProcId
#protected void setStatProcId()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, StatProcId)))
# {
# return;
# }
#
# this.setAxPurchTableFields();
#
# if (this.isAxPurchTableFieldsSet() || this.axPurchTable().isFieldModified(fieldnum(PurchTable, StatProcId)))
# {
# this.parmStatProcId(this.axPurchTable().parmStatProcId());
# }
#}
#
ENDSOURCE
SOURCE #setStatTriangularDeal
#protected void setStatTriangularDeal()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, StatTriangularDeal)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setStorageDimField
#protected void setStorageDimField(fieldId _fieldId)
#{
# ;
# this.axInventDim().setDimFieldId(_fieldId);
#}
#
ENDSOURCE
SOURCE #setTableFields
#protected void setTableFields()
#{
# super();
#
# useMapPolicy = false;
#
# this.setPurchId();
# this.setLineNum();
# this.setItemId();
# this.setPurchStatus();
# this.setLedgerAccount();
# this.setDeliveryDate();
# this.setName();
# this.setTaxGroup();
# this.setQtyOrdered();
# this.setPurchReceivedNow();
# this.setRemainPurchPhysical();
# this.setRemainPurchFinancial();
# this.setPriceUnit();
# this.setPurchPrice();
# this.setCurrencyCode();
# this.setLinePercent();
# this.setLineDisc();
# this.setLineAmount();
# this.setExternalItemId();
# this.setPurchUnit();
# this.setDimension();
# this.setConfirmedDlv();
# this.setAddressRefRecId();
# this.setInventTransId();
# this.setVendGroup();
# this.setVendAccount();
# this.setAddressRefTableId();
# this.setPurchQty();
# this.setPurchMarkup();
# this.setInventReceivedNow();
# this.setMultiLnDisc();
# this.setMultiLnPercent();
# this.setPurchaseType();
# this.setCovRef();
# this.setRemainInventPhysical();
# this.setTaxItemGroup();
# this.setTransactionCode();
# this.setTaxAutogenerated();
# this.setUnderDeliveryPct();
# this.setOverDeliveryPct();
# this.setTax1099Box();
# this.setTax1099Amount();
# this.setBarCode();
# this.setBarCodeType();
# this.setInventRefId();
# this.setInventRefTransId();
# this.setItemRefType();
# this.setBlocked();
# this.setComplete();
# this.setReqPlanIdSched();
# this.setReqPOId();
# this.setItemRouteId();
# this.setItemBOMId();
# this.setLineHeader();
# this.setScrap();
# this.setReturnActionId();
# this.setProjCategoryId();
# this.setProjId();
# this.setInventDimId();
# this.setTransport();
# this.setStatProcId();
# this.setPort();
# this.setCreateFixedAsset();
# this.setAssetGroup();
# this.setAssetId();
# this.setAssetTransTypePurch();
# this.setAssetBookId();
# this.setProjLinePropertyId();
# this.setProjTaxItemGroupId();
# this.setProjTaxGroupId();
# this.setProjSalesPrice();
# this.setProjSalesCurrencyId();
# this.setSkipUpdate();
# this.setInterCompanyInventTransId();
# this.setProjSalesUnitId();
# this.setDeliveryAddress();
# this.setDeliveryName();
# this.setDeliveryStreet();
# this.setDeliveryZipCode();
# this.setDeliveryCity();
# this.setDeliveryCounty();
# this.setDeliveryState();
# this.setDeliveryCountryRegionId();
# this.setDeliveryType();
# this.setCustomerRef();
# this.setCustPurchaseOrderFormNum();
# this.setBlanketRefTransId();
# this.setStatTriangularDeal();
# this.setTax1099State();
# this.setTax1099StateAmount();
# this.setitemPBAId();
# this.setItemTagging();
# this.setCaseTagging();
# this.setPalletTagging();
# this.setShippingDateRequested();
# this.setShippingDateConfirmed();
# this.setInterCompanyOrigin();
# this.setReturnDispositionCodeId();
#
# useMapPolicy = true;
#}
#
ENDSOURCE
SOURCE #setTableFieldsForce
#void setTableFieldsForce()
#{;
# this.setTableFields();
#}
#
ENDSOURCE
SOURCE #setTax1099Amount
#protected void setTax1099Amount()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, Tax1099Amount)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setTax1099Box
#protected void setTax1099Box()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, Tax1099Box)))
# {
# return;
# }
#
# this.setAxPurchTableFields();
#
# if (this.isAxPurchTableFieldsSet() || this.axPurchTable().isFieldModified(fieldnum(PurchTable, OrderAccount)))
# {
# this.parmTax1099Box(this.axPurchTable().orderAccount_VendTableRecord().Tax1099Box);
# }
#}
#
ENDSOURCE
SOURCE #setTax1099State
#protected void setTax1099State()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, Tax1099State)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setTax1099StateAmount
#protected void setTax1099StateAmount()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, Tax1099StateAmount)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setTaxAutogenerated
#protected void setTaxAutogenerated()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, TaxAutogenerated)))
# {
# return;
# }
#}
#
ENDSOURCE
SOURCE #setTaxGroup
#protected void setTaxGroup()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, TaxGroup)))
# {
# return;
# }
#
# this.setAxPurchTableFields();
#
# if (this.isAxPurchTableFieldsSet() || this.axPurchTable().isFieldModified(fieldnum(PurchTable, TaxGroup)))
# {
# this.parmTaxGroup(this.axPurchTable().parmTaxGroup());
# }
#}
#
ENDSOURCE
SOURCE #setTaxItemGroup
#protected void setTaxItemGroup()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, TaxItemGroup)))
# {
# return;
# }
#
# this.setInventTableRecordFields();
#
# if (this.isInventTableRecordFieldsSet())
# {
# this.parmTaxItemGroup(this.inventTableRecord().purchTaxItemGroupId());
# }
#}
#
ENDSOURCE
SOURCE #setTransactionCode
#protected void setTransactionCode()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, TransactionCode)))
# {
# return;
# }
#
# this.setAxPurchTableFields();
#
# if (this.isAxPurchTableFieldsSet() || this.axPurchTable().isFieldModified(fieldnum(PurchTable, TransactionCode)))
# {
# this.parmTransactionCode(this.axPurchTable().parmTransactionCode());
# }
#}
#
ENDSOURCE
SOURCE #setTransport
#protected void setTransport()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, Transport)))
# {
# return;
# }
#
# this.setAxPurchTableFields();
#
# if (this.isAxPurchTableFieldsSet() || this.axPurchTable().isFieldModified(fieldnum(PurchTable, Transport)))
# {
# this.parmTransport(this.axPurchTable().parmTransport());
# }
#}
#
ENDSOURCE
SOURCE #setUnderDeliveryPct
#protected void setUnderDeliveryPct()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, UnderDeliveryPct)))
# {
# return;
# }
#
# this.setInventTableRecordFields();
#
# if (this.isInventTableRecordFieldsSet())
# {
# this.parmUnderDeliveryPct(this.inventTableRecord().purchUnderDeliveryPct());
# }
#}
#
ENDSOURCE
SOURCE #setVendAccount
#protected void setVendAccount()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, VendAccount)))
# {
# return;
# }
#
# this.setAxPurchTableFields();
#
# if (this.parmVendAccount() != this.axPurchTable().parmOrderAccount())
# {
# this.parmVendAccount(this.axPurchTable().parmOrderAccount());
# }
#
#}
#
ENDSOURCE
SOURCE #setVendExternalItemDescriptionFields
#protected void setVendExternalItemDescriptionFields()
#{
# this.setItemId();
# this.axInventDim().setConfigId();
# this.setAxPurchTableFields();
#}
ENDSOURCE
SOURCE #setVendGroup
#protected void setVendGroup()
#{
# if (this.isMethodExecuted(funcname(), fieldnum(PurchLine, VendGroup)))
# {
# return;
# }
#
# this.setAxPurchTableFields();
#
# if (this.parmVendGroup() != this.axPurchTable().parmVendGroup())
# {
# this.parmVendGroup(this.axPurchTable().parmVendGroup());
# }
#}
#
ENDSOURCE
SOURCE #setZipCodeRecordFields
#protected void setZipCodeRecordFields()
#{
#;
# this.setDeliveryZipCode();
# this.setDeliveryCity();
# this.setDeliveryCountryRegionId();
#}
ENDSOURCE
SOURCE #updateFromInventDim
#public void updateFromInventDim()
#{
# //When updating axPurchLine through an instance of axInventDim_PurchLine only
# //this.setInventDimId() is allowed to be called, not the entire setTableFields()
# //as is done through the save-method.
#
# ttsbegin;
#
# runState = AxBCRunState::Save;
# fieldModified = new Set(Types::Integer);
#
# this.initRecord();
#
# this.inputStatus(InternalExternal::Internal);
#
# this.setInventDimId();
# inventDimIdDirtySaved = false;
#
# this.validateWrite();
#
# this.write();
#
# purchLine.InventDimId = InventDim::findOrCreateBlank(false).InventDimId;
#
# this.resetInternalValues();
#
# ttscommit;
#}
#
ENDSOURCE
SOURCE #valueMapDependingFields
#protected void valueMapDependingFields()
#{
# if (this.valueMappingInbound())
# {
# if (purchLine.VendAccount && item)
# {
# this.parmItemId(conpeek(this.axPurchItemId(purchLine.VendAccount,item),1));
# }
#
# if (state && purchLine.DeliveryCountryRegionId)
# {
# this.parmDeliveryState(this.axAddressStateId(state,purchLine.DeliveryCountryRegionId));
#
# if (county)
# {
# this.parmDeliveryCounty(this.axAddressCountyId(county,
# purchLine.DeliveryCountryRegionId,
# purchLine.DeliveryState));
# }
# }
# }
#}
ENDSOURCE
SOURCE #VendExternalItemDescription
#public VendExternalItemDescription vendExternalItemDescription(VendExternalItemDescription _vendExternalItemDescription = null)
#{
# VendExternalItemDescription vendExternalItemDescription;
#
# if (!vendExternalItemDescriptionIdx)
# {
# vendExternalItemDescriptionIdx = this.nextCacheIdx();
# }
#
# if (!prmisdefault(_vendExternalItemDescription))
# {
# this.classCacheInsert(vendExternalItemDescriptionIdx, _vendExternalItemDescription);
# vendExternalItemDescription = _vendExternalItemDescription;
# }
# else
# {
# if (this.classCacheExist(vendExternalItemDescriptionIdx))
# {
# vendExternalItemDescription = this.classCacheLookup(vendExternalItemDescriptionIdx);
# }
# else
# {
# vendExternalItemDescription = new VendExternalItemDescription(this.parmItemId(), this.axInventDim().inventDim(), this.axPurchTable().parmOrderAccount());
# vendExternalItemDescription.findExternalDescription();
#
# this.classCacheInsert(vendExternalItemDescriptionIdx, vendExternalItemDescription);
# }
# }
#
# return vendExternalItemDescription;
#}
#
ENDSOURCE
SOURCE #ZipCodeRecord
#public AddressZipCode zipCodeRecord(AddressZipCode _zipCode = null)
#{
# AddressZipCode zipCode;
#
# if (!zipCodeIdx)
# {
# zipCodeIdx = this.nextCacheIdx();
# }
#
# if (!prmisdefault(_zipCode))
# {
# this.tableCacheInsert(zipCodeIdx, _zipCode);
# zipCode = _zipCode;
# }
# else
# {
# if (this.tableCacheExist(zipCodeIdx))
# {
# zipCode = this.tableCacheLookup(zipCodeIdx);
# }
# else
# {
# this.setZipCodeRecordFields();
# zipCode = AddressZipCode::findBestMatch(this.currentRecord());
# this.tableCacheInsert(zipCodeIdx, zipCode);
# }
# }
#
# return zipCode;
#}
ENDSOURCE
SOURCE #construct
#static AxPurchLine construct()
#{
# return new AxPurchLine();
#}
#
ENDSOURCE
SOURCE #newPurchLine
#public static AxPurchLine newPurchLine(PurchLine _purchLine)
#{
# AxPurchLine axPurchLine = AxPurchLine::construct();
# ;
# axPurchLine.purchLine(_purchLine);
#
# return axPurchLine;
#}
#
ENDSOURCE
ENDMETHODS
ENDCLASS
***Element: CLS
; Microsoft Dynamics AX Class: NumberSeqReference_Vendor unloaded
; --------------------------------------------------------------------------------
CLSVERSION 1
CLASS #NumberSeqReference_Vendor
Id 1450
PROPERTIES
Name #NumberSeqReference_Vendor
Extends #NumberSeqReference
RunOn #Server
ENDPROPERTIES
METHODS
Version: 3
SOURCE #classDeclaration
#public class NumberSeqReference_Vendor extends NumberSeqReference
#{
#
#}
ENDSOURCE
SOURCE #loadModule
#/*
#Detailed description of how to setup references for number sequences can
#be found i method loadModule() on the 'father' class: numberSeqReference.
#*/
#protected void loadModule()
#{
# NumberSequenceReference numRef;
# ;
#
# /* Setup Vendors numbers */
#
# numRef.dataTypeId = typeId2ExtendedTypeId(typeid(VendAccount));
# numRef.configurationKeyId = configurationkeynum(ledgerBasic);
# numRef.referenceHelp = literalStr("@SYS53981");
# numRef.wizardContinuous = true;
# numRef.wizardManual = NoYes::No;
# numRef.wizardAllowChangeDown = NoYes::No;
# numRef.wizardAllowChangeUp = NoYes::No;
# numRef.wizardHighest = 999999;
# numRef.sortField = 1;
#
# this.create(numRef);
#
# numRef.dataTypeId = typeId2ExtendedTypeId(typeid(OneTimeSupplierAccount));
# numRef.configurationKeyId = configurationkeynum(ledgerBasic);
# numRef.referenceHelp = literalStr("@SYS53982");
# numRef.wizardContinuous = true;
# numRef.wizardManual = NoYes::No;
# numRef.wizardAllowChangeDown = NoYes::No;
# numRef.wizardAllowChangeUp = NoYes::No;
# numRef.wizardHighest = 999999;
# numRef.sortField = 2;
#
# this.create(numRef);
#
# /* Setup tax1099 number */
#
# numRef.dataTypeId = typeId2ExtendedTypeId(typeid(Tax1099Num));
# numRef.referenceHelp = literalStr("@SYS53936");
# numRef.wizardContinuous = true;
# numRef.wizardManual = NoYes::No;
# numRef.wizardAllowChangeDown = NoYes::No;
# numRef.wizardAllowChangeUp = NoYes::No;
# numRef.sortField = 3;
#
# this.create(numRef);
#
# /* Setup posting numbers */
#
# numRef.dataTypeId = typeId2ExtendedTypeId(typeid(VendPromissoryNoteID));
# numRef.referenceHelp = literalStr("@SYS71454");
# numRef.wizardContinuous = true;
# numRef.wizardManual = NoYes::No;
# numRef.wizardAllowChangeDown = NoYes::No;
# numRef.wizardAllowChangeUp = NoYes::No;
# numRef.sortField = 4;
#
# this.create(numRef);
#
# /* Setup voucher numbers */
#
# numRef.dataTypeId = typeId2ExtendedTypeId(typeid(VendExchAdjVoucher));
# numRef.referenceHelp = literalStr("@SYS54013");
# numRef.wizardContinuous = true;
# numRef.wizardManual = NoYes::No;
# numRef.wizardAllowChangeDown = NoYes::No;
# numRef.wizardAllowChangeUp = NoYes::No;
# numRef.wizardLowest = 130000000;
# numRef.wizardHighest = 139999999;
# numRef.sortField = 5;
#
# this.create(numRef);
#
# numRef.dataTypeId = typeId2ExtendedTypeId(typeid(VendPaymVoucher));
# numRef.referenceHelp = literalStr("@SYS53985");
# numRef.wizardContinuous = true;
# numRef.wizardManual = NoYes::No;
# numRef.wizardAllowChangeDown = NoYes::No;
# numRef.wizardAllowChangeUp = NoYes::No;
# numRef.wizardLowest = 140000000;
# numRef.wizardHighest = 149999999;
# numRef.sortField = 6;
#
# this.create(numRef);
#
# numRef.dataTypeId = typeId2ExtendedTypeId(typeid(VendCloseVoucher));
# numRef.referenceHelp = literalStr("@SYS54012");
# numRef.wizardContinuous = true;
# numRef.wizardManual = NoYes::No;
# numRef.wizardAllowChangeDown = NoYes::No;
# numRef.wizardAllowChangeUp = NoYes::No;
# numRef.wizardLowest = 150000000;
# numRef.wizardHighest = 159999999;
# numRef.sortField = 7;
#
# this.create(numRef);
#
# // remittance file numbering
# numRef.dataTypeId = typeId2ExtendedTypeId(typeId(BankRemittanceFileIdVend));
# numRef.referenceHelp = literalStr("@SYS73398");
# numRef.wizardContinuous = true;
# numRef.wizardManual = NoYes::No;
# numRef.wizardAllowChangeDown = NoYes::No;
# numRef.wizardAllowChangeUp = NoYes::No;
# numRef.wizardHighest = 999999;
# numRef.sortField = 8;
#
# this.create(numRef);
#
# //
# if (isConfigurationkeyEnabled(configurationkeynum(CRSEIsrael)))
# {
# numRef.dataTypeId = typeId2ExtendedTypeId(typeid(VendReceiptId_IL));
# numRef.referenceLabel = literalStr("@GIL461");
# numRef.referenceHelp = literalStr("@GIL134"); // Unique key for Receipt identification. The key is used when creating new Receipt
# numRef.wizardContinuous = true;
# numRef.wizardManual = NoYes::No;
# numRef.wizardAllowChangeDown = NoYes::No;
# numRef.wizardAllowChangeUp = NoYes::No;
# numRef.wizardHighest = 9999999;
# numRef.sortField = 9;
#
# this.create(numRef);
# }
# //
# // Israel-Localisation-Prodware-ImportFolder-Begin
# // import folder numbering
# if (isConfigurationkeyEnabled(configurationkeynum(CRSEIsrael)))
# {
# numRef.dataTypeId = typeId2ExtendedTypeId(typeId(BPLImpFolderId));
# numRef.referenceLabel = literalStr("@BPL94");
# numRef.referenceHelp = literalStr("@BPL94");
# numRef.wizardContinuous = true;
# numRef.wizardManual = NoYes::No;
# numRef.wizardAllowChangeDown = NoYes::No;
# numRef.wizardAllowChangeUp = NoYes::No;
# numRef.wizardHighest = 999999999;
# numRef.sortField = 10;
#
# this.create(numRef);
# }
# // Israel-Localisation-Prodware-ImportFolder-End
#}
ENDSOURCE
SOURCE #numberSeqModule
#public static client server NumberSeqModule numberSeqModule()
#{
# return NumberSeqModule::Vend;
#}
ENDSOURCE
ENDMETHODS
ENDCLASS
en-us
Unique key for vendor identification. The key is used when creating new vendors.
@SYS53981
0
0
he
מפתח ייחודי לזיהוי ספק. המפתח משמש בעת יצירת ספקים חדשים.
@SYS53981
0
0
en-us
Unique key for one-time vendors. The key is used when creating new one-time vendors.
@SYS53982
0
0
he
מפתח ייחודי עבור ספקים חד-פעמיים. המפתח משמש בעת יצירת ספקים חד-פעמיים חדשים.
@SYS53982
0
0
en-us
Number sequence from which numbers on 1099 forms are retrieved
@SYS53936
0
0
he
רצף מספרים שממנו מאוחזרים מספרים בטפסי 1099
@SYS53936
0
0
en-us
Unique key for identification of promissory notes. The key is used when creating new promissory notes.
@SYS71454
0
0
he
מפתח ייחודי לזיהוי שטרי חוב. המפתח נמצא בשימוש בעת יצירת שטרי חוב חדשים.
@SYS71454
0
0
en-us
Unique key for voucher, used when posting to the general ledger. The key is allocated automatically on exchange adjustment.
@SYS54013
0
0
he
מפתח ייחודי עבור שובר, משמש בעת רישום לספר הראשי. המפתח מוקצה באופן אוטומטי בעת התאמת חליפין.
@SYS54013
0
0
en-us
Unique key for voucher, used when posting to the general ledger. The key is allocated automatically when updating open transactions.
@SYS53985
0
0
he
מפתח ייחודי עבור שובר, משמש בעת רישום לספר הראשי. המפתח מוקצה באופן אוטומטי בעת עדכון תנועות פתוחות.
@SYS53985
0
0
en-us
Unique key for voucher, used when posting to the general ledger. The key is allocated automatically on closing settlement of invoice.
@SYS54012
0
0
he
מפתח ייחודי עבור שובר, משמש בעת רישום לספר הראשי. המפתח מוקצה באופן אוטומטי בעת סגירת ייחוס של חשבונית.
@SYS54012
0
0
en-us
Unique identification of the remittance file.
@SYS73398
0
0
he
זיהוי ייחודי של קובץ ההעברה הבנקאית.
@SYS73398
0
0
en-us
Receipt number
@GIL461
0
0
he
מספר קבלה
@GIL461
0
0
en-us
Unique key for Receipt identification. The key is used when creating a new Receipt.
@GIL134
0
0
he
מפתח ייחודי עבור זיהוי קבלה. המפתח משמש בעת יצירת קבלה חדשה.
@GIL134
0
0
en-us
Import portfolio
@BPL94
0
0
he
תיק יבוא
@BPL94
0
0
***Element: CLS
; Microsoft Dynamics AX Class: PurchTableType unloaded
; --------------------------------------------------------------------------------
CLSVERSION 1
CLASS #PurchTableType
Id 497
PROPERTIES
Name #PurchTableType
Extends #InventType
RunOn #Called from
ENDPROPERTIES
METHODS
Version: 3
SOURCE #canCreditNoteBeCreated
#boolean canCreditNoteBeCreated()
#{
# return true;
#}
ENDSOURCE
SOURCE #canInvoiceBeUpdated
#boolean canInvoiceBeUpdated(boolean _excludePending = false)
#{
# boolean ok = true;
# ;
#
# ok = this.mayInvoiceBeUpdated();
#
# if (ok)
# {
# if (!VendTable::canVendorBeUpdated(purchTable.OrderAccount, purchTable.InvoiceAccount, DocumentStatus::Invoice))
# ok = false;
# }
#
# if (ok)
# {
# if (purchTable.InterCompanyOrder
# && purchTable.InterCompanyOriginalSalesId
# && purchTable.InterCompanyDirectDelivery)
# {
# if (!purchTable.interCompanyEndpointActionPolicy().PostPurchInvoice
# && purchTable.interCompanySalesTable().SalesStatus == SalesStatus::Invoiced)
# ok = true;
# else
# ok = false;
# }
# else
# ok = true;
# }
#
# if (ok)
# ok = this.checkPurchQty(DocumentStatus::Invoice, _excludePending);
#
# return ok;
#}
#
ENDSOURCE
SOURCE #canPackingSlipBeUpdated
#boolean canPackingslipBeUpdated(DocumentStatus _documentStatus = DocumentStatus::PackingSlip)
#{
# boolean ok = true;
# ;
#
# if (_documentStatus == DocumentStatus::PackingSlip)
# {
# ok = this.mayPackingSlipBeUpdated();
# }
#
# if (ok)
# {
# if (!VendTable::canVendorBeUpdated(purchTable.OrderAccount, purchTable.InvoiceAccount, DocumentStatus::PackingSlip))
# ok = false;
# }
#
# if (ok)
# ok = this.interCompanyCanBeUpdated();
#
# if (ok)
# ok = this.checkPurchQty(DocumentStatus::PackingSlip);
#
# return ok;
#}
#
ENDSOURCE
SOURCE #canPurchaseOrderBeUpdated
#boolean canPurchaseOrderBeUpdated()
#{
# boolean ok = true;
# ;
#
# ok = this.mayPurchaseOrderBeUpdated();
#
# if (ok)
# ok = this.canPackingslipBeUpdated(DocumentStatus::PurchaseOrder);
#
# return ok;
#}
#
ENDSOURCE
SOURCE #canReceiptsListBeUpdated
#boolean canReceiptsListBeUpdated()
#{
# boolean ok = true;
# ;
#
# ok = this.mayReceiptsListBeUpdated();
#
# if (ok)
# {
# if (!this.canPackingslipBeUpdated(DocumentStatus::ReceiptsList))
# ok = false;
# }
#
# return ok;
#}
#
ENDSOURCE
SOURCE #canReleaseOrderBeCreated
#boolean canReleaseOrderBeCreated()
#{
# return false;
#}
#
ENDSOURCE
SOURCE #canTypeBeChanged
#/*
# Returns true if the purchasetype can be changed
#*/
#public boolean canTypeBeChanged()
#{
# boolean ok = true;
# PurchStatus highestLineStatus;
# ;
#
# if (purchTable.PurchaseType != purchTable.orig().PurchaseType)
# {
# highestLineStatus = PurchLine::highestPurchStatus(purchTable.PurchId);
#
# if (highestLineStatus != PurchStatus::None && highestLineStatus != PurchStatus::Backorder)
# {
# ok = checkFailed(strfmt("@SYS99056",purchTable.orig().PurchaseType,purchTable.PurchaseType));
# }
# }
#
# if (purchTable.isInterCompanyOrder())
# {
# if (purchTable.InterCompanySalesId && !this.interCompanyCreateAllowed())
# {
# ok = checkFailed(strfmt("@SYS98521",purchTable.PurchaseType));
# }
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #canUpdateRemainingQty
#boolean canUpdateRemainingQty()
#{
# return true;
#}
ENDSOURCE
SOURCE #checkDelete
#boolean checkDelete(boolean _useWarning = true)
#{
# boolean ok = (purchTable ? true : false);
# ;
#
# if (purchTable && VendInvoiceJour::existPurchId(purchTable.PurchId))
# {
# switch (PurchParameters::find().AccesLevelInvoiced)
# {
# case SalesPurchAccesLevel::None :
# ok = true;
# break;
#
# case SalesPurchAccesLevel::Warning :
# if (_useWarning)
# {
# if (purchTable.PurchStatus == PurchStatus::Invoiced)
# {
# if (Box::yesNo("@SYS122490",DialogButton::Yes) != DialogButton::Yes)
# ok = false;
# }
# else
# {
# if (Box::yesNo("@SYS122492",DialogButton::Yes) != DialogButton::Yes)
# ok = false;
# }
# }
# break;
#
# case SalesPurchAccesLevel::Locked :
# ok = false;
# break;
# }
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #checkIfUpdate
#container checkIfUpdate(boolean _excludePending = false)
#{
# container c;
#
# c = conins(c, PurchTableType::posPurchaseOrder() , this.canPurchaseOrderBeUpdated());
# c = conins(c, PurchTableType::posReceiptsList() , this.canReceiptsListBeUpdated());
# c = conins(c, PurchTableType::posPackingSlip() , this.canPackingslipBeUpdated());
# c = conins(c, PurchTableType::posInvoice() , this.canInvoiceBeUpdated(_excludePending));
#
# return c;
#}
ENDSOURCE
SOURCE #checkPurchQty
#boolean checkPurchQty(DocumentStatus documentStatus, boolean _excludePending = false)
#{
# boolean ok = false;
# PurchQuantity purchQuantity;
# PurchLine purchLine;
# PurchQty purchQty;
# ;
#
# purchQuantity = PurchQuantity::construct(documentStatus, _excludePending);
#
# while select purchLine
# index hint PurchLineIdx
# where purchLine.PurchId == purchTable.PurchId
# && ((purchLine.PurchStatus != PurchStatus::Invoiced && purchLine.PurchStatus != PurchStatus::Canceled)
# || (purchLine.PurchReceivedNow != 0))
# {
# [purchQty] = purchQuantity.qtyPurch(purchLine, PurchUpdate::All);
#
# if (purchQty)
# {
# ok = true;
# break;
# }
#
# [purchQty] = purchQuantity.qtyPurch(purchLine, PurchUpdate::ReceiveNow);
#
# if (purchQty)
# {
# ok = true;
# break;
# }
# }
#
# return ok;
#}
#
ENDSOURCE
SOURCE #classDeclaration
#class PurchTableType
#extends InventType
#{
# PurchTable purchTable;
# PurchTable purchTable_Orig;
# boolean update;
#
# NumberSeqFormHandler numberSeqFormHandlerPurchId;
# PurchaseType purchType;
#
# ProjId projId;
#
# SalesPurchCycle salesPurchCycle;
# boolean purchCycle;
#}
ENDSOURCE
SOURCE #delete
#public void delete()
#{
# #OCCRetryCount
# SpecTransManager specTransManager;
# PurchLine purchLine;
# PurchTableLinks purchTableLinks;
# ;
# try
# {
# ttsbegin;
#
# if (purchTable.SkipUpdate != InterCompanySkipUpdate::InterCompany
# && purchTable.SkipUpdate != InterCompanySkipUpdate::Both)
# this.interCompanyDelete();
#
# while select forupdate purchLine
# where purchLine.PurchId == purchTable.PurchId
# {
# if (purchLine.validateDelete(true))
# purchLine.delete();
# }
#
# if (purchTable.SkipUpdate != InterCompanySkipUpdate::Internal
# && purchTable.SkipUpdate != InterCompanySkipUpdate::Both)
# this.deleteSalesTable();
#
# specTransManager = SpecTransManager::construct(purchTable);
# specTransManager.deleteAll();
#
# purchTable = PurchTable::find(purchTable.PurchId, update);
#
# if (purchTable)
# {
# if (PurchParameters::find().CancelPurch == NoYes::Yes)
# PurchTableDelete::createFromPurchTable(purchTable);
#
# purchTableLinks = PurchTableLinks::find(purchTable.PurchId,true);
# if (purchTableLinks)
# purchTableLinks.delete();
#
# purchTable.doDelete();
# }
#
# ttscommit;
# }
# catch (Exception::Deadlock)
# {
# retry;
# }
# catch (Exception::UpdateConflict)
# {
# if (appl.ttsLevel() == 0)
# {
# if (xSession::currentRetryCount() >= #RetryNum)
# {
# throw Exception::UpdateConflictNotRecovered;
# }
# else
# {
# retry;
# }
# }
# else
# {
# throw Exception::UpdateConflict;
# }
# }
# catch (Exception::Error)
# {
# ttsabort;
# throw error("@SYS93835");
# }
#}
ENDSOURCE
SOURCE #deleteSalesTable
#void deleteSalesTable()
#{
# SalesTable salesTable;
#;
# if (purchTable.SkipUpdate == InterCompanySkipUpdate::Internal
# || purchTable.SkipUpdate == InterCompanySkipUpdate::Both
# || !purchTable.isInterCompanyOrder())
# return;
#
# salesTable = SalesTable::find(purchTable.InterCompanyOriginalSalesId,true);
#
# if (salesTable
# && !salesTable.existSalesLine())
# {
# salesTable.SkipUpdate = InterCompanySkipUpdate::Internal;
# salesTable.delete();
# }
#}
ENDSOURCE
SOURCE #editInvoiceAccount
#boolean editInvoiceAccount()
#{
# return ! purchTable.isInterCompanyOrder();
#}
ENDSOURCE
SOURCE #editOrderAccount
#boolean editOrderAccount()
#{
# return ! purchTable.isInterCompanyOrder();
#}
ENDSOURCE
SOURCE #editPurchType
#boolean editPurchType()
#{
# return true;
#}
ENDSOURCE
SOURCE #formMethodClose
#public void formMethodClose()
#{
# if (numberSeqFormHandlerPurchId)
# {
# numberSeqFormHandlerPurchId.formMethodClose();
# }
#}
ENDSOURCE
SOURCE #formMethodDataSourceCreate
#public void formMethodDataSourceCreate(FormRun _element, FormDataSource _purchtable_ds)
#{
# this.numberSeqFormHandlerPurchId(_element, _purchtable_ds).formMethodDataSourceCreate();
#}
ENDSOURCE
SOURCE #formMethodDataSourceDelete
#public void formMethodDataSourceDelete(FormRun _element, FormDataSource _purchtable_ds)
#{
# this.numberSeqFormHandlerPurchId(_element, _purchtable_ds).formMethodDataSourceDelete();
#}
ENDSOURCE
SOURCE #formMethodDataSourceLinkActive
#public void formMethodDataSourceLinkActive(FormRun _element, FormDataSource _purchTable_ds)
#{
# this.numberSeqFormHandlerPurchId(_element, _purchTable_ds).formMethodDataSourceLinkActive();
#}
ENDSOURCE
SOURCE #formMethodDataSourceValidateWrite
#public boolean formMethodDataSourceValidateWrite(FormRun _element, FormDataSource _purchTable_ds)
#{
# boolean ret = true;
#
# if (!this.numberSeqFormHandlerPurchId(_element, _purchTable_ds).formMethodDataSourceValidateWrite())
# {
# ret = false;
# }
#
# return ret;
#}
ENDSOURCE
SOURCE #formMethodDataSourceWrite
#public void formMethodDataSourceWrite(FormRun _element, FormDataSource _purchTable_ds)
#{
# this.numberSeqFormHandlerPurchId(_element, _purchTable_ds).formMethodDataSourceWrite();
#}
ENDSOURCE
SOURCE #initValue
#void initValue()
#{
# ;
# // Israel-Localisation-Prodware-ImportFolder-Begin
# purchTable.BPLRequestedDlvDate = systemdateget();
# purchTable.BPLVendorConfirmedDlvDate = systemdateget();
# // Israel-Localisation-Prodware-ImportFolder-End
# purchTable.DeliveryDate = systemdateget();
#
# purchTable.PurchStatus = PurchStatus::Backorder;
# purchTable.TransactionCode = IntrastatParameters::find().DefaultSalePurchase;
# purchTable.Transport = IntrastatParameters::find().TransportModeParm;
# purchTable.Port = IntrastatParameters::find().PortParm;
# purchTable.StatProcId = IntrastatParameters::find().StatProcIdParm;
# purchTable.CountyOrigDest = IntrastatParameters::find().CountyOrigDest;
# purchTable.PurchPoolId = PurchParameters::find().PurchPoolId;
#
# if (VendParameters::find().AutoSettle == NoYes::Yes)
# purchTable.SettleVoucher = SettlementType::OpenTransact;
#
# purchTable.PostingProfile = VendParameters::find().PostingProfile;
# purchTable.PurchaseType = PurchParameters::find().PurchaseType;
# purchTable.PurchPlacer = PurchTable::getCurrentemployee();
#}
ENDSOURCE
SOURCE #insert
#void insert(boolean _interCompanySilent = false)
#{
# #OCCRetryCount
# ;
# try
# {
# ttsbegin;
#
# if (purchTable.SkipUpdate != InterCompanySkipUpdate::InterCompany
# && purchTable.SkipUpdate != InterCompanySkipUpdate::Both)
# this.interCompanyMirror(_interCompanySilent);
#
# purchTable.doInsert();
#
# if (purchTable.OneTimeVendor && !purchTable.OrderAccount)
# purchTable.createOneTimeAccount();
#
# if (purchTable.PurchaseType != PurchaseType::ReturnItem
# || (purchTable.PurchaseType == PurchaseType::ReturnItem &&
# purchTable.SkipUpdate == InterCompanySkipUpdate::No))
# purchTable.createMarkupTrans();
#
# if (purchTable.InterCompanyOriginalSalesId)
# purchTable.interCompanyPurchSalesReferenceCreate();
#
# if (purchTable.SkipUpdate != InterCompanySkipUpdate::InterCompany
# && purchTable.SkipUpdate != InterCompanySkipUpdate::Both)
# this.interCompanyMarkupMirror();
#
# purchTable.SkipUpdate = InterCompanySkipUpdate::No;
# purchTable.doUpdate();
#
# ttscommit;
# }
# catch (Exception::Deadlock)
# {
# retry;
# }
# catch (Exception::UpdateConflict)
# {
# if (appl.ttsLevel() == 0)
# {
# if (xSession::currentRetryCount() >= #RetryNum)
# {
# throw Exception::UpdateConflictNotRecovered;
# }
# else
# {
# retry;
# }
# }
# else
# {
# throw Exception::UpdateConflict;
# }
# }
# catch (Exception::Error)
# {
# ttsabort;
# throw error("@SYS93835");
# }
#}
#
ENDSOURCE
SOURCE #interCompanyCanBeUpdated
#private boolean interCompanyCanBeUpdated()
#{;
# if (purchTable.InterCompanyOrder
# && purchTable.InterCompanyOriginalSalesId
# && purchTable.InterCompanyDirectDelivery)
# return false;
# else
# return true;
#}
#
#
ENDSOURCE
SOURCE #interCompanyCreateAllowed
#boolean interCompanyCreateAllowed()
#{;
# return false;
#}
#
#
ENDSOURCE
SOURCE #interCompanyDelete
#void interCompanyDelete()
#{
# SalesTable salesTable;
# ;
# if (purchTable.SkipUpdate == InterCompanySkipUpdate::InterCompany
# || purchTable.SkipUpdate == InterCompanySkipUpdate::Both
# || !purchTable.isInterCompanyOrder()
# || !this.interCompanyCreateAllowed())
# return;
#
# if (! TradeInterCompany::checkDataAreaAccess(purchTable.InterCompanyCompanyId))
# return;
#
# changecompany(purchTable.InterCompanyCompanyId)
# {
# setprefix(strfmt("@SYS93821",TradeInterCompany::curCompanyName()));
#
# salesTable = SalesTable::find(purchTable.InterCompanySalesId, true);
#
# if (salesTable)
# {
# salesTable.SkipUpdate = InterCompanySkipUpdate::InterCompany;
# salesTable.delete();
# }
# }
#}
#
ENDSOURCE
SOURCE #interCompanyIsDerivedOrder
#public boolean interCompanyIsDerivedOrder()
#{
# ;
#
# return (purchTable.isInterCompanyOrder() &&
# purchTable.InterCompanyOrigin == InterCompanyOrigin::Derived);
#}
ENDSOURCE
SOURCE #interCompanyMarkupMirror
#void interCompanyMarkupMirror()
#{
# SalesTable salesTable;
# MarkupTrans markupTrans;
#;
# if (!purchTable.isInterCompanyOrder())
# return;
#
# changecompany(purchTable.InterCompanyCompanyId)
# {
# setprefix(strfmt("@SYS93821",TradeInterCompany::curCompanyName()));
#
# salesTable = SalesTable::find(purchTable.InterCompanySalesId);
# if (salesTable)
# {
# while select forupdate markupTrans
# index hint TableRecIdIdx
# where markupTrans.TransTableId == salesTable.TableId
# && markupTrans.TransRecId == salesTable.RecId
# {
# markupTrans.update();
# }
# }
# }
#}
#
ENDSOURCE
SOURCE #interCompanyMirror
#void interCompanyMirror(boolean _interCompanySilent = false)
#{
# #InterCompany
# AifEndpointId endpointId = VendTable::find(purchTable.OrderAccount).interCompanyEndpointId();
# AifEndpoint toEndpoint;
# InterCompanyEndpointActionPolicy fromEndpointActionPolicy;
# AifEndpointActionValueMap fromEndpointActionValueMap;
# InterCompanyEndpointActionPolicy toEndpointActionPolicy;
# AifEndpointActionValueMap toEndpointActionValueMap;
#
# AifActionId defaultPurchaseRequisitionAction = #DefaultPurchaseRequisitionAction;
# AifActionId defaultSalesOrderAction = #DefaultSalesOrderAction;
#
# PurchLine purchLine;
# PurchLineType purchLineType;
# AxSalesTable axSalesTable;
#
# TradeInterCompanyConv convAccount;
# TradeInterCompanyConv convCurrency;
# TradeInterCompanyConv convDlvTerm, convDlvTermSyncBack;
# TradeInterCompanyConv convDlvMode, convDlvModeSyncBack;
# TradeInterCompanyConv convStreetName;
# TradeInterCompanyConv convCity;
# TradeInterCompanyConv convZipCode;
# TradeInterCompanyConv convCountryRegion;
# TradeInterCompanyConv convState;
# TradeInterCompanyConv convCounty;
# TradeInterCompanyConv convDimension;
# boolean dimensionUpdated;
# TradeInterCompanyConv convReturnReasonCode;
#
# SalesTable salesTableOriginal, salesTableLocal;
# SalesIdBlanket salesIdBlanket;
# SalesParameters salesParameters;
# int i;
# boolean create;
# ;
# if (purchTable.SkipUpdate == InterCompanySkipUpdate::InterCompany
# || purchTable.SkipUpdate == InterCompanySkipUpdate::Both
# || !purchTable.isInterCompanyOrder()
# || !this.interCompanyCreateAllowed()
# || !purchTable.interCompanyUpdateNow())
# return;
#
# if (! TradeInterCompany::checkDataAreaAccess(purchTable.InterCompanyCompanyId))
# {
# purchTable.InterCompanyOrder = false;
# purchTable.InterCompanyCompanyId = '';
# purchTable.InterCompanySalesId = '';
#
# return;
# }
#
# fromEndpointActionPolicy = InterCompanyEndpointActionPolicy::find(endpointId, defaultPurchaseRequisitionAction);
# fromEndpointActionValueMap = AifEndpointActionValueMap::find(endpointId, defaultPurchaseRequisitionAction);
#
# convAccount = new TradeInterCompanyConv();
# convAccount.axVendAccount(fromEndpointActionValueMap, purchTable.OrderAccount);
#
# convCurrency = new TradeInterCompanyConv();
# convCurrency.axCurrencyCode(fromEndpointActionValueMap, purchTable.CurrencyCode);
#
# if (purchTable.DlvTerm)
# {
# convDlvTerm = new TradeInterCompanyConv();
# convDlvTerm.axDlvTermId(fromEndpointActionValueMap, purchTable.DlvTerm);
# }
# if (purchTable.DlvMode)
# {
# convDlvMode = new TradeInterCompanyConv();
# convDlvMode.axDlvModeId(fromEndpointActionValueMap, purchTable.DlvMode);
# }
# if (purchTable.ReturnReasonCodeId)
# {
# convReturnReasonCode = new TradeInterCompanyConv();
# convReturnReasonCode.axReturnReasonCodeId(fromEndpointActionValueMap, purchTable.ReturnReasonCodeId);
# }
#
# convStreetName = new TradeInterCompanyConv();
# convStreetName.axStreetName(purchTable.DeliveryStreet);
#
# convZipCode = new TradeInterCompanyConv();
# convZipCode.axZipCodeId (fromEndpointActionValueMap, purchTable.DeliveryZipCode);
#
# convCity = new TradeInterCompanyConv();
# convCity.axCity(purchTable.DeliveryCity);
#
# convCountryRegion = new TradeInterCompanyConv();
# convCountryRegion.axCountryId(fromEndpointActionValueMap, purchTable.DlvCountryRegionId);
#
# convState = new TradeInterCompanyConv();
# convState.axStateId(fromEndpointActionValueMap, purchTable.DlvCountryRegionId, purchTable.DlvState);
#
# convCounty = new TradeInterCompanyConv();
# convCounty.axCountyId(fromEndpointActionValueMap, purchTable.DlvCountryRegionId, purchTable.DlvState, purchTable.DlvCounty);
#
# salesTableOriginal = purchTable.interCompanySalesTableOriginal();
# salesIdBlanket = PurchTable::find(purchTable.purchIdBlanket()).InterCompanySalesId;
#
#
# changecompany(purchTable.InterCompanyCompanyId)
# {
# setprefix(strfmt("@SYS93821",TradeInterCompany::curCompanyName()));
#
# toEndpoint = AifEndpoint::findInterCompany(fromEndpointActionValueMap.DataAreaId);
# toEndpointActionPolicy = InterCompanyEndpointActionPolicy::find(toEndpoint.EndpointId, defaultSalesOrderAction);
# toEndpointActionValueMap = AifEndpointActionValueMap::find(toEndpoint.EndpointId, defaultSalesOrderAction);
#
# axSalesTable = SalesTable::find(purchTable.InterCompanySalesId, true).axSalesTable();
# axSalesTable.parmSkipUpdate(InterCompanySkipUpdate::InterCompany);
#
# if (!axSalesTable.salesTable().RecId)
# create = true;
#
# if (create)
# {
# switch(toEndpointActionPolicy.SalesIdNumbering)
# {
# case(InterCompanySalesIdNumbering::NumberSequence):
# if (toEndpointActionPolicy.SalesIdNumberSequenceCode)
# {
# axSalesTable.parmSalesId(NumberSeq::newGetNumFromCode(toEndpointActionPolicy.SalesIdNumberSequenceCode).num());
# }
# break;
#
# case(InterCompanySalesIdNumbering::Original):
# if (purchTable.InterCompanyOriginalSalesId)
# {
# if (SalesTable::exist (purchTable.InterCompanyOriginalSalesId)
# || SalesTableDelete::exist(purchTable.InterCompanyOriginalSalesId))
# warning(strfmt("@SYS94302",purchTable.InterCompanyOriginalSalesId));
# else
# axSalesTable.parmSalesId(purchTable.InterCompanyOriginalSalesId);
# }
# else
# {
# if (SalesTable::exist (purchTable.PurchId)
# || SalesTableDelete::exist(purchTable.PurchId))
# warning(strfmt("@SYS94302",purchTable.PurchId));
# else
# axSalesTable.parmSalesId(purchTable.PurchId);
# }
# break;
#
# case(InterCompanySalesIdNumbering::CompanyOriginal):
# if (purchTable.InterCompanyOriginalSalesId)
# {
# if (SalesTable::exist (purchTable.DataAreaId+purchTable.InterCompanyOriginalSalesId)
# || SalesTableDelete::exist(purchTable.DataAreaId+purchTable.InterCompanyOriginalSalesId))
# warning(strfmt("@SYS94302",purchTable.DataAreaId+purchTable.InterCompanyOriginalSalesId));
# else
# axSalesTable.parmSalesId(purchTable.DataAreaId+purchTable.InterCompanyOriginalSalesId);
# }
# else
# {
# if (SalesTable::exist (purchTable.DataAreaId+purchTable.PurchId)
# || SalesTableDelete::exist(purchTable.DataAreaId+purchTable.PurchId))
# warning(strfmt("@SYS94302",purchTable.DataAreaId+purchTable.PurchId));
# else
# axSalesTable.parmSalesId(purchTable.DataAreaId+purchTable.PurchId);
# }
# break;
# }
# }
#
# if (create)
# {
# axSalesTable.parmReturnStatus(this.interCompanyReturnStatusCreated());
# }
#
# if (create || purchTable.fieldChanged(fieldnum(PurchTable, OrderAccount)))
# {
# axSalesTable.parmCustAccount(convAccount.axCustAccount(toEndpointActionValueMap));
# axSalesTable.salesTable().initFromCustTable();
# }
#
# axSalesTable.parmInterCompanyCompanyId (purchTable.DataAreaId);
# axSalesTable.parmInterCompanyOrder (purchTable.InterCompanyOrder);
# axSalesTable.parmInterCompanyPurchId (purchTable.PurchId);
# axSalesTable.parmInterCompanyOriginalSalesId (purchTable.InterCompanyOriginalSalesId);
# axSalesTable.parmInterCompanyOriginalCustAccount (purchTable.InterCompanyOriginalCustAccount);
# axSalesTable.parmInterCompanyDirectDeliveryOrig (purchTable.InterCompanyDirectDelivery);
# axSalesTable.parmInterCompanyAllowIndirectCreationOri(purchTable.InterCompanyAllowIndirectCreation);
#
# if (create || purchTable.fieldChanged(fieldnum(PurchTable, PurchaseType)))
# {
# switch(purchTable.PurchaseType)
# {
# case PurchaseType::Subscription : axSalesTable.parmSalesType(SalesType::Subscription); break;
# case PurchaseType::Purch : axSalesTable.parmSalesType(SalesType::Sales); break;
# case PurchaseType::ReturnItem : axSalesTable.parmSalesType(SalesType::ReturnItem); break;
# case PurchaseType::Blanket : axSalesTable.parmSalesType(SalesType::Blanket); break;
#
# default : axSalesTable.parmSalesType(SalesType::Journal);
# }
# }
#
# axSalesTable.salesIdBlanket(salesIdBlanket);
#
# if (create || purchTable.fieldChanged(fieldnum(PurchTable, CurrencyCode)))
# axSalesTable.parmCurrencyCode(convCurrency.axCurrencyCode(toEndpointActionValueMap));
#
# if (create)
# {
# if (purchTable.DlvTerm)
# {
# axSalesTable.parmDlvTerm(convDlvTerm.axDlvTermId(toEndpointActionValueMap));
# }
# else if (axSalesTable.parmDlvTerm())
# {
# convDlvTermSyncBack = new TradeInterCompanyConv();
# convDlvTermSyncBack.axDlvTermId(toEndpointActionValueMap, axSalesTable.parmDlvTerm());
#
# changecompany(purchTable.DataAreaId)
# {
# setprefix(strfmt("@SYS93821",TradeInterCompany::curCompanyName()));
#
# purchTable.DlvTerm = convDlvTermSyncBack.axDlvTermId(fromEndpointActionValueMap);
# }
# }
# }
# else if (purchTable.fieldChanged(fieldnum(PurchTable, DlvTerm)))
# {
# axSalesTable.parmDlvTerm(purchTable.DlvTerm ? convDlvTerm.axDlvTermId(toEndpointActionValueMap) : '');
# }
#
# if (create)
# {
# if (purchTable.DlvMode)
# {
# axSalesTable.parmDlvMode(convDlvMode.axDlvModeId(toEndpointActionValueMap));
# }
# else if (axSalesTable.parmDlvMode())
# {
# convDlvModeSyncBack = new TradeInterCompanyConv();
# convDlvModeSyncBack.axDlvModeId(toEndpointActionValueMap, axSalesTable.parmDlvMode());
#
# changecompany(purchTable.DataAreaId)
# {
# setprefix(strfmt("@SYS93821",TradeInterCompany::curCompanyName()));
#
# purchTable.DlvMode = convDlvModeSyncBack.axDlvModeId(fromEndpointActionValueMap);
# }
# }
# }
# else if (purchTable.fieldChanged(fieldnum(PurchTable, DlvMode)))
# {
# axSalesTable.parmDlvMode(purchTable.DlvMode ? convDlvMode.axDlvModeId(toEndpointActionValueMap) : '');
# }
#
# if (create || purchTable.fieldChanged(fieldnum(PurchTable, DeliveryDate)))
# axSalesTable.parmDeliveryDate(purchTable.DeliveryDate);
#
# if (create || purchTable.fieldChanged(fieldnum(PurchTable, DeliveryAddress)))
# axSalesTable.parmDeliveryAddress(purchTable.DeliveryAddress);
#
# if (create || purchTable.fieldChanged(fieldnum(PurchTable, DeliveryName)))
# axSalesTable.parmDeliveryName(purchTable.DeliveryName);
#
# if (create || purchTable.fieldChanged(fieldnum(PurchTable, DeliveryStreet)))
# axSalesTable.parmDeliveryStreet(convStreetName.axStreetName());
#
# if (create || purchTable.fieldChanged(fieldnum(PurchTable, DeliveryZipCode)))
# axSalesTable.parmDeliveryZipCode(convZipCode.axZipCodeId(toEndpointActionValueMap));
#
# if (create || purchTable.fieldChanged(fieldnum(PurchTable, DeliveryCity)))
# axSalesTable.parmDeliveryCity(convCity.axCity());
#
# if (create || purchTable.fieldChanged(fieldnum(PurchTable, DlvCountryRegionId)))
# axSalesTable.parmDeliveryCountryRegionId(convCountryRegion.axCountryId(toEndpointActionValueMap));
#
# if (create || purchTable.fieldChanged(fieldnum(PurchTable, DlvState)))
# axSalesTable.parmDeliveryState(convState.axStateId(toEndpointActionValueMap, axSalesTable.parmDeliveryCountryRegionId()));
#
# if (create || purchTable.fieldChanged(fieldnum(PurchTable, DlvCounty)))
# axSalesTable.parmDeliveryCounty(convCounty.axCountyId(toEndpointActionValueMap,
# axSalesTable.parmDeliveryCountryRegionId(),
# axSalesTable.parmDeliveryState()));
#
# if (create || purchTable.fieldChanged(fieldnum(PurchTable, DiscPercent)))
# axSalesTable.parmDiscPercent(purchTable.DiscPercent);
#
# if (purchTable.interCompanyEndpointActionPolicy().transferExternal().CustomerInfo)
# {
# if (create || purchTable.fieldChanged(fieldnum(PurchTable, InterCompanyCustPurchOrderFormNum)))
# axSalesTable.parmPurchOrderFormNum(purchTable.InterCompanyCustPurchOrderFormNum);
# if (create || purchTable.fieldChanged(fieldnum(PurchTable, VendorRef)))
# axSalesTable.parmCustomerRef(purchTable.VendorRef);
# }
# else
# {
# axSalesTable.parmPurchOrderFormNum(purchTable.PurchId);
# }
# if (purchTable.interCompanyEndpointActionPolicy().transferExternal().ReturnItemNum)
# {
# if (create || purchTable.fieldChanged(fieldnum(PurchTable, ReturnItemNum)))
# axSalesTable.parmReturnItemNum(purchTable.ReturnItemNum);
# }
# if (!axSalesTable.salesTable().ReturnItemNum)
# {
# axSalesTable.parmReturnItemNum(NumberSeq::newGetNum(SalesParameters::numRefReturnItemNum()).num());
# }
#
# if (create || purchTable.fieldChanged(fieldnum(PurchTable, ReturnReasonCodeId)))
# axSalesTable.parmReturnReasonCodeId(purchTable.ReturnReasonCodeId ? convReturnReasonCode.axReturnReasonCodeId(toEndpointActionValueMap) : '');
#
# if (create || purchTable.fieldChanged(fieldnum(PurchTable, ReturnReplacementCreated)))
# axSalesTable.parmReturnReplacementCreated(purchTable.ReturnReplacementCreated);
#
# if (create || purchTable.fieldChanged(fieldnum(PurchTable, Dimension)))
# {
# dimensionUpdated = false;
# for (i=1; i<=enumcnt(SysDimension) ; i++)
# {
# if (fromEndpointActionValueMap.xmlMapDimension[i] != XMLMapExternalCode::NotSpecified
# && toEndpointActionValueMap.xmlMapDimension[i] != XMLMapExternalCode::NotSpecified)
# {
# changecompany(purchTable.DataAreaId)
# {
# setprefix(strfmt("@SYS93821",TradeInterCompany::curCompanyName()));
#
# convDimension = new TradeInterCompanyConv();
# convDimension.axDimension(fromEndpointActionValueMap, i-1, purchTable.Dimension[i]);
# }
# axSalesTable.setDimensionElement(i, convDimension.axDimension(toEndpointActionValueMap, i-1));
# dimensionUpdated = true;
# }
# }
#
# if (dimensionUpdated)
# {
# TradeInterCompany::checkDimensions(axSalesTable.salesTable().Dimension);
# appl.dimensionSetValidation().checkDimension(axSalesTable.salesTable(),fieldnum(SalesTable,Dimension),true);
# }
# }
#
# if (create)
# {
# axSalesTable.parmReceiptDateConfirmed(dateNull());
# axSalesTable.parmShippingDateConfirmed(dateNull());
# }
# if (purchTable.InterCompanyDirectDelivery)
# {
# if (new DictConfigurationKey(configurationkeynum(SalesDeliveryDateControl)).enabled())
# {
# axSalesTable.parmReceiptDateRequested (purchTable.DeliveryDate);
# if (purchTable.InterCompanyOriginalSalesId)
# axSalesTable.parmShippingDateRequested(purchTable.ShippingDateRequested ? purchTable.ShippingDateRequested : purchTable.DeliveryDate);
# else
# axSalesTable.parmShippingDateRequested(purchTable.DeliveryDate);
# }
# else
# axSalesTable.parmShippingDateRequested(purchTable.DeliveryDate);
# }
# else
# {
# if (new DictConfigurationKey(configurationkeynum(SalesDeliveryDateControl)).enabled())
# {
# axSalesTable.parmReceiptDateRequested (purchTable.DeliveryDate);
# if (create
# || purchTable.fieldChanged(fieldnum(PurchTable, DeliveryDate))
# || purchTable.fieldChanged(fieldnum(PurchTable, DlvMode)))
# {
# if (SalesParameters::find().DeliveryDateControlType != SalesDeliveryDateControlType::None)
# {
# buf2Buf(axSalesTable.salesTable(),salesTableLocal);
# salesParameters = SalesParameters::find();
# salesTableLocal.DeliveryDateControlType = salesParameters.DeliveryDateControlType;
# SalesCalcAvailableDlvDates::validateWritePrompt(salesTableLocal,false,true,true,false);
# if (salesTableLocal.ShippingDateRequested)
# {
# if (salesTableLocal.ShippingDateRequested < systemdateget())
# {
# if (purchTable.DeliveryDate < systemdateget())
# salesTableLocal.ShippingDateRequested = dateNull();
# else
# salesTableLocal.ShippingDateRequested = systemdateget();
# }
# }
# axSalesTable.parmShippingDateRequested(salesTableLocal.ShippingDateRequested ? salesTableLocal.ShippingDateRequested : purchTable.DeliveryDate);
# }
# else
# axSalesTable.parmShippingDateRequested(purchTable.DeliveryDate);
# }
# else
# axSalesTable.parmShippingDateRequested(purchTable.DeliveryDate);
# }
# else
# axSalesTable.parmShippingDateRequested(purchTable.DeliveryDate);
# }
# axSalesTable.parmDeliveryDateControlType(SalesDeliveryDateControlType::None);
#
# if (create)
# axSalesTable.parmInterCompanyOrigin(InterCompanyOrigin::Derived);
#
# axSalesTable.save();
#
# if (create
# && !_interCompanySilent)
# {
# info(strfmt("@SYS94303",axSalesTable.salesTable().SalesId),'', SysInfoAction_TableField::newBuffer(axSalesTable.salesTable()));
# }
#
# purchTable.InterCompanySalesId = axSalesTable.parmSalesId();
# }
#
# if (create && purchTable.fieldChanged(fieldnum(PurchTable, PurchaseType)))
# {
# if (purchTable.existPurchLine())
# {
# while select forupdate purchLine
# index hint PurchLineIdx
# where purchLine.PurchId == purchTable.PurchId
# {
# purchLineType = PurchLineType::construct(purchLine,purchTable);
# purchLineType.update(false,true);
# }
# }
# }
#}
#
ENDSOURCE
SOURCE #interCompanyReturnStatusCreated
#protected ReturnStatusHeader interCompanyReturnStatusCreated()
#{;
# return ReturnStatusHeader::None;
#}
ENDSOURCE
SOURCE #inventLotInvoke
#boolean inventLotInvoke()
#{
# return true;
#}
ENDSOURCE
SOURCE #inventOnhandInvoke
#boolean inventOnhandInvoke()
#{
# return true;
#}
ENDSOURCE
SOURCE #inventTransactInvoke
#boolean inventTransactInvoke()
#{
# return true;
#}
ENDSOURCE
SOURCE #mayInvoiceBeUpdated
#boolean mayInvoiceBeUpdated()
#{
# boolean ok = true;
# ;
#
# if (ok && purchCycle)
# {
# salesPurchCycle = SalesPurchCycle::find(SalesPurchCycleAction::Invoice, SalesPurchCycleModuleParameter::Vend, purchTable.OrderAccount);
#
# if(salesPurchCycle)
# {
# if(!salesPurchCycle.Active)
# {
# ok = false;
# }
# }
# else
# {
# if (!SalesPurchCycle::find(SalesPurchCycleAction::Invoice, SalesPurchCycleModuleParameter::VendParameter, '').Active)
# {
# ok = false;
# }
# }
# }
# return ok;
#}
#
ENDSOURCE
SOURCE #mayPackingSlipBeUpdated
#boolean mayPackingSlipBeUpdated()
#{
# boolean ok = true;
# ;
#
# if (ok && purchCycle)
# {
# salesPurchCycle = SalesPurchCycle::find(SalesPurchCycleAction::PackingSlip, SalesPurchCycleModuleParameter::Vend, purchTable.OrderAccount);
#
# if(salesPurchCycle)
# {
# if(!salesPurchCycle.Active)
# {
# ok = false;
# }
# }
# else
# {
# if (!SalesPurchCycle::find(SalesPurchCycleAction::PackingSlip, SalesPurchCycleModuleParameter::VendParameter, '').Active)
# {
# ok = false;
# }
# }
# }
# return ok;
#}
#
ENDSOURCE
SOURCE #mayPurchaseOrderBeUpdated
#boolean mayPurchaseOrderBeUpdated()
#{
# boolean ok = true;
# ;
#
# ok = (!(purchTable.PurchStatus == PurchStatus::Invoiced ||
# purchTable.PurchStatus == PurchStatus::Received ||
# purchTable.PurchStatus == PurchStatus::Canceled));
#
# if (ok && purchCycle)
# {
# salesPurchCycle = SalesPurchCycle::find(SalesPurchCycleAction::PurchaseOrder, SalesPurchCycleModuleParameter::Vend, purchTable.OrderAccount);
#
# if(salesPurchCycle)
# {
# if(!salesPurchCycle.Active)
# {
# ok = false;
# }
# }
# else
# {
# if (!SalesPurchCycle::find(SalesPurchCycleAction::PurchaseOrder, SalesPurchCycleModuleParameter::VendParameter, '').Active)
# {
# ok = false;
# }
# }
# }
#
# return ok;
#}
#
ENDSOURCE
SOURCE #mayReceiptsListBeUpdated
#boolean mayReceiptsListBeUpdated()
#{
# boolean ok = true;
# ;
#
# if (ok && purchCycle)
# {
# salesPurchCycle = SalesPurchCycle::find(SalesPurchCycleAction::ReceiptsList, SalesPurchCycleModuleParameter::Vend, purchTable.OrderAccount);
#
# if(salesPurchCycle)
# {
# if(!salesPurchCycle.Active)
# {
# ok = false;
# }
# }
# else
# {
# if (!SalesPurchCycle::find(SalesPurchCycleAction::ReceiptsList, SalesPurchCycleModuleParameter::VendParameter, '').Active)
# {
# ok = false;
# }
# }
# }
# return ok;
#}
#
ENDSOURCE
SOURCE #modifyPurchaseType
#///
#/// Modifies the related field and table values when the PurchaseType field value of the
#/// PurchTable table buffer is changed.
#///
#///
#/// The fixed asset fields of all PurchLine detail records need to be cleared out if the
#/// purchase type does not support entering fixed assets.
#///
#public void modifyPurchaseType()
#{
# PurchLine purchLine;
# ;
#
# if ((purchTable) && (purchTable.PurchaseType != PurchaseType::Purch) &&
# (purchTable.PurchaseType != PurchaseType::Subscription) &&
# (purchTable.PurchaseType != PurchaseType::Blanket))
# {
# ttsbegin;
#
# while select forupdate purchLine
# where purchLine.PurchId == purchTable.PurchId
# {
# if ((purchLine.CreateFixedAsset == NoYes::Yes) || (purchLine.AssetId))
# {
# purchLine.CreateFixedAsset = NoYes::No;
# purchLine.AssetGroup = '';
# purchLine.AssetId = '';
# purchLine.AssetGroup = '';
# purchLine.AssetBookId = '';
# purchLine.update();
# }
# } // while
#
# ttscommit;
# } // if
#
#}
ENDSOURCE
SOURCE #mustBeCovPlanned
#boolean mustBeCovPlanned()
#{
# PurchLine purchLine;
# ;
#
# if (purchTable.PurchStatus != PurchStatus::Invoiced)
# {
# while select purchLine
# index hint PurchLineIdx
# where purchLine.PurchId == purchTable.PurchId
# {
# if (purchLine.mustBeCovPlanned())
# return true;
# }
# }
# else
# {
# return true;
# }
#
# return false;
#}
#
ENDSOURCE
SOURCE #new
#void new(PurchTable _purchTable)
#{;
# purchTable = _purchTable;
# purchTable_Orig = _purchTable.orig();
# update = true;
# purchType = PurchParameters::find().PurchaseType;
# purchCycle = VendParameters::find().PurchCycle;
#
# super(_purchTable);
#}
#
ENDSOURCE
SOURCE #numberSeqFormHandlerPurchId
#protected NumberSeqFormHandler numberSeqFormHandlerPurchId(FormRun _element, FormDataSource _purchTable_ds)
#{
# if (!numberSeqFormHandlerPurchId)
# {
# numberSeqFormHandlerPurchId = NumberSeqFormHandler::newForm(PurchParameters::numRefPurchId().NumberSequence,
# _element,
# _purchTable_ds,
# fieldnum(PurchTable, PurchId)
# );
# }
# return numberSeqFormHandlerPurchId;
#}
ENDSOURCE
SOURCE #parmNumberSeqFormHandlerPurchId
#public NumberSeqFormHandler parmNumberSeqFormHandlerPurchId(NumberSeqFormHandler _numberSeqFormHandlerPurchId = numberSeqFormHandlerPurchId)
#{
# numberSeqFormHandlerPurchId = _numberSeqFormHandlerPurchId;
# return numberSeqFormHandlerPurchId;
#}
ENDSOURCE
SOURCE #setTaxGroup
#void setTaxGroup(TaxGroup _taxGroup)
#{
# ;
# purchTable.TaxGroup = _taxGroup;
#}
#
ENDSOURCE
SOURCE #syncSalesTable
#AxSalesTable syncSalesTable(PurchTable _purchTable, SalesTable _salesTable = null, boolean _forceAddressSync = false)
#{
# AxSalesTable axSalesTable;
# SalesTable salesTableLocal;
# ReqPlanSched reqPlanSched;
# LeadTime leadTimeInternal;
# boolean create;
# SalesParameters salesParameters;
# InterCompanyEndpointActionPolicyTransfer transferInternal = purchTable.interCompanyEndpointActionPolicy().transferInternal();
#;
# if (_salesTable)
# axSalesTable = SalesTable::find(_salesTable.SalesId, true).axSalesTable();
# else
# axSalesTable = _salesTable.axSalesTable();
#
# if (!_salesTable)
# create = true;
#
# if (create || _purchTable.fieldChanged(fieldnum(PurchTable, DlvTerm)))
# axSalesTable.parmDlvTerm(_purchTable.DlvTerm);
# if (create || _purchTable.fieldChanged(fieldnum(PurchTable, DlvMode)))
# axSalesTable.parmDlvMode(_purchTable.DlvMode);
#
# if (_purchTable.interCompanyEndpointActionPolicy().transferInternal().CustomerInfo)
# {
# if (create || _purchTable.fieldChanged(fieldnum(PurchTable, InterCompanyCustPurchOrderFormNum)))
# axSalesTable.parmPurchOrderFormNum(_purchTable.InterCompanyCustPurchOrderFormNum);
# if (create || _purchTable.fieldChanged(fieldnum(PurchTable, VendorRef)))
# axSalesTable.parmCustomerRef(_purchTable.VendorRef);
# }
#
# if (_purchTable.interCompanyEndpointActionPolicy().transferInternal().ReturnItemNum)
# {
# if (create || _purchTable.fieldChanged(fieldnum(PurchTable, ReturnItemNum)))
# axSalesTable.parmReturnItemNum(_purchTable.ReturnItemNum);
# }
#
# if (purchTable.InterCompanyDirectDelivery)
# {
# PurchTableType::syncDeliveryAddress(_purchTable, axSalesTable, _forceAddressSync);
# }
#
# if (_purchTable.InterCompanyDirectDelivery)
# {
# if (create || _purchTable.fieldChanged(fieldnum(PurchTable, DlvTerm)))
# axSalesTable.parmDlvTerm(_purchTable.DlvTerm);
# if (create || _purchTable.fieldChanged(fieldnum(PurchTable, DlvMode)))
# axSalesTable.parmDlvMode(_purchTable.DlvMode);
# }
#
# if (create || purchTable.fieldChanged(fieldnum(PurchTable, ReturnReasonCodeId)))
# axSalesTable.parmReturnReasonCodeId(purchTable.ReturnReasonCodeId);
#
# if (create || purchTable.fieldChanged(fieldnum(PurchTable, ReturnReplacementCreated)))
# axSalesTable.parmReturnReplacementCreated(purchTable.ReturnReplacementCreated);
#
# if (transferInternal.PriceDiscount
# && (create || _purchTable.fieldChanged(fieldnum(PurchTable, DiscPercent))))
# axSalesTable.parmDiscPercent(_purchTable.DiscPercent);
#
# if (_purchTable.InterCompanyDirectDelivery)
# {
# if (new DictConfigurationKey(configurationkeynum(SalesDeliveryDateControl)).enabled())
# {
# axSalesTable.parmReceiptDateRequested (_purchTable.DeliveryDate);
# axSalesTable.parmReceiptDateConfirmed (_purchTable.ReceiptDateConfirmed);
# axSalesTable.parmShippingDateRequested(_purchTable.ShippingDateRequested ? _purchTable.ShippingDateRequested : _purchTable.DeliveryDate);
# axSalesTable.parmShippingDateConfirmed(_purchTable.ShippingDateConfirmed);
# }
# else
# {
# axSalesTable.parmShippingDateRequested(_purchTable.DeliveryDate);
# axSalesTable.parmShippingDateConfirmed(_purchTable.ShippingDateConfirmed);
# }
# }
# else
# {
# if (create
# || _purchTable.fieldChanged(fieldnum(PurchTable, DeliveryDate)))
# {
# reqPlanSched = ReqPlanSched::find(ReqParameters::find().CurrentReqPlanIdSchedStatic);
# leadTimeInternal = reqPlanSched.IssueMargin + reqPlanSched.ReceiptMargin;
# axSalesTable.parmShippingDateRequested(_purchTable.DeliveryDate + leadTimeInternal);
# }
# if (create
# && new DictConfigurationKey(configurationkeynum(SalesDeliveryDateControl)).enabled())
# {
# buf2Buf(axSalesTable.salesTable(),salesTableLocal);
# salesParameters = SalesParameters::find();
# salesTableLocal.DeliveryDateControlType = salesParameters.DeliveryDateControlType;
# if (SalesCalcAvailableDlvDates::validateWritePrompt(salesTableLocal,false))
# axSalesTable.parmShippingDateConfirmed(salesTableLocal.ShippingDateConfirmed);
# else
# axSalesTable.parmShippingDateConfirmed(_purchTable.DeliveryDate);
# }
# }
#
# return axSalesTable;
#}
#
ENDSOURCE
SOURCE #syncSalesTableSave
#void syncSalesTableSave(PurchTable _purchTable)
#{
# SalesTable salesTable;
# AxSalesTable axSalesTable;
#;
# if (!_purchTable
# || !_purchTable.InterCompanyOriginalSalesId)
# return;
#
# if (_purchTable.SkipUpdate == InterCompanySkipUpdate::Internal
# || _purchTable.SkipUpdate == InterCompanySkipUpdate::Both
# || _purchTable.InterCompanyOrder == false)
# return;
#
# salesTable = SalesTable::find(_purchTable.InterCompanyOriginalSalesId);
#
# if (!salesTable)
# return;
#
# if (SalesTableType::construct(salesTable).canCreatePurchOrder())
# {
# axSalesTable = this.syncSalesTable(_purchTable, salesTable);
# axSalesTable.parmSkipUpdate(InterCompanySkipUpdate::Internal);
# axSalesTable.save();
# }
#}
#
ENDSOURCE
SOURCE #update
#public void update()
#{
# #OCCRetryCount
# PurchLine purchLine;
# VendTable vendTable;
# ;
# try
# {
# ttsbegin;
#
# purchTable.checkCurrencyCode();
#
# if (purchTable.CovStatus == 2)
# purchTable.CovStatus = 1;
# else
# purchTable.CovStatus = 0;
#
# if (purchTable.SkipUpdate != InterCompanySkipUpdate::InterCompany
# && purchTable.SkipUpdate != InterCompanySkipUpdate::Both)
# this.interCompanyMirror();
#
# if (purchTable.InterCompanyOriginalSalesId
# && purchTable.InterCompanyOriginalSalesId != purchTable_Orig.InterCompanyOriginalSalesId)
# purchTable.interCompanyPurchSalesReferenceCreate();
#
# if (purchTable.SkipUpdate != InterCompanySkipUpdate::Internal
# && purchTable.SkipUpdate != InterCompanySkipUpdate::Both)
# this.syncSalesTableSave(purchTable);
#
# purchTable.SkipUpdate = InterCompanySkipUpdate::No;
# purchTable.doUpdate();
#
# if (purchTable.OneTimeVendor)
# {
# vendTable = purchTable.vendTable_OrderAccount(update);
# vendTable.initFromPurchTable(purchTable);
# vendTable.update();
# }
#
# if (purchTable_Orig.OrderAccount != purchTable.OrderAccount ||
# purchTable_Orig.VendGroup != purchTable.VendGroup ||
# purchTable_Orig.PurchaseType != purchTable.PurchaseType)
# {
# while select forupdate purchLine
# where purchLine.PurchId == purchTable.PurchId
# {
# purchLine.VendAccount = purchTable.OrderAccount;
# purchLine.PurchaseType = purchTable.PurchaseType;
# purchLine.VendGroup = purchTable.VendGroup;
#
# purchLine.update();
# }
# }
#
# if (purchTable_Orig.PaymentSched &&
# purchTable_Orig.PaymentSched != purchTable.PaymentSched)
# {
# VendPaymSched::deleteVendPaymSched(purchTable.TableId, purchTable.RecId);
# }
#
# if (purchTable.OrderAccount != purchTable_Orig.OrderAccount ||
# purchTable.MarkupGroup != purchTable_Orig.MarkupGroup)
# {
# purchTable.createMarkupTrans();
# }
#
# ttscommit;
# }
# catch (Exception::Deadlock)
# {
# retry;
# }
# catch (Exception::UpdateConflict)
# {
# if (appl.ttsLevel() == 0)
# {
# if (xSession::currentRetryCount() >= #RetryNum)
# {
# throw Exception::UpdateConflictNotRecovered;
# }
# else
# {
# retry;
# }
# }
# else
# {
# throw Exception::UpdateConflict;
# }
# }
# catch (Exception::Error)
# {
# ttsabort;
# throw error("@SYS93835");
# }
#}
#
ENDSOURCE
SOURCE #updateBackStatus
#void updateBackStatus()
#{
# ttsbegin;
# purchTable.PurchStatus = PurchLine::lowestPurchStatus(purchTable.PurchId);
# purchTable.doUpdate();
# ttscommit;
#}
ENDSOURCE
SOURCE #updateDocumentStatus
#void updateDocumentStatus(DocumentStatus documentStatus)
#{
# ttsbegin;
# if (purchTable.DocumentStatus < documentStatus || (purchTable.DocumentStatus == DocumentStatus::ReceiptsList && documentStatus == DocumentStatus::PackingSlip))
# {
# purchTable.DocumentStatus = documentStatus;
# purchTable.SkipUpdate = InterCompanySkipUpdate::Both;
# purchTable.update();
# }
# ttscommit;
#}
ENDSOURCE
SOURCE #updateLedgerCov
#///
#/// Modifies the routine for calling ledgerCoverage to pass PurchReceiptFixedAsset LedgerPostingType
#/// instead of the PurchReceipt type when the PurchLine record is related to a Fixed Asset.
#///
#
#void updateLedgerCov()
#{
# LedgerCoverage ledgerCoverage;
# PurchTotals purchTotals;
# Markup markup;
# TaxCov taxCov;
#
# PurchLine purchLine;
#
# TransDate deliveryDate;
# AmountCur lineValue;
# AmountCur discValue;
#
# PurchQty qtyPurch;
#
# PaymTermId invoicePeriod = VendParameters::find().InvoicePeriod;
# Delivery2Invoice delivery2Invoice = PurchParameters::find().Delivery2Invoice;
#
# VendPaymSched vendPaymSched;
# VendPaymSchedLine vendPaymSchedLine;
# VendInvoiceJour tmpInvoiceJour;
#
# TransDate oldDate;
# int dateDifference;
# ;
#
# if (purchTable.mustBeCovPlanned())
# {
# purchTotals = PurchTotals::newPurchTable(purchTable, PurchUpdate::All);
# purchTotals.calc();
#
# if (purchTable.PaymentSched)
# {
# if (! VendPaymSched::exist(purchTable.TableId, purchTable.RecId))
# {
# purchTable.createPaymentSched();
#
# tmpInvoiceJour.initFromPurchTable(purchTable);
# tmpInvoiceJour.initFromPurchTotals(purchTotals);
#
# tmpInvoiceJour.DueDate = max(systemdateget(), purchTable.DeliveryDate);
# tmpInvoiceJour.CashDiscDate = tmpInvoiceJour.DueDate;
# tmpInvoiceJour.InvoiceDate = tmpInvoiceJour.DueDate;
#
# tmpInvoiceJour.insert();
#
# purchTable.copyPaymentSched(tmpInvoiceJour);
# tmpInvoiceJour.createPaymentSched();
#
# select firstonly vendPaymSched
# where vendPaymSched.ExtTableId == tmpInvoiceJour.TableId &&
# vendPaymSched.ExtRecId == tmpInvoiceJour.RecId;
# }
# else
# {
# vendPaymSched = VendPaymSched::find(purchTable.TableId, purchTable.RecId);
# }
# }
# ledgerCoverage = new LedgerCoverage(purchTable.Dimension, purchTable);
# markup = new Markup(purchTable.CurrencyCode);
# markup.setTax(purchTotals.tax());
# taxCov = new TaxCov(purchTable.RecId, ledgerCoverage, purchTable.Dimension);
#
# while select purchLine
# index hint PurchLineIdx
# where purchLine.PurchId == purchTable.PurchId
# {
# if (purchLine.mustBeCovPlanned())
# {
# deliveryDate = max(systemdateget(), purchLine.deliveryDate());
# oldDate = deliveryDate;
#
# if (delivery2Invoice)
# deliveryDate = PaymTerm::advanceDate(delivery2Invoice, deliveryDate);
#
# if (invoicePeriod)
# deliveryDate = PaymTerm::advanceDate(invoicePeriod, deliveryDate);
#
# dateDifference = deliveryDate - oldDate;
#
# qtyPurch = purchLine.RemainPurchFinancial + purchLine.RemainPurchPhysical;
#
# if (qtyPurch)
# {
# lineValue = purchLine.calcLineAmountExclTax(qtyPurch, deliveryDate);
#
# markup.cov(deliveryDate,
# qtyPurch,
# lineValue,
# purchLine,
# ledgerCoverage,
# purchLine.Dimension);
#
# lineValue += markup.markupItem();
# lineValue += purchTotals.tax().taxInCostPrice(purchLine.TableId, purchLine.RecId);
#
# if (purchLine.accountDisc())
# {
# discValue = purchLine.calcLineDiscExclTax(qtyPurch, deliveryDate);
# lineValue = lineValue + discValue;
# }
# else
# {
# discValue = 0;
# }
#
#
# if (lineValue)
# {
# if (purchLine.AssetId)
# {
# ledgerCoverage.updateSum(deliveryDate,
# LedgerPostingType::PurchReceiptFixedAsset,
# purchLine.accountReceipt(),
# purchLine.Dimension,
# purchLine.CurrencyCode,
# lineValue);
# }
# else
# {
# ledgerCoverage.updateSum(deliveryDate,
# LedgerPostingType::PurchReceipt,
# purchLine.accountReceipt(),
# purchLine.Dimension,
# purchLine.CurrencyCode,
# lineValue);
# }
#
# }
#
# if (discValue)
# {
# ledgerCoverage.updateSum(deliveryDate,
# LedgerPostingType::PurchDisc,
# purchLine.accountDisc(),
# purchLine.Dimension,
# purchLine.CurrencyCode,
# - discValue);
# }
# }
# }
# }
#
# deliveryDate = max(systemdateget(), purchTable.DeliveryDate);
#
# if (delivery2Invoice)
# deliveryDate = PaymTerm::advanceDate(delivery2Invoice, deliveryDate);
#
# if (invoicePeriod)
# deliveryDate = PaymTerm::advanceDate(invoicePeriod, deliveryDate);
#
# markup.cov(deliveryDate,
# 1,
# purchTotals.purchBalance(),
# purchTable,
# ledgerCoverage,
# purchTable.Dimension);
#
# if (purchTable.PaymentSched)
# {
# while select vendPaymSchedLine
# where vendPaymSchedLine.FatherRecID == vendPaymSched.RecId
# {
# if (vendPaymSchedLine.DueAmount)
# {
# ledgerCoverage.updateSum(deliveryDate,
# LedgerPostingType::VendBalance,
# purchTable.accountVend(),
# purchTable.Dimension,
# purchTable.CurrencyCode,
# - vendPaymSchedLine.DueAmount,
# 0,
# purchTable.accountClearing(),
# purchTable.Payment,
# purchTable.clearingPeriod(),
# purchTable.paymDayId(),
# vendPaymSchedLine.DueDate + dateDifference);
# }
#
# if (vendPaymSchedLine.DiscAmount && discValue)
# {
# ledgerCoverage.updateSum(vendPaymSchedLine.DueDate + dateDifference,
# LedgerPostingType::VendInvoiceDisc,
# LedgerSystemAccounts::accountNum(LedgerPostingType::VendInvoiceDisc),
# purchTable.Dimension,
# purchTable.CurrencyCode,
# - vendPaymSchedLine.DiscAmount);
# }
# }
# }
# else
# {
# if (purchTotals.purchEndDisc())
# {
# ledgerCoverage.updateSum(deliveryDate,
# LedgerPostingType::VendInvoiceDisc,
# LedgerSystemAccounts::accountNum(LedgerPostingType::VendInvoiceDisc),
# purchTable.Dimension,
# purchTable.CurrencyCode,
# - purchTotals.purchEndDisc());
# }
#
# if (purchTotals.purchTotalAmount())
# {
# ledgerCoverage.updateSum(deliveryDate,
# LedgerPostingType::VendBalance,
# purchTable.accountVend(),
# purchTable.Dimension,
# purchTable.CurrencyCode,
# - purchTotals.purchTotalAmount(),
# 0,
# purchTable.accountClearing(),
# purchTable.Payment,
# purchTable.clearingPeriod(),
# purchTable.paymDayId(),
# purchTable.FixedDueDate);
# }
# }
#
# taxCov.taxLedgerCov(purchTotals.tax().tmpTaxWorkTrans(), deliveryDate);
#
# ledgerCoverage.updateNow();
# ledgerCoverage.endCov();
#
# if (tmpInvoiceJour)
# {
# tmpInvoiceJour.delete();
# }
#
# delete_from vendPaymSched
# where vendPaymSched.ExtTableId == purchTable.TableId &&
# vendPaymSched.ExtRecId == purchTable.RecId;
# }
#}
ENDSOURCE
SOURCE #updatePurchaseType
#void updatePurchaseType()
#{
#}
ENDSOURCE
SOURCE #validateDelete
#boolean validateDelete()
#{
# boolean ok = true;
# boolean linesExist = false;
# PurchLine purchLine;
# List warningList = new List(Types::String);
# ListEnumerator warningListEnumerator;
# str warningTxt;
#
# ;
#
# flush PurchLine;
#
# setprefix(#PreFixField(purchTable,PurchId));
#
# if (purchTable.isInterCompanyOrder()
# && purchTable.SkipUpdate != InterCompanySkipUpdate::InterCompany
# && purchTable.SkipUpdate != InterCompanySkipUpdate::Both
# && purchTable.InterCompanyOrigin == InterCompanyOrigin::Derived)
# {
# ok = checkFailed("@SYS98648");
# }
#
# if (PurchParmTable::checkActivePerPurchId(purchTable.PurchId))
# {
# ok = checkFailed("@SYS121716");
# }
#
# //
# // Validation that PO does not have a line that is part of a pending invoice
# //
# if (purchTable.existSavedInvoice())
# {
# ok = checkFailed("@SYS113343");
# }
#
# while select purchLine
# where purchLine.PurchId == purchTable.PurchId
# {
# linesExist = true;
#
# if (!purchLine.validateDelete(true))
# {
# ok = false;
# break;
# }
# if (ok && purchTable.isFormDataSource())
# {
# warningTxt = purchLine.referenceWarningTxt();
# if (warningTxt)
# {
# warningList.addEnd(warningTxt);
# }
# }
#
# }
#
# if (ok && linesExist && purchTable.PurchStatus == PurchStatus::Backorder)
# {
# if (purchTable.isFormDataSource()) // the dialog must only appear when called from a form
# {
# if (warningList.elements())
# {
# warningTxt = '';
# warningListEnumerator = warningList.getEnumerator();
# while (warningListEnumerator.moveNext())
# {
# warningTxt += warningListEnumerator.current() + '\n';
# }
# warningTxt += '\n';
# }
# warningTxt += "@SYS75611";
# if (Box::yesNo(warningTxt, DialogButton::No) == DialogButton::No)
# ok = checkFailed("@SYS19437");
# }
# }
#
# ok = InventQualityOrderTable::checkNoOpenQualityOrders(purchTable) && ok;
#
# return ok;
#}
ENDSOURCE
SOURCE #validateField
#boolean validateField(fieldId fieldId)
#{
# boolean ok = true;
# ;
#
# switch(fieldId)
# {
# case fieldnum(PurchTable, OrderAccount) : ok = purchTable.checkAccount();
# break;
# case fieldnum(PurchTable, vatNum) : ok = TaxVATNumTable::checkVATNum(purchTable.vatNum, purchTable, fieldId);
# ok = ok && TaxEnterpriseBranchNumber_BE::checkEnterPriseNumber(purchTable.EnterpriseNumber, purchTable.vatNum, true);
# break;
# case fieldnum(PurchTable, EnterpriseNumber) : ok = TaxEnterpriseBranchNumber_BE::checkEnterPriseNumber(purchTable.EnterpriseNumber);
# break;
# case fieldnum(PurchTable, PurchaseType) : ok = this.canTypeBeChanged();
# break;
# case fieldnum(PurchTable, CurrencyCode) : ok = purchTable.interCompanyCheckCurrency();
# break;
# case fieldnum(PurchTable, url) : if (purchTable.url)
# {
# ok = isValidURL(purchTable.url);
# if (!ok)
# {
# ok = checkFailed("@SYS91305");
# }
# }
# break;
#
# case fieldnum(PurchTable, InventLocationId): ok = purchTable.InventStorageDimMap::validateField(fieldnum(InventStorageDimMap, InventLocationId));
# break;
# //
# case fieldnum(PurchTable, ContractNum_SA) :
# ok = VendContracts_SA::checkExist(purchTable.OrderAccount, purchTable.ContractNum_SA);
# break;
# //
#}
#
# return ok;
#}
#
ENDSOURCE
SOURCE #validateWrite
#boolean validateWrite()
#{
# boolean ok = true;
# boolean isChanged = true;
# ;
#
# if (purchTable_Orig.RecId)
# {
# if (purchTable.PurchId != purchTable_Orig.PurchId)
# ok = checkFailed("@SYS2650");
#
# if ((purchTable_Orig.ProjId) && (!purchTable.ProjId))
# ok = checkFailed("@SYS78501");
#
# isChanged = !purchTable_Orig.equal(purchTable);
# }
#
# if (isChanged && !purchTable.checkAccount())
# ok = false;
#
# if (!purchTable.checkPayment())
# ok = false;
#
# if (!purchTable.checkCashPayment())
# ok = false;
#
# // Israel-Localisation-Prodware-ImportFolder-Begin
# if (!purchTable.BPLcheckDlvDates())
# ok = false;
# // Israel-Localisation-Prodware-ImportFolder-End
#
# return ok;
#}
ENDSOURCE
SOURCE #construct
#static PurchTableType construct(PurchTable purchTable)
#{
# switch (purchTable.PurchaseType)
# {
# case PurchaseType::Journal : return PurchTableType_Journal::construct (purchTable);
# case PurchaseType::Subscription : return PurchTableType_Subscription::construct (purchTable);
# case PurchaseType::Purch : return PurchTableType_Purch::construct (purchTable);
# case PurchaseType::ReturnItem : return PurchTableType_ReturnItem::construct (purchTable);
# case PurchaseType::Blanket : return PurchTableType_Blanket::construct (purchTable);
# }
# return new PurchTableType(purchTable);
#}
ENDSOURCE
SOURCE #posInvoice
#client server static int posInvoice()
#{
# return 4;
#}
ENDSOURCE
SOURCE #posPackingSlip
#client server static int posPackingSlip()
#{
# return 3;
#}
ENDSOURCE
SOURCE #posPurchaseOrder
#client server static int posPurchaseOrder()
#{
# return 1;
#}
ENDSOURCE
SOURCE #posReceiptsList
#client server static int posReceiptsList()
#{
# return 2;
#}
ENDSOURCE
SOURCE #syncDeliveryAddress
#static void syncDeliveryAddress(PurchTable _purchTable,
# AxSalesTable _axSalesTable,
# boolean _forceAddressSync)
#{
# CompanyInfo companyInfo = CompanyInfo::find();
# Address address = Address::find(companyInfo.TableId, companyInfo.RecId, AddressType::Delivery);
#;
# if (_forceAddressSync
# || !_axSalesTable.salesTable()
# || _purchTable.fieldChanged(fieldnum(PurchTable, DeliveryName))
# || _purchTable.fieldChanged(fieldnum(PurchTable, InterCompanyDirectDelivery)))
# {
# _axSalesTable.parmDeliveryName(_purchTable.DeliveryName);
# }
#
# if (_forceAddressSync
# || !_axSalesTable.salesTable()
# || _purchTable.fieldChanged(fieldnum(PurchTable, DeliveryAddress))
# || _purchTable.fieldChanged(fieldnum(PurchTable, InterCompanyDirectDelivery)))
# {
# _axSalesTable.parmDeliveryAddress(_purchTable.DeliveryAddress);
# }
#
# if (_forceAddressSync
# || !_axSalesTable.salesTable()
# || _purchTable.fieldChanged(fieldnum(PurchTable, DeliveryStreet))
# || _purchTable.fieldChanged(fieldnum(PurchTable, InterCompanyDirectDelivery)))
# {
# _axSalesTable.parmDeliveryStreet(_purchTable.DeliveryStreet);
# }
#
# if (_forceAddressSync
# || !_axSalesTable.salesTable()
# || _purchTable.fieldChanged(fieldnum(PurchTable, DeliveryZipCode))
# || _purchTable.fieldChanged(fieldnum(PurchTable, InterCompanyDirectDelivery)))
# {
# _axSalesTable.parmDeliveryZipCode(_purchTable.DeliveryZipCode);
# }
#
# if (_forceAddressSync
# || !_axSalesTable.salesTable()
# || _purchTable.fieldChanged(fieldnum(PurchTable, DeliveryCity))
# || _purchTable.fieldChanged(fieldnum(PurchTable, InterCompanyDirectDelivery)))
# {
# _axSalesTable.parmDeliveryCity(_purchTable.DeliveryCity);
# }
#
# if (_forceAddressSync
# || !_axSalesTable.salesTable()
# || _purchTable.fieldChanged(fieldnum(PurchTable, DlvCounty))
# || _purchTable.fieldChanged(fieldnum(PurchTable, InterCompanyDirectDelivery)))
# {
# _axSalesTable.parmDeliveryCounty(_purchTable.DlvCounty);
# }
#
# if (_forceAddressSync
# || !_axSalesTable.salesTable()
# || _purchTable.fieldChanged(fieldnum(PurchTable, DlvState))
# || _purchTable.fieldChanged(fieldnum(PurchTable, InterCompanyDirectDelivery)))
# {
# _axSalesTable.parmDeliveryState(_purchTable.DlvState);
# }
#
# if (_forceAddressSync
# || !_axSalesTable.salesTable()
# || _purchTable.fieldChanged(fieldnum(PurchTable, DlvCountryRegionId))
# || _purchTable.fieldChanged(fieldnum(PurchTable, InterCompanyDirectDelivery)))
# {
# _axSalesTable.parmDeliveryCountryRegionId(_purchTable.DlvCountryRegionId);
# }
#}
#
ENDSOURCE
ENDMETHODS
ENDCLASS
en-us
Order type cannot be changed from %1 to %2 because updated lines exist.
sales/purch order entry
@SYS99056
0
0
he
אין אפשרות לשנות את סוג ההזמנה מ- %1 ל- %2 מאחר ששורות מעודכנות קיימות.
sales/purch order entry
@SYS99056
0
0
en-us
Purchase type cannot be changed to %1 because of intercompany references.
Intercompany
@SYS98521
0
0
he
אין אפשרות לשנות את סוג הרכישה ל- %1 עקב הפניות בין-חברתיות.
Intercompany
@SYS98521
0
0
en-us
This purchase order has been fully invoiced. Do you want to delete it?
Question asked to the user when deleting a purchase order
@SYS122490
0
0
he
הזמנת רכש זו חויבה במלואה. האם ברצונך למחוק אותה?
Question asked to the user when deleting a purchase order
@SYS122490
0
0
en-us
This purchase order has been partially invoiced. Do you want to delete it?
Question asked to the user when deleting a purchase order
@SYS122492
0
0
he
הזמנת רכש זו חויבה באופן חלקי. האם ברצונך למחוק אותה?
Question asked to the user when deleting a purchase order
@SYS122492
0
0
en-us
Operation canceled
Intercompany
@SYS93835
0
0
he
הפעולה בוטלה
Intercompany
@SYS93835
0
0
en-us
Company: %1
Intercompany
@SYS93821
0
0
he
חברה: %1
Intercompany
@SYS93821
0
0
en-us
Sales order %1 already exist, number sequence used instead.
Intercompany
@SYS94302
0
0
he
הזמנת המכירה %1 כבר קיימת, נעשה שימוש ברצף מספרים במקום זאת.
Intercompany
@SYS94302
0
0
en-us
Intercompany sales order %1 has been created.
Intercompany
@SYS94303
0
0
he
הזמנת המכירה הבין-חברתית %1 נוצרה.
Intercompany
@SYS94303
0
0
en-us
The purchase order cannot be deleted because it has been created through an intercompany order.
Intercompany
@SYS98648
0
0
he
אין אפשרות למחוק את הזמנת הרכש מאחר שהיא נוצרה באמצעות הזמנה בין-חברתית.
Intercompany
@SYS98648
0
0
en-us
The purchase order cannot be deleted because related not posted transactions exist.
@SYS121716
0
0
he
אין אפשרות למחוק את הזמנת הרכש מכיוון שקיימות תנועות קשורות שלא נרשמו.
@SYS121716
0
0
en-us
This purchase order contains one or more purchase lines associated with a pending invoice. The purchase order cannot be deleted until the pending invoices are deleted.
@SYS113343
0
0
he
הזמנת רכש זו מכילה שורת רכישה אחת או יותר המשויכות לחשבונית ממתינה. אין אפשרות למחוק את הזמנת הרכש עד למחיקת החשבוניות הממתינות.
@SYS113343
0
0
en-us
Delete purchase lines?
@SYS75611
0
0
he
האם למחוק שורות רכישה?
@SYS75611
0
0
en-us
Deletion has been canceled
@SYS19437
0
0
he
המחיקה בוטלה
@SYS19437
0
0
en-us
Invalid URL.
@SYS91305
0
0
he
כתובת URL לא חוקית.
@SYS91305
0
0
en-us
Order number cannot be changed.
@SYS2650
0
0
he
לא ניתן לשנות את מספר ההזמנה.
@SYS2650
0
0
en-us
Project ID must be specified.
Project, error message
@SYS78501
0
0
he
יש לציין מזהה פרוייקט.
Project, error message
@SYS78501
0
0
***Element: CLS
; Microsoft Dynamics AX Class: PurchFormLetter_PackingSlip unloaded
; --------------------------------------------------------------------------------
CLSVERSION 1
CLASS #PurchFormLetter_PackingSlip
Id 488
PROPERTIES
Name #PurchFormLetter_PackingSlip
Extends #PurchFormLetter
RunOn #Called from
ENDPROPERTIES
METHODS
Version: 3
SOURCE #addToInventReportDimHistory
#void addToInventReportDimHistory(VendPackingSlipTrans _vendPackingSlipTrans)
#{
# InventTrans inventTrans;
# InventQty qtyRemain = _vendPackingSlipTrans.InventQty;
# InventQty qtyTrans;
# InventReportDimHistory inventReportDimHistory;
# ;
#
# while select inventTrans
# index hint TransIdIdx
# order by StatusReceipt, InventDimId
# where inventTrans.InventTransId == _vendPackingSlipTrans.InventTransId &&
# inventTrans.TransType == InventTransType::Purch &&
# inventTrans.PackingSlipId == _vendPackingSlipTrans.PackingSlipId &&
# inventTrans.DatePhysical == _vendPackingSlipTrans.DeliveryDate &&
# inventTrans.VoucherPhysical == voucher
# {
#
# if (qtyRemain)
# {
# if (abs(inventTrans.Qty) < abs(qtyRemain))
# {
# qtyTrans = inventTrans.Qty;
# qtyRemain -= qtyTrans;
# }
# else
# {
# qtyTrans = qtyRemain;
# qtyRemain = 0;
# }
#
#
# inventReportDimHistory.clear();
# inventReportDimHistory.TransactionLogType = InventReportDimHistoryLogType::PurchPackingSlip;
# inventReportDimHistory.TransRefId = _vendPackingSlipTrans.InternalPackingSlipId;
# inventReportDimHistory.InventTransId = inventTrans.InventTransId;
# inventReportDimHistory.InventDimId = inventTrans.InventDimId;
#
# recordListInventReportDimHistory.find(inventReportDimHistory);
#
# inventReportDimHistory.Qty += qtyTrans;
#
# recordListInventReportDimHistory.ins(inventReportDimHistory,true);
#
# }
# else
# break;
# }
#}
#
#
ENDSOURCE
SOURCE #allocateNumAndVoucher
#NumberSeq allocateNumAndVoucher()
#{
# NumberSequenceCode packingSlipNumber;
# NumberSequenceCode packingSlipVoucher;
#
# boolean voucherEqualsNumber;
# ;
#
# if (purchTable.NumberSequenceGroup)
# {
# packingSlipNumber = NumberSequenceGroupRef::find(PurchParameters::numRefPurchPackingSlipId().DataTypeId, purchTable.NumberSequenceGroup).NumberSequenceCode;
#
# if (!packingSlipNumber)
# {
# packingSlipNumber = NumberSequenceReference::find(PurchParameters::numRefPurchPackingSlipId().DataTypeId).NumberSequence;
# }
#
# if (PurchParameters::numRefPurchPackingSlipVoucher().AllowSameAs)
# {
# voucherEqualsNumber = true;
# packingSlipVoucher = packingSlipNumber;
# }
# else
# {
# packingSlipVoucher = NumberSequenceGroupRef::find(PurchParameters::numRefPurchPackingSlipVoucher().DataTypeId, purchTable.NumberSequenceGroup).NumberSequenceCode;
#
# if (!packingSlipVoucher)
# {
# packingSlipVoucher = PurchParameters::numRefPurchPackingSlipVoucher().NumberSequence;
# }
# }
#
# if (packingSlipNumber)
# {
# useInternalNumber = true;
# return NumberSeq::newGetNumAndVoucherFromCode(packingSlipNumber, packingSlipVoucher, voucherEqualsNumber);
# }
# else
# {
# useInternalNumber = false;
# return NumberSeq::newGetVoucherFromCode(packingSlipVoucher);
# }
# }
# else
# {
# if (NumberSequenceReference::find(PurchParameters::numRefPurchPackingSlipId().DataTypeId).NumberSequence)
# {
# useInternalNumber = true;
# return NumberSeq::newGetNumAndVoucher(PurchParameters::numRefPurchPackingSlipId(),
# PurchParameters::numRefPurchPackingSlipVoucher());
# }
# else
# {
# useInternalNumber = false;
# return NumberSeq::newGetVoucher(PurchParameters::numRefPurchPackingSlipVoucher());
# }
# }
#}
ENDSOURCE
SOURCE #BPLCreateNewPurchLine
#// Israel-Localisation-Prodware-ImportFolder
#void BPLCreateNewPurchLine(PurchParmLine _PurchParmLine, PurchLine _purchLine)
#{
# PurchLine newPurchLine;
#
# ttsbegin;
#
# newPurchLine.initFromPurchLine(_purchLine, true, true, true, true, _PurchParmLine.RemainBefore - _PurchParmLine.ReceiveNow);
# newPurchLine.initFromPurchTable(PurchTable::find(_purchLine.PurchId));
# newPurchLine.LineNum += _purchLine.LineNum + 0.1;
# newPurchLine.RemainPurchPhysical = newPurchLine.QtyOrdered;
# newPurchLine.RemainInventPhysical = newPurchLine.QtyOrdered;
# newPurchLine.LineAmount = newPurchLine.calcLineAmount();
# newPurchLine.insert(false, false);
#
# _PurchParmLine.closed = NoYes::Yes;
#
# ttscommit;
#}
ENDSOURCE
SOURCE #canGoBatchJournal
#public boolean canGoBatchJournal()
#{
# return true;
#}
ENDSOURCE
SOURCE #checkBeforePosting
#///
#/// Perform some final checks right before the posting.
#///
#///
#/// Quality orders must be created before posting the packing slip
#///
#private void checkBeforePosting()
#{
# InventQualityOrderType inventQualityOrderType;
# int curInfoLogLine;
# ;
# if (purchLine.RecId && InventParameters::find().UseQualityManagement)
# {
# curInfoLogLine = infolog.line();
# inventQualityOrderType = InventQualityOrderType::newBuffer(purchLine, NoYes::No, InventTestDocumentStatus::PackingSlip, InventTestExecution::Before);
# if (inventQualityOrderType.findAndCreate())
# {
# infolog.cut(curInfoLogLine + 1, infolog.line());
# throw error("@SYS114696");
# }
# }
#
#}
ENDSOURCE
SOURCE #checkCallerDataSource
#///
#/// Check if the calling data source can be processed in this update.
#///
#///
#/// The tableId of the records in the calling data source.
#///
#///
#/// The data source from the calling form.
#///
#///
#/// true if the check succeeded; otherwise, false.
#///
#boolean checkCallerDataSource(tableId _callingTableId, FormDataSource _recordDataSource)
#{
# boolean ret = super(_callingTableId, _recordDataSource);
# InventQualityOrderType inventQualityOrderType;
# PurchTable localPurchTable;
# PurchLine localPurchLine;
# boolean addedAnyQualityOrder = false;
# Counter callerRecords = 0;
# ;
# if (_recordDataSource && InventParameters::find().UseQualityManagement)
# {
# switch(_callingTableId)
# {
# case tablenum(PurchTable):
# for (localPurchTable = _recordDataSource.getFirst(true) ? _recordDataSource.getFirst(true) : _recordDataSource.cursor(); localPurchTable; localPurchTable = _recordDataSource.getNext())
# {
# if (localPurchTable.RecId)
# {
# callerRecords++;
# inventQualityOrderType = InventQualityOrderType::newBuffer(localPurchTable, NoYes::No, InventTestDocumentStatus::PackingSlip, InventTestExecution::Before);
# if (inventQualityOrderType.findAndCreate())
# {
# addedAnyQualityOrder = true;
# }
# }
# }
# break;
# case tablenum(PurchLine):
# for (localPurchLine = _recordDataSource.getFirst(true) ? _recordDataSource.getFirst(true) : _recordDataSource.cursor(); localPurchLine; localPurchLine = _recordDataSource.getNext())
# {
# if (localPurchLine.RecId)
# {
# callerRecords++;
# inventQualityOrderType = InventQualityOrderType::newBuffer(localPurchLine, NoYes::No, InventTestDocumentStatus::PackingSlip, InventTestExecution::Before);
# if (inventQualityOrderType.findAndCreate())
# {
# addedAnyQualityOrder = true;
# }
# }
# }
# break;
# }
# if (addedAnyQualityOrder)
# {
# PurchFormLetter::updateCallerDataSource(_recordDataSource, true, callerRecords > 1);
# throw error("@SYS113800");
# }
# }
#
# return ret;
#}
ENDSOURCE
SOURCE #checkFormLetterId
#boolean checkFormLetterId()
#{
# boolean ok = true;
# PurchSummary checkPurchSummary;
# ;
#
# if (! purchParmUpdate.Proforma)
# {
# checkPurchSummary = PurchSummary::construct(purchParmUpdate.SumBy, purchParmUpdate.ParmId, purchParmUpdate.SumPurchId, this.documentStatus(), number);
# ok = checkPurchSummary.checkFormLetterId(this.missingNumber());
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #checkInvoice
#boolean checkInvoice()
#{
# return true;
#}
ENDSOURCE
SOURCE #checkLedgerPeriod
#///
#/// Checks whether posting in the ledger period is allowed.
#///
#///
#/// True if posting in the ledger period is allowed; otherwise False.
#///
#protected boolean checkLedgerPeriod()
#{
# boolean ok;
# ;
# ok = super();
#
# if (ok && PurchParameters::find().PostPackingSlip)
# {
# ok = LedgerPeriod::checkLedgerPeriodDateModule(purchParmTable.updateDate(),SysModule::Purch);
# }
# return ok;
#}
#
ENDSOURCE
SOURCE #checkPackingSlip
#boolean checkPackingSlip()
#{
# return purchParmTable.vendTable_InvoiceAccount().checkPackingSlip(purchParmTable.Num,purchParmTable.TransDate);
#}
#
ENDSOURCE
SOURCE #chooseLinesFromWMSJournalTable
#void chooseLinesFromWMSJournalTable()
#{
# WMSJournalTable _wmsJournalTable;
# WMSJournalTrans _wmsJournalTrans;
# PurchId _purchId;
# PurchLine _purchLine;
# PurchParmTable _purchParmTable;
# PackingSlipId _packingSlipId;
#
# void createParmTable()
# {
# _purchParmTable.clear();
# _purchParmTable.TableRefId = FormLetter::getTableRef();
#
# this.createParmTable(_purchParmTable, PurchTable::find(_purchId));
# if (_packingSlipId)
# {
# _purchParmTable.Num = _packingSlipId;
# }
# _purchParmTable.initTotals();
# this.insertPurchParmTable(_purchParmTable);
# }
# ;
#
# this.recordInsertListInit();
# ttsbegin;
#
# for (_wmsJournalTable = wmsJournalTable_ds.getFirst(true) ? wmsJournalTable_ds.getFirst(true) : wmsJournalTable_ds.cursor(); _wmsJournalTable; _wmsJournalTable = wmsJournalTable_ds.getNext())
# {
# if (_wmsJournalTable.Posted)
# {
# _purchId = '';
# _packingSlipId = _wmsJournalTable.PackingSlip;
#
# while select InventTransId, InventTransRefId, sum(Qty) from _wmsJournalTrans
# group by InventTransRefId, InventTransId
# where _wmsJournalTrans.JournalId == _wmsJournalTable.JournalId
# && _wmsJournalTrans.InventTransType == InventTransType::Purch
# {
# _purchLine = PurchLine::findInventTransId(_wmsJournalTrans.InventTransId);
#
# if (!_purchLine.Blocked)
# {
# if (_purchId != _purchLine.PurchId)
# {
# _purchId = _purchLine.PurchId;
# createParmTable();
# }
# this.createParmLineFromWMSJournalTrans(_purchLine, _wmsJournalTrans.Qty, _purchParmTable.TableRefId);
# }
# }
# }
# }
# this.recordInsertListInsert();
# this.reArrange(false, false);
#
# ttscommit;
#}
ENDSOURCE
SOURCE #classDeclaration
#class PurchFormLetter_PackingSlip
#extends PurchFormLetter
#{
# VendPackingSlipJour vendPackingSlipJour;
# VendPackingSlipTrans vendPackingSlipTrans;
#
# #define.CurrentVersion(7)
# #LOCALMACRO.ParmList
# parmId,
# purchParmUpdate,
# queryCriteria,
# editing,
# printout,
# printFormletter,
# printersettingsFormletter,
# printSalesFormletter,
# printersettingsFormletterCopy,
# usePrintManagement
# #ENDMACRO
#
#}
ENDSOURCE
SOURCE #createParmLineFromWMSJournalTrans
#void createParmLineFromWMSJournalTrans(PurchLine _purchLine,
# InventQty _qtyReceived,
# TradeLineRefId _tableRef)
#{
# PurchParmLine _purchParmLine;
# ;
#
# if (_purchLine.RecId && !PurchParmLine::existInventTransId(parmId,_purchLine.InventTransId))
# {
# _purchLine.PurchReceivedNow = UnitConvert::qty(_qtyReceived,
# _purchLine.inventTable().inventUnitId(),
# _purchLine.PurchUnit,
# _purchLine.ItemId);
#
# _purchParmLine.clear();
# _purchParmLine.TableRefId = _tableRef;
#
# [_purchParmLine.ReceiveNow, _purchParmLine.RemainBefore , _purchParmLine.RemainAfter ] = this.qtyPurch (_purchLine, naReal());
# [_purchParmLine.InventNow, _purchParmLine.RemainBeforeInvent, _purchParmLine.RemainAfterInvent] = this.qtyInvent(_purchLine, naReal());
#
# if (_purchParmLine.ReceiveNow || _purchParmLine.RemainBefore) // && remain))
# {
# _purchParmLine.ParmId = purchParmUpdate.ParmId;
# _purchParmLine.initFromPurchLine(_purchLine);
#
# _purchParmLine.setQty(DocumentStatus::PackingSlip, purchParmUpdate.CreditRemaining);
# _purchParmLine.setInventReceiveNow();
# _purchParmLine.setLineAmount();
# this.insertPurchParmLine(_purchParmLine);
# this.allowCreateParmTable(true);
# }
# }
#}
ENDSOURCE
SOURCE #createParmTable
#void createParmTable(PurchParmTable _purchParmTable,
# PurchTable _purchTable,
# Name _purchName = _purchTable.PurchName,
# VendName _deliveryName = _purchTable.DeliveryName,
# Addressing _deliveryAddress = _purchTable.DeliveryAddress)
#{
# super(_purchParmTable, _purchTable, _purchName, _deliveryName, _deliveryAddress);
#
# if (_purchTable.isInterCompanyOrder())
# {
# changecompany(_purchTable.InterCompanyCompanyId)
# {
# _purchParmTable.Num = _purchTable.interCompanySalesTable().lastPackingSlip();
# }
# }
#}
ENDSOURCE
SOURCE #documentStatus
#DocumentStatus documentStatus()
#{
# return DocumentStatus::PackingSlip;
#}
ENDSOURCE
SOURCE #endUpdate
#void endUpdate()
#{
# SalesFormLetter salesFormLetter;
# ;
#
# super();
#
# if (! purchParmUpdate.Proforma && this.journalTransList().len())
# {
# if (!this.interCompanyNoSalesFormletterUpdate())
# {
# if (Box::yesNo("@SYS70024", DialogButton::Yes)== DialogButton::Yes)
# {
# salesFormLetter = SalesFormLetter::newFromPurchFormLetter_PackingSlip(this, DocumentStatus::ProjectPackingSlip);
# salesFormLetter.promptAndRun();
# }
# }
# }
#}
#
ENDSOURCE
SOURCE #initJournal
#protected void initJournal()
#{;
# if (!voucher && !purchParmUpdate.Proforma)
# throw error("@SYS71652");
#
# vendPackingSlipJour.clear();
# vendPackingSlipJour.initValue();
#
# vendPackingSlipJour.ParmId = purchParmUpdate.ParmId;
# vendPackingSlipJour.PackingSlipId = purchParmTable.Num;
# vendPackingSlipJour.LedgerVoucher = voucher;
#
# vendPackingSlipJour.InternalPackingSlipId = internalNumber;
# vendPackingSlipJour.DeliveryDate = this.updateDate();
#
# vendPackingSlipJour.initFromPurchTable(purchTable);
#
# vendPackingSlipJour.InterCompanyPosted = this.interCompanyPosted();
#}
#
ENDSOURCE
SOURCE #initJournalLine
#protected void initJournalLine()
#{;
#}
ENDSOURCE
SOURCE #initParmDefault
#public void initParmDefault()
#{
# super();
#
# purchParmUpdate.CreditRemaining = true;
#}
ENDSOURCE
SOURCE #initParmPurchTable
#///
#/// Initialize parameters based on a PurchTable record.
#///
#///
#/// The PurchTable to initialize from.
#///
#///
#/// Quality orders were created before posting the packing slip. These must be updated first.
#///
#protected void initParmPurchTable(PurchTable _purchTable)
#{
# InventQualityOrderType inventQualityOrderType;
# PurchLine tmpPurchLine;
# boolean qualityOrderCreated = false;
# ;
# if (_purchTable.RecId && InventParameters::find().UseQualityManagement)
# {
#
# while select tmpPurchLine
# where tmpPurchLine.PurchId == purchTable.PurchId
# {
# inventQualityOrderType = InventQualityOrderType::newBuffer(tmpPurchLine, NoYes::No, InventTestDocumentStatus::PackingSlip, InventTestExecution::Before);
#
# if (inventQualityOrderType.findAndCreate())
# {
# qualityOrderCreated = true;
# }
# }
# if (qualityOrderCreated)
# {
# throw Exception::Warning; // message already put in info log
# }
# }
#
# super(_purchTable);
#}
ENDSOURCE
SOURCE #initTransactionTxt
#protected TransactionTxt initTransactionTxt()
#{
# TransactionTxt transactionTxt;
# ;
#
# transactionTxt = new TransactionTxt();
# transactionTxt.setType (LedgerTransTxt::PurchPckSlpLedger);
# transactionTxt.setVoucher (vendPackingSlipJour.LedgerVoucher);
# transactionTxt.setFormLetter (vendPackingSlipJour.PackingSlipId);
# transactionTxt.setKey1 (vendPackingSlipJour.PurchId);
# transactionTxt.setKey2 (vendPackingSlipJour.OrderAccount);
# transactionTxt.setKey3 (VendTable::groupId(vendPackingSlipJour.OrderAccount));
#
# return transactionTxt;
#}
ENDSOURCE
SOURCE #interCompanyParmLineQty
#Qty interCompanyParmLineQty(Common _common, boolean _isInventQty = false)
#{
# PurchLine purchLineLocal = _common;
# CustPackingSlipTrans custPackingSlipTrans;
# CustPackingSlipJour custPackingSlipJour;
#;
# if (interCompanyCompanyId)
# {
# changecompany(interCompanyCompanyId)
# {
# select forceplaceholders InventQty, Qty from custPackingSlipTrans
# where custPackingSlipTrans.InventTransId == purchLineLocal.InterCompanyInventTransId
# exists join custPackingSlipJour
# where custPackingSlipJour.PackingSlipId == custPackingSlipTrans.PackingSlipId
# && custPackingSlipJour.DeliveryDate == custPackingSlipTrans.DeliveryDate
# && custPackingSlipJour.SalesId == custPackingSlipTrans.SalesId
# && custPackingSlipJour.ParmId == interCompanyParmId
# && custPackingSlipJour.PackingSlipId == number;
# }
# }
# else
# {
# select forceplaceholders InventQty, Qty from custPackingSlipTrans
# where custPackingSlipTrans.InventTransId == purchLineLocal.InventRefTransId
# exists join custPackingSlipJour
# where custPackingSlipJour.PackingSlipId == custPackingSlipTrans.PackingSlipId
# && custPackingSlipJour.DeliveryDate == custPackingSlipTrans.DeliveryDate
# && custPackingSlipJour.SalesId == custPackingSlipTrans.SalesId
# && custPackingSlipJour.ParmId == interCompanyParmId
# && custPackingSlipJour.PackingSlipId == number;
# }
#
# return _isInventQty ? custPackingSlipTrans.InventQty : custPackingSlipTrans.Qty;
#}
#
ENDSOURCE
SOURCE #interCompanyPost
#void interCompanyPost()
#{;
# if (vendPackingSlipJour.interCompanyDoInternalPosting()
# || (vendPackingSlipJour.InterCompanyCompanyId && vendPackingSlipJour.interCompanyDoExternalPosting()))
# {
# InterCompanyPostSales::post(this,vendPackingSlipJour,journalList);
# }
#}
ENDSOURCE
SOURCE #journal
#VendPackingSlipJour journal()
#{
# return vendPackingSlipJour;
#}
ENDSOURCE
SOURCE #mayJournalBePosted
#public boolean mayJournalBePosted(PurchTable _purchTable)
#{
# boolean ok = super(_purchTable);
# ;
#
# if (ok)
# {
# ok = _purchTable.mayPackingSlipBeUpdated();
# }
#
# return ok;
#}
#
ENDSOURCE
SOURCE #missingNumber
#str missingNumber()
#{
# return "@SYS23050";
#}
ENDSOURCE
SOURCE #newJournalList
#///
#/// Constructs a record sorted list.
#///
#///
#/// A new record sorted list.
#///
#public RecordSortedList newJournalList()
#{
# RecordSortedList recordSortedList;
# ;
#
# recordSortedList = new RecordSortedList(tablenum(VendPackingSlipJour));
# recordSortedList.sortOrderFromContainer(this.formLetterSorting(tablenum(VendPackingSlipJour), fieldnum(VendPackingSlipJour, RecId)));
#
# return recordSortedList;
#}
ENDSOURCE
SOURCE #newJournalTransList
#///
#/// Constructs a record sorted list.
#///
#public void newJournalTransList()
#{
# ;
# journalTransList = new RecordSortedList(tablenum(VendPackingSlipTrans));
# journalTransList.sortOrder(fieldnum(VendPackingSlipTrans, RecId));
#}
#
ENDSOURCE
SOURCE #pack
#container pack()
#{
# return [#CurrentVersion+#ParentVersion,#ParmList,#ParmListCommonCS];
#}
ENDSOURCE
SOURCE #printJournal
#void printJournal()
#{;
# if (journalList.len() > 0)
# {
# if (printFormletter)
# vendPackingSlipJour.printJournal(this, journalList);
#
# if (purchParmUpdate.Proforma)
# this.removeProforma();
# }
#}
ENDSOURCE
SOURCE #printMgmtDocumentType
#///
#/// Identifies the print management document type.
#///
#///
#/// The print management document type for purchase packing slip.
#///
#protected PrintMgmtDocumentType printMgmtDocumentType()
#{
# return PrintMgmtDocumentType::PurchaseOrderPackingSlip;
#}
ENDSOURCE
SOURCE #removeJournalFromList
#void removeJournalFromList()
#{
# journalList.del(vendPackingSlipJour);
#}
#
ENDSOURCE
SOURCE #removeProforma
#void removeProforma()
#{
# VendPackingSlipJour proformaJour;
# ;
#
# ttsbegin;
#
# proformaJour.clear();
#
# journalList.first(proformaJour);
#
# while (proformaJour)
# {
# proformaJour = VendPackingSlipJour::findRecId(proformaJour.RecId, true);
# proformaJour.delete();
#
# if (!journalList.next(proformaJour))
# break;
# }
#
# ttscommit;
#}
ENDSOURCE
SOURCE #specQtyDefault
#void specQtyDefault()
#{
# if (this.wmsJournalTable_ds())
# this.specQty(PurchUpdate::Recorded);
#}
ENDSOURCE
SOURCE #transactionLogTxt
#TransTxt transactionLogTxt()
#{;
# return "@SYS2023";
#}
ENDSOURCE
SOURCE #transactionLogType
#TransactionLogType transactionLogType()
#{
# return TransactionLogType::PurchPackingSlip;
#}
ENDSOURCE
SOURCE #unpack
#boolean unpack(container packedClass)
#{
# Integer version = conpeek(packedClass,1);
#
# NoYes remain;
#
# #LOCALMACRO.ParmList_v25sp2
# ParmId,
# purchParmUpdate.SpecQty,
# Remain,
# purchParmUpdate.CreditRemaining,
# QueryCriteria,
# Editing,
# Printout,
# printFormletter,
# printersettingsFormletter
# #ENDMACRO
#
# #LOCALMACRO.ParmList_v30
# parmId,
# purchParmUpdate,
# queryCriteria,
# editing,
# printout,
# printFormletter,
# printersettingsFormletter
# #ENDMACRO
#
# #LOCALMACRO.ParmList_v401
# parmId,
# purchParmUpdate,
# queryCriteria,
# editing,
# printout,
# printFormletter,
# printersettingsFormletter,
# printSalesFormletter,
# printersettingsFormletterCopy
# #ENDMACRO
#
# ;
#
# switch (version)
# {
# case #CurrentVersion + #ParentVersion : [version, #ParmList, #ParmListCommonCS] = packedClass;
# break;
#
# case 6 : [version, #ParmList_v401] = packedClass;
# break;
#
# case 5 : [version, #ParmList_v30] = packedClass;
# printersettingsFormletterCopy = printersettingsFormletter;
# break;
#
# case 4 : [version, #ParmList_v25sp2] = packedClass;
# break;
#
# default : return false;
# }
#
# return true;
#}
ENDSOURCE
SOURCE #updateInventory
#protected void updateInventory(InventMovement _inventMovement)
#{
# InventUpd_Physical inventUpd_Physical;
# ;
#
# inventUpd_Physical = InventUpd_Physical::newPurchPackingSlip(_inventMovement,
# purchParmLine,
# purchParmTable.Num);
#
# if (purchParmLine.ReceiveNow < 0
# && (purchTable.InterCompanyDirectDelivery || purchLine.isDirectDelivery()))
# {
# inventUpd_Physical.parmAllowNegativePhysical(true);
# }
#
# inventUpd_Physical.updateNow(ledgerVoucher);
#
# updateNow = inventUpd_Physical.updPhysicalUnit();
# updateNowInvent = inventUpd_Physical.updPhysical();
#}
ENDSOURCE
SOURCE #updateNow
#///
#/// Prepares to save the packing slip information and verifies various PurchFormLetter_PackingSlip field values
#///
#///
#/// true if the record was updated; otherwise, false.
#///
#boolean updateNow()
#{
# InventMovement inventMovement;
# PurchLineType purchLineType;
# TransactionTxt transactionTxt;
# PurchQty salesUpdateQty;
#
# ;
#
# this.initJournal();
# this.initRecordListInventReportDimHistory();
# transactionTxt = this.initTransactionTxt();
# this.initLedgerVoucher(transactionTxt);
#
# updateSalesLinesQuery = new SysQueryRun(querystr(SalesUpdate));
#
# purchLine.clear();
# purchParmLine.clear();
#
# recordListPurchParmLine.first(purchParmLine);
# while (purchParmLine)
# {
# if (! this.checkDiscardLine())
# {
# purchLine = this.getPurchLine(purchParmLine, true);
#
# setprefix(#PreFixField(purchline, purchId));
#
# this.checkBeforePosting();
# this.displayProgress();
#
# #LinePrefix(purchLine,purchLine.inventdim().prefixitemdim(purchLine.inventTable().dimGroupId))
#
# this.initJournalLine();
# this.initJournalLineLedger();
#
#
# //Create the fixed asset and update the PurchParmLine.
# purchParmLine_Asset = purchParmLine.purchParmLine_Asset(true);
#
# if ((purchParmLine_Asset.CreateFixedAsset == NoYes::Yes)
# && (AssetParameters::find().AssetAllowCreate == NoYes::Yes)
# && (purchParmLine.ReceiveNow > 0))
# {
# this.createFixedAsset(purchParmLine, purchParmLine_Asset);
# }
#
# purchLine.initFromPurchParmLine_Asset(purchParmLine_Asset);
#
# if (purchLine.orig().AssetId != purchLine.AssetId)
# {
# purchLine.assetUpdateInventTrans();
# }
#
# inventMovement = InventMovement::construct(purchLine);
# this.updateInventory(inventMovement);
#
# salesUpdateQty = updateNow;
#
# if (purchLine.DeliveryType == TradeLineDlvType::DropShip)
# this.updateSalesLine(purchLine, salesUpdateQty);
#
# this.writeJournalLine();
#
# this.endJournalLineLedger();
#
# this.updateProjectJournal(updateNowInvent);
#
# this.updateProduction(updateNowInvent);
#
# if (purchParmTable.PurchId != purchParmLine.OrigPurchId)
# this.updateSumPurchId();
#
# purchLineType = PurchLineType::construct(purchLine);
# purchLineType.updatePurchLine(inventMovement.transIdSum());
#
# switch (purchLineType.parmStatusUpdateResults())
# {
# case PurchStatus::Invoiced:
# checkFailed("@SYS113195"); //Status was not changed to Invoiced because one or more pending invoices exist.
# break;
# case PurchStatus::Canceled:
# checkFailed("@SYS113196"); //Status was not changed to Canceled because one or more pending invoices exist.
# break;
# }
#
# purchLine.doUpdate();
#
# if (InventParameters::find().UseQualityManagement)
# {
# InventQualityOrderType::newBuffer(purchLine, NoYes::No, InventTestDocumentStatus::PackingSlip, InventTestExecution::After).findAndCreate();
# }
#
# this.interCompanyTransferBatchSerial(StatusIssue::Deducted);
# }
#
# if (! recordListPurchParmLine.next(purchParmLine))
# break;
# }
#
# if (!this.checkIfSomethingIsPosted())
# return false;
#
#
# progress.setText("@SYS25781");
#
# this.writeJournal();
# this.writeRecordListInventReportDimHistory();
#
# this.endJournalLedger();
#
# ledgerVoucher.end();
#
# return true;
#}
#
ENDSOURCE
SOURCE #updateProduction
#void updateProduction(InventQty _qtyUpdateNow)
#{
# ProdBOM prodBOM;
# ;
#
# if(purchLine.InventRefId && purchLine.ItemRefType == InventRefType::ProdLine)
# {
# prodBOM = ProdBOM::findTransId(purchLine.InventRefTransId);
#
# if(prodBOM)
# {
# prodBOM.postVendorProdBOM(this.updateDate(), _qtyUpdateNow, purchLine);
# prodBOM.postVendorProdRoute(this.updateDate(), _qtyUpdateNow, purchLine);
# }
# }
#}
ENDSOURCE
SOURCE #updateProjectJournal
#void updateProjectJournal(InventQty _inventQtyUpdateNow)
#{
# InventJournalTrans inventJournalTrans;
# ;
#
# if (purchLine.ProjId)
# {
# select firstonly forupdate inventJournalTrans
# index hint TransIdIdx
# where inventJournalTrans.InventTransId == purchLine.InventRefTransId;
#
# if (inventJournalTrans && !inventJournalTrans.inventJournalTable().Posted && inventJournalTrans.Qty <= _inventQtyUpdateNow + purchLine.receivedInventInTotal())
# {
# inventJournalTrans.TransDate = this.updateDate();
# inventJournalTrans.update();
# }
# }
#
#}
#
ENDSOURCE
SOURCE #validateNum
#boolean validateNum(PurchParmTable _purchParmTable)
#{
# boolean ret;
#
# ret = super(_purchParmTable);
#
# if (_purchParmTable.Num)
# {
# if (VendParameters::find().CheckPackingSlip != ReuseVoucher::AcceptDuplicate)
# {
# _purchParmTable.vendTable_OrderAccount().checkPackingSlip(_purchParmTable.Num, _purchParmTable.documentDate());
# }
# }
#
#
# return ret;
#}
ENDSOURCE
SOURCE #writeJournal
#protected void writeJournal()
#{;
# vendPackingSlipJour.initFromPurchTotals(purchTotals);
#
# vendPackingSlipJour.InterCompanyLedgerVoucher = this.interCompanyVoucher();
#
# vendPackingSlipJour.insert();
#
# journalList.ins(vendPackingSlipJour);
#
# this.writeTmpTaxWorkTrans(vendPackingSlipJour.RecId);
#
# this.writeJournalPurchLink();
#}
ENDSOURCE
SOURCE #writeJournalLine
#protected void writeJournalLine()
#{
#
# // Israel-Localisation-Prodware-ImportFolder-Begin
# BPLImpFolderLine BPLImpFolderLine;
# BPLImpLinesTrans BPLImpLinesTrans;
# // Israel-Localisation-Prodware-ImportFolder-End
# super();
#
# vendPackingSlipTrans.clear();
#
# vendPackingSlipTrans.initFromPurchLine(purchLine);
# vendPackingSlipTrans.initFromPurchParmTable(purchParmTable);
# vendPackingSlipTrans.initFromVendPackingSlipJour(vendPackingSlipJour);
# vendPackingSlipTrans.setLinenum(sumByLineNum);
# sumByLineNum++;
#
# vendPackingSlipTrans.Qty = purchParmLine.ReceiveNow;
# vendPackingSlipTrans.InventQty = updateNowInvent;
# vendPackingSlipTrans.Remain = purchParmLine.RemainAfter;
# vendPackingSlipTrans.PartDelivery = !(purchLine.PurchStatus == PurchStatus::Received &&
# purchLine.PurchQty == vendPackingSlipTrans.Qty);
# vendPackingSlipTrans.ValueMST = purchParmLine.lineAmountExclTax(vendPackingSlipJour.DeliveryDate);
# vendPackingSlipTrans.InternalPackingSlipId = internalNumber;
#
# // Israel-Localisation-Prodware-ImportFolder-Begin
# VendPackingSlipTrans.BPLImpFolderId = BPLImpFolderId;
# // Israel-Localisation-Prodware-ImportFolder-End
#
# if (purchTable.CurrencyCode)
# vendPackingSlipTrans.ValueMST = Currency::mstAmount(vendPackingSlipTrans.ValueMST, purchTable.CurrencyCode,vendPackingSlipJour.DeliveryDate);
#
# if(!this.proforma())
# {
# this.addToInventReportDimHistory(vendPackingSlipTrans);
# }
#
# vendPackingSlipTrans.insert();
#
#
# if (purchLine.salesLine().SalesType == SalesType::ItemReq)
# {
# journalTransList.ins(vendPackingSlipTrans);
# }
#
# // Israel-Localisation-Prodware-ImportFolder-Begin
# // Update Impfolderline
# if (BPLImpFolderId)
# {
# BPLImpFolderLine = BPLImpFolderLine::find(vendPackingSlipTrans.InventTransId, vendPackingSlipTrans.BPLImpFolderId,true);
# BPLImpFolderLine.PSlipRecId = vendPackingSlipTrans.RecId;
# BPLImpFolderLine.update();
#
# BPLImpLinesTrans.ImpLineRecId = BPLImpFolderLine::find(vendPackingSlipTrans.InventTransId, vendPackingSlipTrans.BPLImpFolderId).RecId;
# BPLImpLinesTrans.TransRecId = vendPackingSlipTrans.RecId;
# BPLImpLinesTrans.TransTableId = vendPackingSlipTrans.TableId;
# BPLImpLinesTrans.insert();
# }
# // Israel-Localisation-Prodware-ImportFolder-End
#}
#
ENDSOURCE
SOURCE #writeJournalPurchLink
#void writeJournalPurchLink()
#{
# PurchParmLine localPurchParmLine;
# VendPackingSlipPurchLink vendPackingSlipPurchLink;
# ;
#
# ttsbegin;
#
# while select localPurchParmLine
# group by OrigPurchId
# where localPurchParmLine.ParmId == purchParmTable.ParmId
# && localPurchParmLine.TableRefId == purchParmTable.TableRefId
# {
# vendPackingSlipPurchLink.clear();
# vendPackingSlipPurchLink.initFromPurchParmLine (localPurchParmLine);
# vendPackingSlipPurchLink.initFromVendPackingSlipJour (vendPackingSlipJour);
# vendPackingSlipPurchLink.insert();
# }
#
# ttscommit;
#}
ENDSOURCE
SOURCE #description
#static ClassDescription description()
#{
# return "@SYS2023";
#}
ENDSOURCE
ENDMETHODS
ENDCLASS
en-us
Quality orders must be created before posting the packing slip.
@SYS114696
0
0
he
יש ליצור הזמנות איכות לפני רישום תעודת המשלוח.
@SYS114696
0
0
en-us
You must end all related quality orders before continuing.
@SYS113800
0
0
he
עליך לסיים את כל הזמנות האיכות הקשורות לפני שתמשיך.
@SYS113800
0
0
en-us
Consume items for the project immediately.
@SYS70024
0
0
he
צרוך פריטים עבור הפרוייקט מיידית.
@SYS70024
0
0
en-us
Voucher number cannot be selected automatically.
@SYS71652
0
0
he
אין אפשרות לבחור מספר שובר באופן אוטומטי.
@SYS71652
0
0
en-us
Packing slip must be specified for purchase %1
@SYS23050
0
0
he
יש לציין תעודת משלוח עבור רכישה %1
@SYS23050
0
0
en-us
Purchase, packing slip
@SYS2023
0
0
he
רכישה, תעודת משלוח
@SYS2023
0
0
en-us
Status was not changed to Invoiced because one or more pending invoices exist.
@SYS113195
0
0
he
המצב לא השתנה ל'חויב' מכיוון שקיימות אחת או יותר חשבוניות ממתינות.
@SYS113195
0
0
en-us
Status was not changed to Canceled because one or more pending invoices exist.
@SYS113196
0
0
he
המצב לא השתנה ל'בוטל' מכיוון שקיימות אחת או יותר חשבוניות ממתינות.
@SYS113196
0
0
en-us
Posting
ES: Registrar
@SYS25781
0
0
he
רישום
ES: Registrar
@SYS25781
0
0
***Element: CLS
; Microsoft Dynamics AX Class: BPLAppChargeWizard unloaded
; --------------------------------------------------------------------------------
CLSVERSION 1
CLASS #BPLAppChargeWizard
Id 20007
PROPERTIES
Name #BPLAppChargeWizard
Extends #SysWizard
RunOn #Client
ENDPROPERTIES
METHODS
Version: 3
SOURCE #accessMenuFunction
#public MenuFunction accessMenuFunction()
#{
# return new MenuFunction(menuitemdisplaystr(BPLAppChargeWizard),MenuItemType::display);
#}
ENDSOURCE
SOURCE #back
#void back()
#{
# boolean CanShowPrevious = true;
#
# switch (tab.tab())
# {
# case 1: // Ecran d'accueil
# break;
# case 2: // Ecran de sélection des lignes de BL
# break;
# case 3: // Ecran de sélection de la méthode de répartition
# this.parmTabShowResult(false);
# formRun.purchLineExecuteQuery();
# break;
# case 4: // Ecran de consultation/présentation de la répartition
# break;
# case 5: // Ecran final de l'assistant
# this.parmTabShowResult(true);
# formRun.purchLineExecuteQuery();
# break;
# }
#
# if (CanShowPrevious)
# super();
#}
ENDSOURCE
SOURCE #classDeclaration
#// Israel-Localisation-Prodware-ImportFolder
#public class BPLAppChargeWizard extends SysWizard
#{
# PurchLine frompurchline;
# BPLImpFolderLine fromimpFolderLine;
# BPLImpFolderId folderid;
# BPLAppChargeAllocate AllocationMethod;
# NoYes ForcedAllocation;
# boolean TabShowResult;
#}
#
ENDSOURCE
SOURCE #CreateMarkupTrans
#MarkupTrans createMarkupTrans(PurchLine _purchline,Amount _amount,MarkupTable _markupTable,CurrencyCode _fromcurrency, Recid _VendPackingSlipTransRecid)
#{
# MarkupTrans markupTrans;
# ;
#
# markupTrans.clear();
# markupTrans.TransRecId = _purchLine.RecId;
# markupTrans.TransTableId = tablenum(PurchLine);
# markupTrans.initValue();
# markupTrans.MarkupCode = _markupTable.MarkupCode;
# markupTrans.initFromPurchLine(_purchLine);
# markupTrans.initFromMarkupTable(_markupTable);
# markupTrans.Keep = NoYes::No;
# markupTrans.MarkupCategory = MarkupCategory::Fixed;
# markupTrans.ModuleCategory = HeadingLine::Linie;
# markupTrans.BPLAllocationDate = systemdateget();
# markupTrans.BPLImpFolderId = this.parmfolderid();
# markupTrans.Value = Currency::curAmount2CurAmount(_amount,_fromcurrency,markupTrans.CurrencyCode);
# markupTrans.insert();
#
# return markupTrans;
#}
ENDSOURCE
SOURCE #formName
#FormName formName()
#{
# return formstr(BPLAppChargeWizard);
#}
#
ENDSOURCE
SOURCE #next
#void next()
#{
# purchLine _purchLine;
# BPLImpFolderLine impFolderLine;
# boolean CanShowNext = true;
#
# switch (tab.tab())
# {
# case 1: // Ecran d'accueil
# this.parmTabShowResult(false);
# //formRun.purchLineExecuteQuery();
# break;
# case 2: // Ecran de sélection des lignes de BL
# select firstonly impFolderLine
# where impFolderLine.FolderId == this.parmfolderid()
# join _purchLine
# where _purchLine.InventTransId == impFolderLine.InventTransId
# && _purchLine.BPLMarked == NoYes::Yes;
# if (!_purchLine.RecId)
# {
# box::warning("@BPL42");
# CanShowNext = false;
# }
# break;
# case 3: // Ecran de sélection de la méthode de répartition
# CanShowNext = formrun.CalcAndShowResult();
# if (CanShowNext)
# {
# this.parmTabShowResult(true);
# formRun.purchLineExecuteQuery();
# }
# break;
# case 4: // Ecran de consultation/présentation de la répartition
# CanShowNext = formRun.CheckTotalPercent();
# break;
# }
#
# if (CanShowNext)
# super();
#}
ENDSOURCE
SOURCE #parmAllocationMethod
#BPLAppChargeAllocate parmAllocationMethod(BPLAppChargeAllocate _allocationMethod = AllocationMethod)
#{
# AllocationMethod = _allocationMethod;
#
# return AllocationMethod;
#}
ENDSOURCE
SOURCE #parmfolderid
#BPLImpFolderId parmfolderid(BPLImpFolderId _folderid = FolderId)
#{
# folderid = _folderid;
#
# return folderid;
#}
ENDSOURCE
SOURCE #parmForcedAllocation
#NoYes parmForcedAllocation(NoYes _forcedAllocation = ForcedAllocation)
#{
# ForcedAllocation = _forcedAllocation;
#
# return ForcedAllocation;
#}
ENDSOURCE
SOURCE #parmfromImpFolderLine
#BPLImpFolderLine parmfromImpFolderLine(BPLImpFolderLine _impFolderLine = fromimpFolderLine)
#{
# fromimpFolderLine = _impFolderLine;
#
# return fromimpFolderLine;
#}
ENDSOURCE
SOURCE #parmfrompurchline
#PurchLine parmfrompurchline(PurchLine _frompurchline = frompurchline)
#{
# frompurchline = _frompurchline;
#
# return frompurchline;
#}
ENDSOURCE
SOURCE #parmtabshowresult
#boolean parmTabShowResult(boolean _tabshowresult = TabShowResult)
#{
# TabShowResult = _tabshowresult;
#
# return TabShowResult;
#}
ENDSOURCE
SOURCE #run
#void run()
#{
# AmountMST MaxAmount,PurchLineAmount,DiffAmount,AllAmount;
# MarkupTrans markupTrans;
# MarkupTrans MaxMarkup;
# MarkupTable markupTable;
# PurchLine ToPurchLine;
# PurchLine MarkedLines;
# CurrencyCode FromCurrency;
# BPLImpFolderLine impFolderLine;
# ;
#
# select firstonly markupTable order by BPLChargeItemId where markupTable.BPLChargeItemId == this.parmfrompurchline().ItemId;
#
# if (!markupTable.RecId)
# {
# throw error(strfmt("@BPL92",this.parmfrompurchline().ItemId));
# }
# else
# {
# FromCurrency = this.parmfrompurchline().CurrencyCode;
# PurchLineAmount = this.parmfrompurchline().LineAmount;
# DiffAmount = PurchLineAmount;
# MaxAmount = -1;
#
# ttsbegin;
# while select forupdate MarkedLines order by BPLMarked
# where MarkedLines.BPLMarked == NoYes::Yes
# join impFolderLine
# where impFolderLine.InventTransId == MarkedLines.InventTransId
# && impFolderLine.FolderId == this.parmfolderid()
# && impFolderLine.AllocationPercent != 0
# {
# ToPurchLine = MarkedLines;
#
# AllAmount = (PurchLineAmount * impFolderLine.AllocationPercent) / 100;
# AllAmount = Currency::amount(AllAmount,FromCurrency);
# DiffAmount -= AllAmount;
#// YSA
# markupTrans = this.CreateMarkupTrans(ToPurchLine,AllAmount,markupTable,FromCurrency,MarkedLines.RecId);
# if (AllAmount > MaxAmount)
# {
# MaxAmount = AllAmount;
# MaxMarkup.data(MarkupTrans);
# }
#//YSA
# MarkedLines.update();
# }
#
# if (DiffAmount != 0)
# {
# markupTrans = MarkupTrans::BPLfindRecId(MaxMarkup.RecId,true);
# markupTrans.Value += Currency::curAmount2CurAmount(DiffAmount,FromCurrency,markupTrans.CurrencyCode);
# markupTrans.update();
# }
#
# ToPurchLine = PurchLine::findInventTransId(frompurchline.InventTransId,true);
# ToPurchLine.BPLAppChargeAff = NoYes::Yes;
# ToPurchLine.doUpdate();
# ttscommit;
# }
#
# BPLPurchImpFolderLink::MarkUnMarkAll(this.parmfolderid(),NoYes::No);
#}
#
ENDSOURCE
SOURCE #setupNavigation
#/*
#Use this method to setup the two arrays: nextEnabled[] and backEnabled[]
#Call this.nextEnabled(boolean) and this.backEnabled(boolean) to enable/disable the buttons runtime.
#*/
#void setupNavigation()
#{
#
#}
#
ENDSOURCE
SOURCE #validate
#boolean validate()
#{
# return true;
#}
#
ENDSOURCE
SOURCE #description
#static public ClassDescription description()
#{
# return "@BPL12";
#}
ENDSOURCE
SOURCE #main
#static void main(args args)
#{
# InventTableModule inventTableModule;
# BPLAppChargeWizard wizard = new BPLAppChargeWizard();
#
# if (!args || args.dataset() != tablenum(PurchLine))
# throw error(strfmt("@SYS25516",BPLAppChargeWizard::description()));
#
# wizard.parmfrompurchline(args.record());
# wizard.parmfolderid(wizard.parmfrompurchline().BPLImpFolderId);
# inventTableModule = InventTableModule::find(wizard.parmfrompurchline().ItemId, ModuleInventPurchSales::Purch);
# wizard.parmAllocationMethod(inventTableModule.BPLAppChargeAllocate);
#
# if (wizard.prompt())
# wizard.run();
# else
# BPLPurchImpFolderLink::MarkUnMarkAll(wizard.parmfolderid(),NoYes::No);
#}
ENDSOURCE
ENDMETHODS
ENDCLASS
en-us
No line selected
SPLImportFolder
@BPL42
0
0
he
לא נבחרה שורה
SPLImportFolder
@BPL42
0
0
en-us
No Markup associated to Item Code %1
SPLImportFolder
@BPL92
0
0
he
שום ייקור לא צורף לקוד מוצר %1
SPLImportFolder
@BPL92
0
0
en-us
Allocation of additional charges
SPLImportFolder
@BPL12
0
0
he
הקצאה של עלויות נוספות
SPLImportFolder
@BPL12
0
0
en-us
Function %1 requires an active buffer
@SYS25516
0
0
he
פונקציה %1 דורשת מאגר פעיל
@SYS25516
0
0
***Element: CLS
; Microsoft Dynamics AX Class: BPLImpFolderTableChangeStatus unloaded
; --------------------------------------------------------------------------------
CLSVERSION 1
CLASS #BPLImpFolderTableChangeStatus
Id 20008
PROPERTIES
Name #BPLImpFolderTableChangeStatus
Extends #RunBaseBatch
RunOn #Called from
ENDPROPERTIES
METHODS
Version: 3
SOURCE #canGoBatch
#public boolean canGoBatch()
#{
# return false;
#}
ENDSOURCE
SOURCE #classDeclaration
#// Israel-Localisation-Prodware-ImportFolder
#class BPLImpFolderTableChangeStatus extends RunbaseBatch
#{
# DialogField dialogCurrentStatusId, dialogNewStatusId;
# DialogField dialogDateExpected,dialogDateRealized;
# DialogField dialogReference,dialogRemarks;
#
# BPLImpFolderStatusId currentStatusId,newStatusId;
# BPLDateRealized DateRealized;
# DateExpected DateExpected;
# BPLImpFolderReference Reference;
# BPLRemarks Remarks;
#
# BPLImpFolderId folderId;
# BPLImpFolderHistory newFolderHistory;
#
# DialogRunbase dialog;
#}
ENDSOURCE
SOURCE #dialog
#protected Object dialog()
#{
# ;
# dialog = new DialogRunbase("@BPL123", this);
#
# dialogCurrentStatusId = dialog.addFieldValue(typeid(BPLImpFolderStatusId), currentStatusId, "@BPL122");
# dialogCurrentStatusId.enabled(false);
#
# dialogNewStatusId = dialog.addFieldValue(typeid(BPLImpFolderStatusId), newStatusId,"@SYS33665");
# dialogDateExpected = dialog.addFieldValue(typeid(DateExpected), DateExpected);
# dialogDateRealized = dialog.addFieldValue(typeid(BPLDateRealized), systemdateget());
# dialogReference = dialog.addFieldValue(typeid(BPLImpFolderReference), Reference);
# dialogRemarks = dialog.addFieldValue(typeid(BPLRemarks), Remarks);
#
# return dialog;
#}
ENDSOURCE
SOURCE #dialogPostRun
#public void dialogPostRun(DialogRunbase _dialog)
#{
# super(_dialog);
#
# _dialog.dialogForm().formRun().controlMethodOverload(true);
# _dialog.dialogForm().formRun().controlMethodOverloadObject(this);
#}
ENDSOURCE
SOURCE #fld2_1_modified
#public boolean fld2_1_modified()
#{
# boolean ret = true;
# Object control = dialog.formRun().controlCallingMethod();
# Integer old_rank, new_rank;
# ;
#
# ret = control.modified();
# newFolderHistory = BPLImpFolderHistory::find(folderId,dialogNewStatusId.value());
# old_rank = BPLImpFolderTable::find(folderId).CurrentImpFolderHistory().Rank;
# if (ret)
# {
#
# if (newFolderHistory.Rank)
# new_rank = newFolderHistory.Rank;
# else
# new_rank = BPLImpFolderStatus::find(dialogNewStatusId.value()).Rank;
#
# if (new_rank && new_rank <= old_rank)
# {
# dialogNewStatusId.value(NewStatusId);
# dialogDateExpected.value(DateExpected);
# dialogReference.value(Reference);
# dialogRemarks.value(Remarks);
# return checkfailed(strfmt("@BPL121", new_rank, old_rank));
# }
# if (newFolderHistory.DateRealized)
# dialogDateRealized.value(newFolderHistory.DateRealized);
#
# dialogDateExpected.value(newFolderHistory.DateExpected);
# dialogReference.value(newFolderHistory.Reference);
# dialogRemarks.value(newFolderHistory.Remarks);
# }
#
# return ret;
#}
ENDSOURCE
SOURCE #getFromDialog
#public boolean getFromDialog()
#{
# ;
# //newStatusId = dialogNewStatusId.value();
# newStatusId = (dialogNewStatusId.value() ? dialogNewStatusId.value() :
# dialogCurrentStatusId.value());
# DateExpected = dialogDateExpected.value();
# DateRealized = dialogDateRealized.value();
# Reference = dialogReference.value();
# Remarks = dialogRemarks.value();
#
# return super();
#}
ENDSOURCE
SOURCE #pack
#public container pack()
#{
# return connull();
#}
ENDSOURCE
SOURCE #parmCurrentStatusId
#public BPLImpFolderStatusId parmCurrentStatusId(BPLImpFolderStatusId _currentStatusId = currentStatusId)
#{
# ;
# currentStatusId = _currentStatusId;
# return currentStatusId;
#}
ENDSOURCE
SOURCE #parmDateExpected
#public DateExpected parmDateExpected(DateExpected _DateExpected = DateExpected)
#{
# ;
# DateExpected = _DateExpected;
# return DateExpected;
#}
ENDSOURCE
SOURCE #parmFolderId
#public BPLImpFolderId parmFolderId(BPLImpFolderId _FolderId = FolderId)
#{
# ;
# FolderId = _FolderId;
# return FolderId;
#}
ENDSOURCE
SOURCE #parmReference
#public BPLImpFolderReference parmReference(BPLImpFolderReference _Reference = Reference)
#{
# ;
# Reference = _Reference;
# return Reference;
#}
ENDSOURCE
SOURCE #parmRemarks
#public BPLRemarks parmRemarks(BPLRemarks _Remarks = Remarks)
#{
# ;
# Remarks = _Remarks;
# return Remarks;
#}
ENDSOURCE
SOURCE #run
#public void run()
#{
# BPLImpFolderTable BPLImpFolderTable;
#
# super();
#
# ttsbegin;
#
# // Israel-Localisation-Prodware-ImportFolder-Begin
# BPLImpFolderTable = BPLImpFolderTable::find(folderId,true);
# BPLImpFolderTable.CurrentStatusId = newStatusId;
# BPLImpFolderTable.update();
# // Israel-Localisation-Prodware-ImportFolder-End
#
# if (newFolderHistory.RecId)
# newFolderHistory.update();
# else
# newFolderHistory.insert();
# ttscommit;
#}
#
ENDSOURCE
SOURCE #unpack
#public boolean unpack(container packedClass)
#{
# return true;
#}
ENDSOURCE
SOURCE #validate
#public boolean validate(Object calledFrom)
#{
# boolean ret = true;
#
# if (DateRealized > systemdateget())
# {
# dialogDateRealized.value(systemdateget());
# return checkfailed("@BPL30");
# }
# if (ret && FolderId)
# {
# newFolderHistory = BPLImpFolderHistory::find(folderId,newStatusId,true);
# if (newFolderHistory.RecId)
# {
# newFolderHistory.DateExpected = DateExpected;
# newFolderHistory.DateRealized = DateRealized;
# newFolderHistory.Reference = Reference;
# newFolderHistory.Remarks = Remarks;
# }
# else
# {
# newFolderHistory.clear();
# newFolderHistory.initValue();
# newFolderHistory.DateExpected = DateExpected;
# newFolderHistory.FolderId = folderId;
# newFolderHistory.initFromBPLImpFolderStatus(newStatusId);
# newFolderHistory.DateRealized = DateRealized;
# newFolderHistory.Reference = Reference;
# newFolderHistory.Remarks = Remarks;
# }
# ret = newFolderHistory.validateWrite();
# }
# ret = ret && super(calledFrom);
#
# return ret;
#}
ENDSOURCE
SOURCE #construct
#static TaxReportGenerate347 construct()
#{
# return new TaxReportGenerate347();
#}
ENDSOURCE
SOURCE #description
#client server static ClassDescription description()
#{
# return "@BPL123";
#}
ENDSOURCE
SOURCE #main
#static void main(Args args)
#{
# BPLImpFolderTableChangeStatus changeStatus;
# BPLImpFolderTable BPLImpFolderTable;
#// FormRun callerForm;
# FormObjectSet callerDataSource;
# ;
#
# if (!args || !args.caller() || !args.dataset())
# throw error(strfmt("@SYS19306",funcname()));
#
# switch (args.record().TableId)
# {
# case (tablenum(BPLImpFolderTable)) :
# BPLImpFolderTable = args.record();
#
# changeStatus = new BPLImpFolderTableChangeStatus();
# changeStatus.parmFolderId(BPLImpFolderTable.FolderId);
# changeStatus.parmCurrentStatusId(BPLImpFolderTable.CurrentStatusId);
#
# if (changeStatus.prompt())
# {
# changeStatus.run();
#
# if (args.record() && args.record().isFormDataSource())
# {
# callerDataSource = args.record().dataSource();
#
# callerDataSource.reread();
# callerDataSource.refresh();
# }
# }
# break;
#
# default:
# throw error(strfmt("@SYS19306",funcname()));
# }
#}
ENDSOURCE
ENDMETHODS
ENDCLASS
en-us
Change folder status
@BPL123
0
0
he
עדכן מצב התיק
SPLImportFolder
@BPL123
0
0
en-us
Old status
@BPL122
0
0
he
מצב ישן
SPLImportFolder
@BPL122
0
0
en-us
New status
@SYS33665
0
0
he
מצב חדש
@SYS33665
0
0
en-us
The new status has an inferior rank (%1) than the current status (%2)
@BPL121
0
0
he
(למצב החדש יש דירוג (%1) המקדים את זה של המצב הנוכחי (2%
@BPL121
0
0
en-us
Update date cannot be after current date
@BPL30
0
0
he
תאריך העדכון לא יכול להיות אחרי התאריך הנוכחי
@BPL30
0
0
en-us
Function %1 has been used incorrectly.
@SYS19306
0
0
he
נעשה שימוש שגוי בפונקציה %1.
@SYS19306
0
0
***Element: CLS
; Microsoft Dynamics AX Class: PurchLineType unloaded
; --------------------------------------------------------------------------------
CLSVERSION 1
CLASS #PurchLineType
Id 490
PROPERTIES
Name #PurchLineType
Extends #InventType
RunOn #Called from
ENDPROPERTIES
METHODS
Version: 3
SOURCE #allowEditReturnActionId
#boolean allowEditReturnActionId()
#{
# return this.creditNoteLine();
#}
#
ENDSOURCE
SOURCE #allowEditScrap
#boolean allowEditScrap()
#{
# return false;
#}
#
ENDSOURCE
SOURCE #BPLCreateNewPurchLine
#// Israel-Localisation-Prodware-ImportFolder
#void BPLCreateNewPurchLine(PurchLine _purchLine, PurchQty _newQty)
#{
# PurchLine newPurchLine;
#
#
# if (Box::yesNo(strfmt("@BPL106",_newQty),DialogButton::No) != DialogButton::Yes)
# return;
#
# ttsbegin;
# newPurchLine.initFromPurchLine(_purchLine, true, true, true, true, _newQty);
# newPurchLine.initFromPurchTable(PurchTable::find(_purchLine.PurchId));
# newPurchLine.LineNum += _purchLine.LineNum + 0.1;
# newPurchLine.RemainPurchPhysical = newPurchLine.QtyOrdered;
# newPurchLine.RemainInventPhysical = newPurchLine.QtyOrdered;
# newPurchLine.LineAmount = newPurchLine.calcLineAmount();
# newPurchLine.insert(false, false);
#
# ttscommit;
#
# if (_purchLine.isformdataSource())
# {
# _purchLine.dataSource().research(true);
# }
#}
ENDSOURCE
SOURCE #checkDelete
#boolean checkDelete(boolean _useWarning = true)
#{
# boolean ok = true;
# boolean fullyInvoiced;
# Qty invoicedInTotal = this.invoicedInTotal();
# ;
#
# if (purchLine && invoicedInTotal)
# {
# fullyInvoiced = (purchLine.PurchQty == invoicedInTotal);
# switch (PurchParameters::find().AccesLevelInvoiced)
# {
# case SalesPurchAccesLevel::None :
# ok = true;
# break;
#
# case SalesPurchAccesLevel::Warning :
# if (_useWarning)
# {
# if (fullyInvoiced)
# {
# if (Box::yesNo("@SYS122491",DialogButton::Yes) != DialogButton::Yes)
# ok = false;
# }
# else
# {
# if (Box::yesNo("@SYS122489",DialogButton::Yes) != DialogButton::Yes)
# ok = false;
# }
# }
# break;
#
# case SalesPurchAccesLevel::Locked :
# ok = false;
# break;
# }
# }
#
# return ok;
#}
ENDSOURCE
SOURCE #checkPurchUnit
#boolean checkPurchUnit()
#{
# return true;
#}
ENDSOURCE
SOURCE #checkUpdatePhysical
#boolean checkUpdatePhysical()
#{
# return true;
#}
ENDSOURCE
SOURCE #classDeclaration
#class PurchLineType
#extends InventType
#{
# PurchLine purchLine;
# PurchLine purchLine_Orig;
# PurchTable purchTable;
# boolean update;
# DimensionCopy dimensionCopy;
# PurchStatus statusUpdateResults;
#
#}
#
ENDSOURCE
SOURCE #creditNoteLine
#boolean creditNoteLine()
#{
# if (purchLine.PurchQty < 0)
# return true;
# else
# return false;
#}
#
ENDSOURCE
SOURCE #delete
#public void delete(boolean _showInfoDelReserv = true, boolean deletePBA = true)
#{
# #OCCRetryCount
# ;
# try
# {
# ttsbegin;
#
# if (purchLine.SkipUpdate != InterCompanySkipUpdate::InterCompany
# && purchLine.SkipUpdate != InterCompanySkipUpdate::Both)
# this.interCompanyDelete();
#
# if (purchLine.SkipUpdate != InterCompanySkipUpdate::Internal
# && purchLine.SkipUpdate != InterCompanySkipUpdate::Both)
# this.deleteSalesLine();
#
# purchLine.updateBlanketOrder(purchLine.RemainPurchPhysical);
#
# LedgerCov::deleteTransact(purchLine.TableId,purchLine.RecId);
#
# InventUpd_DeleteMovement::newMovement(InventMovement::construct(purchLine),_showInfoDelReserv).updateNow();
#
# if (PurchParameters::find().CancelPurch == NoYes::Yes)
# PurchLineDelete::createFromPurchLine(purchLine);
#
# if (purchLine.SkipUpdate != InterCompanySkipUpdate::Internal
# && purchLine.SkipUpdate != InterCompanySkipUpdate::Both)
# this.updateSalesLine(purchLine);
#
# // pba begin
# purchLine.PBAItemLine::deleteConfig(deletePBA);
# // pba end
#
# purchLine.reread();
#
# purchLine.doDelete();
#
# purchLine.purchTable(update).updateBackStatus();
#
# ttscommit;
# }
# catch (Exception::Deadlock)
# {
# retry;
# }
# catch (Exception::UpdateConflict)
# {
# if (appl.ttsLevel() == 0)
# {
# if (xSession::currentRetryCount() >= #RetryNum)
# {
# throw Exception::UpdateConflictNotRecovered;
# }
# else
# {
# retry;
# }
# }
# else
# {
# throw Exception::UpdateConflict;
# }
# }
# catch (Exception::Error)
# {
# ttsabort;
# throw error("@SYS93835");
# }
#}
#
ENDSOURCE
SOURCE #deleteSalesLine
#void deleteSalesLine()
#{
# SalesLine salesLine;
#
# if (purchLine.SkipUpdate == InterCompanySkipUpdate::Internal
# || purchLine.SkipUpdate == InterCompanySkipUpdate::Both
# || !purchTable.isInterCompanyOrder()
# || !PurchTableType::construct(purchTable).interCompanyCreateAllowed())
# return;
#
# salesLine = SalesLine::findInventTransId(purchLine.InventRefTransId,true);
# if (salesLine)
# {
# salesLine.SkipUpdate = InterCompanySkipUpdate::Internal;
# salesLine.delete();
# }
#}
#
ENDSOURCE
SOURCE #dimensionCopy
#protected DimensionCopy dimensionCopy()
#{
# ;
# if (!dimensionCopy)
# {
# dimensionCopy = DimensionCopy::newFromTable(purchLine);
# }
#
# return dimensionCopy;
#}
ENDSOURCE
SOURCE #initFromInventTable
#void initFromInventTable(InventTable inventTable)
#{
# InventDim inventDim = purchLine.inventDim();
# InventDimSearch dimSearch;
# InventTableModule inventTableModule = InventTableModule::find(inventTable.ItemId, ModuleInventPurchSales::Purch);
# ;
#
# // initializing the item id for the purchase order
# purchLine.ItemId = inventTable.ItemId;
#
# purchLine.TaxItemGroup = inventTableModule.TaxItemGroupId;
#
# inventDim.initFromInventTable(inventTable, InventItemOrderSetupType::Purch, inventDim);
#
# purchLine.setAddressFromInventDim(inventDim);
#
# inventDim = InventDim::findOrCreate(inventDim);
# purchLine.setInventDimId(inventDim.InventDimId, inventDim);
#
# purchLine.ProjCategoryId = inventTable.ProjCategoryId ? inventTable.ProjCategoryId : purchLine.ProjCategoryId;
# purchLine.PurchUnit = inventTableModule.UnitId;
# purchLine.OverDeliveryPct = inventTableModule.OverDeliveryPct;
# purchLine.UnderDeliveryPct = inventTableModule.UnderDeliveryPct;
#
# purchLine.initName(inventTable);
#
# purchLine.initFromVendExternalItemDescription();
#
# purchLine.PurchQty = purchLine.PurchQty
# ? purchLine.PurchQty
# : inventTable.purchStandardQty(inventDim.InventDimId);
#
# purchLine.QtyOrdered = purchLine.calcQtyOrdered();
# purchLine.PriceUnit = inventTableModule.priceUnit();
# purchLine.LineAmount = 0;
# purchLine.lineAmountModified();
#
# purchLine.initBarcode(inventDim);
#
# purchLine.setPriceDisc(inventDim);
#
# purchLine.Dimension = purchLine.copyDimension(Dimensions::findDimension(purchLine, inventTable, purchLine.Dimension), this.dimensionCopy());
#
# // Israel-Localisation-Prodware-ImportFolder-Begin
# purchLine.BPLAppCharge = inventTableModule.BPLAppCharge;
# // Israel-Localisation-Prodware-ImportFolder-End
#
# dimSearch = new InventDimSearch();
# dimSearch.find(inventTable.DimGroupId, fieldnum(InventDim, wmsPalletId));
# if (dimSearch.dimActive())
# {
# if (!dimSearch.dimAllowBlankReceipt())
# purchLine.PalletTagging = inventTable.PalletTagging;
# else
# purchLine.PalletTagging = NoYes::No;
# }
#
# dimSearch.find(inventTable.DimGroupId, fieldnum(InventDim, InventSerialId));
# if (dimSearch.dimActive() && !dimSearch.dimAllowBlankReceipt())
# {
# switch(inventTable.ItemTaggingLevel)
# {
# case RFIDItemTaggingLevel::None :
# purchLine.ItemTagging = NoYes::No;
# purchLine.CaseTagging = NoYes::No;
# break;
#
# case RFIDItemTaggingLevel::ItemLevel :
# purchLine.ItemTagging = NoYes::Yes;
# purchLine.CaseTagging = NoYes::No;
# break;
#
# case RFIDItemTaggingLevel::CaseLevel :
# purchLine.ItemTagging = NoYes::No;
# purchLine.CaseTagging = NoYes::Yes;
# break;
# }
# }
#}
#
ENDSOURCE
SOURCE #initFromPurchTable
#void initFromPurchTable(PurchTable _purchTable)
#{
# ProjTable projTable;
# InventDim inventDim = purchLine.inventDim();
# ;
# purchLine.PurchaseType = _purchTable.PurchaseType;
# purchLine.PurchId = _purchTable.PurchId;
# purchLine.CurrencyCode = _purchTable.CurrencyCode;
# purchLine.TaxGroup = _purchTable.TaxGroup;
# purchLine.Dimension = purchLine.copyDimension(_purchTable.Dimension, this.dimensionCopy());
#
# // Israel-Localisation-Prodware-ImportFolder-Begin
# purchLine.BPLRequestedDlvDate = _purchTable.BPLRequestedDlvDate;
# purchLine.BPLVendorConfirmedDlvDate = _purchTable.BPLVendorConfirmedDlvDate;
# // Israel-Localisation-Prodware-ImportFolder-End
#
# purchLine.DeliveryDate = _purchTable.DeliveryDate;
#
# // Israel-Localisation-Prodware-ImportFolder-Begin
# purchLine.BPLmodifyDeliveryDates(fieldnum(PurchLine, DeliveryDate));
# // Israel-Localisation-Prodware-ImportFolder-End
#
# purchLine.ProjId = _purchTable.ProjId;
#
# if(purchLine.ProjId)
# {
# projTable = ProjTable::find(purchLine.ProjId);
# purchLine.initFromProjTable(projTable);
# }
#
# if (_purchTable.InventLocationId || _purchTable.InventSiteId)
# {
# inventDim.InventLocationId = _purchTable.InventLocationId;
# inventDim.InventSiteId = _purchTable.InventSiteId;
# }
#
# purchLine.setInventDimIdFromInventDim(inventDim);
#
# purchLine.VendAccount = _purchTable.OrderAccount;
# purchLine.VendGroup = _purchTable.VendGroup;
# purchLine.initFromVendTable();
#
# purchLine.setAddressFromPurchTable(_purchTable);
#
# purchLine.TransactionCode = _purchTable.TransactionCode;
# purchLine.Transport = _purchTable.Transport;
# purchLine.Port = _purchTable.Port;
# purchLine.StatProcId = _purchTable.StatProcId;
# purchLine.CountyOrigDest = _purchTable.CountyOrigDest;
#
# if (_purchTable.InterCompanyOrder
# && _purchTable.InterCompanyDirectDelivery)
# {
# purchLine.DeliveryType = TradeLineDlvType::DropShip;
# }
#}
#
ENDSOURCE
SOURCE #initPurchQty
#void initPurchQty()
#{;
# purchLine.QtyOrdered = purchLine.calcQtyOrdered();
# this.initReturn();
#}
ENDSOURCE
SOURCE #initReturn
#void initReturn()
#{
# ;
# if (this.creditNoteLine())
# purchLine.Scrap = false;
# else
# purchLine.ReturnActionId = '';
#}
ENDSOURCE
SOURCE #initValue