AddTaxLinesToReceiptFile

Add Lines to Receipt File - BRA - 43

Major Business Rule

Object Name: B7602020

Parent DLL: CLOC

Location: Client/Server

Language: C

Business Function Specification

Source NameB7602020DesignerMiriam Kato
Data Structure 
D7602020ProgrammerMiriam Kato
Function Name
 Add Lines To Receipt FileSystem Code76
Function CategoryVery Complex
Function UseUPD

Revisions Log 
DateProgrammerSAR NumberDescription
06/05/98Miriam Kato1844117Created



1.Functional Description

1.1Purpose
This Business Function adds lines related to ICMS Substitution, ICMS Substitution Recoverable, IPI, IPI Recoverable, ICMS Recoverable, Repasse and 
Trade Discount to the PO Receipts File (F43121). It will also create GL entries, cardex and average cost for each type of entry described above. This 

function will be called by UBE R76B804 after the distribution AAIs and accounts validation.


1.2Setup Notes and Prerequisites


These setup notes refer to the global process, which includes the call form the Nota Fiscal Maintenance program, UBE R76B804 (Process Taxes in 

Receipt File) and other business functions.

1.Order Activity Rules for NF (for UBE processing options)
2.UDC 76/GL: entries  SUB, SBR, IPI, IPR, ICR,REP, TDC

3.Distribution AAIs for Table Numbers 4385 (Debit) and 4390 (Credit)

4.Accounts for each entry in the chart of accounts

5.Check SAR document for setup details.


1.3Special Logic


The recoverability flags for IPI, ICMS and ICMS Substitution are defined in the Special Handling Code for the UDC 76/PU. In order to read each one 
separately, the following offsets were defined:


#defineIPI_RECOV_POS0(IPI)

#defineICMS_RECOV_POS1(ICMS)

#defineICMS_SUBSRECOV_POS2(ICMS Substitution)




1.3Special Logic


Technical Specifications


2.1 Parameters:

Data Item Data Structure DescriptionI/ORequiredNotes
BNNFmnNotaFiscalNumberIYNota Fiscal Number 

BSERszNotaFiscalSeriesIYNota Fiscal Series

N001mnNextNumberIYNota Fiscal Next Number 001

DCTszDocumentTypeIYNota Fiscal Document Type

UKIDmnUniqueKeyIdInternalIYNota Fiscal Unique Key Id

EV01cCurrencyConversionFlagIYGot in R76B804, used in multi-currency conversion

CRYRcCurrencyConverYNARIYGot from CO 00000, used for multi-currency  conversion

USERszUserIdIYFrom Get Audit Information

PIDszProgramIdIYR76B804

TDAYmnTimeofDayIYFrom Get Audit Information

UPMJmnDateUpdatedIYFrom Get Audit Information

APIcAPIInterfaceYNDistIYFrom Get Line Type Information

IVIcInventoryInformationIYFrom Get Line Type Information

JOBNszWorkstationIdIYFrom Get Audit Information

NXTRszPOStatusCodeNextIYFrom Processing Options

LTTRszPOStatusCodeLastIYFrom Processing Options

EV01cReturnStatusOIf 1, error; else, no error

ICUmnBatchNumberI/OReturn batch number processed


2.2Related Tables 

Table Table Description
F43121PO Receipts File

F7611BNota Fiscal Detail

F4105Cost (Server)

F4111Item Ledger (Server)

F0011Batch

F0911GL Transactions (Server)


2.3Related Business Functions

Source NameFunction Name
B7601090Get Receiver Next Line

GETABDA7Get AB Alpha Name

B0000009Get Next Journal Entry Line Number Header File

B0000042Open, Close Batch

B0900049F0911 MBF

B7601080Get Distribution AAI and Validate Account

B4001040Get Item Master Information

XF4105Get Item Cost

B4100050Inventory Cardex Shell


2.4Processing 


General Logic - Flow


Initializations 


Read the Nota Fiscal Detail record with Key1 = Parameters BNNF, BSER, N001, DCT, UKID

Get related F43121 record with Key1 = MATC, DOCO, DCTO, KCOO, LNID, DOC, NLIN

Get Vendor Alpha Name ( GETABDA7 )

Get Last NLIN ( B7601090 )

Define Recoverability from UDC 76/PU, Key = fdbcfc

Get Next JE Line Number for this document (B0000009 )

If Input Batch Number is zero

Open Batch Header
Else

Save this number to write to GL Entries
Endif


F0911 MBF  Begin Doc (B0900049 )


// Add ICMS Substitution Line

If ( AP Interface == Y )

PRLAND = 2
Else

PRLAND = 3
Endif

Write Receipt Line (ICMS Substitution)


// Add ICMS Substitution Recoverable Line

If (ICMS Substitution Recoverable Flag = 1 )

PRLAND = 3
Write Receipt Line (ICMS Substitution Recoverable)

Endif


// Add IPI  Line

If ( AP Interface == Y )

PRLAND = 2
Else

PRLAND = 3
Endif

Write Receipt Line (IPI)


// Add IPI Recoverable Line

If (ICMS Substitution Recoverable Flag = 1 )

PRLAND = 3
Write Receipt Line (IPI Recoverable)

Endif


// Add ICMS Recoverable Line

If (ICMS Recoverable Flag = 1 )

PRLAND = 3
Write Receipt Line (ICMS Recoverable)

Endif


// Add Repasse  Line

If ( AP Interface == Y )

PRLAND = 2
Else

PRLAND = 3
Endif

Write Receipt Line (Repasse)


// Add Trade Discount Line

If ( AP Interface == Y )

PRLAND = 2
Else

PRLAND = 3
Endif

Write Receipt Line (Trade Discount)


F0911 MBF  End Doc

Process Batch Header
If Update Flag == 1

Update F43121 with ALIN = 2 and LAND = 1
Call Update Average Cost (B7602030)

Endif

Clean Up


Write Receipt Line


If Amount != 0

Load Defaults
Update Flag = 1
// Move Amount to :

PRECST (Amount  Extended Cost)

PRAOPN (Amount  Open)

PRAREC (Amount  Received)


// Multi-Currency
If CNV ==1 and PRCRR != 0

If CRCY = Y
ForeignAmount = Amount/CRR
Endif
If CRCY = Z

ForeignAmount = Amount*CRR
Endif
Endif
Assign Foreign Amount to:

PRFEC (Foreign Extended Cost)
PRFAP (Foreign Open Amount)

PRFREC (Foreign Received Amount)


// Unit Cost

Unit Cost = Amount/PRUREC

Cum Unit Cost = Cum Unit Cost + Unit Cost


If GL Class [Code] != blank

PRGLC = GLClass [Code]
PRVRMK = Remark [Code]

Endif

// Process line number to write

PRALIN = SavNlin

LastNlin = LastNlin + 1

PRNLIN = LastNlin


Write F43121 (Key = unique from F7611B + PRNLIN)
Create GL Entries

Update Cardex 

Endif



Load Defaults


Quantities = 0: PRUORG, UPTD, UCLO, QTYS, QTYR, QTYW, QTYC, QTYJ. QTYA

Amounts = 0: PRPRRC, APTD, ACLO, AVCO, VARC, FRRC, FEC, FAPT, FAP, FREC, FCLO

Status = blanks: PRLTTR, NXTR

Tax Fields

Zero: JELN, DGL
Blanks: EXR1, TXA1, VANI

MATC = 1

TX = 1


Open Batch


Call Open Batch ( B0000042)

Save Batch Number



F0911 MBF  Begin Doc


Load Parameters

Call F0911FSBeginDoc (B0900049)



F0911 MBF  End Doc


Load Parameters

Call F0911FSEndDoc (B0900049)



Create GL Entries


// Get Accounts Numbers for Credit  AAI Tale 4385 and Debit- 4390


Compose new GL Class Code = Code Line + prglc

Get New GL Class and Remark in 76/GL

Call B7601080 (Get Distribution AAI and Validate Account)

Load Parameter for F0911 MBF  Edit Line

Update Line Number

Call F0911 MBF  Edit Line for Debit

Validate amount

Update Accounts

Update Line Number

Call F0911 MBF  Edit Line for Credit


Update Cardex

Parameters (dsF43121, Unit Cost, Inventory Interface, GL Document Type, lpDS, Remark, GL Batch Number)
If (Unit Cost equal zero)

Return ok
Endif


//Get Item Cost

F4105 Get Item Cost (XF4105) read LEDG


//Bypass ledger if cost method is standard (07) or if not full inventory interface

If ( (Cost Method equal 07) or (Inventory Interface not equal to Y))

Return ok
Endif


Load values to include

Call "Inventory Cardex Shell" (B4100050)



2.4Field Mapping 


2.6Mapping 


FIELD MAPPING  F0911            - "Add Tax Lines to Receipt File"


DATA ITEMFIELD DESCRIPTIONUPDATE /WRITEVALUE

F0911ItemFrom FileNote

GLKCODocument CompanyKCOOF43121
GLDCTDocument Type"AE"

GLDOCDocument NumberDOCF43121

GLDGJGL Date

GLJELNJournal Entry line #Next Line

GLEXTLLine Extension Code

GLPOSTGL Posted Code

GLICUBatch NumberB0000042

GLICUTBatch Type"O"

GLDICJBatch DateUPMJlpDS

GLDSYJBatch System DateUPMJlpDS

GLTICUBatch TimeTDAYlpDS

GLCOCompanyCOF43121

GLANIAccount NumberB7601090

GLAMAccount ModeB7601090

GLAIDAccount IDB7601090

GLMCUBusiness UnitB7601090

GLOBJObject AccountB7601090

GLSUBSubsidiaryB7601090

GLSBLSubledger

GLSBLTSubledger Type

GLLTLedger Type"AA"

GLPNGL Period Number0

GLCTRYCentury0

GLFYFiscal Year

Data Structure

D7602020 - Add Lines to Receipt File - Brazil                    - 43A

Data Item Data Structure DescriptionI/ORequiredNotes
BNNFmnNotaFiscalNumberIYNota Fiscal Number 

BSERszNotaFiscalSeriesIYNota Fiscal Series

N001mnNextNumber   IYNota Fiscal Next Number 001

DCTszDocumentTypeIYNota Fiscal Document Type

UKIDmnUniqueKeyIdInternalIYNota Fiscal Unique Key Id

EV01cCurrencyConversionFlagIYGot in R76B804, used in multi-currency conversion

CRYRcCurrencyConverYNARIYGot from CO 00000, used for multi-currency  conversion

USERszUserId       IYFrom Get Audit Information

PIDszProgramId     IYR76B804

TDAYmnTimeofDay    IYFrom Get Audit Information

UPMJmnDateUpdated  IYFrom Get Audit Information

APIcAPIInterfaceYNDistIYFrom Get Line Type Information

IVIcInventoryInformationIYFrom Get Line Type Information

JOBNszWorkstationIdIYFrom Get Audit Information

NXTRszPOStatusCodeNextIYFrom Processing Options

LTTRszPOStatusCodeLastIYFrom Processing Options

EV01cReturnStatus       OIf 1, error; else, no error

ICUmnBatchNumber   I/OReturn batch number processed


^

Parameter NameData ItemData TypeReq/OptI/O/Both
mnNotaFiscalNumberBNNFMATH_NUMERICOPTNONE

A six-character number that identifies a nota fiscal. The number consists of the nota fiscal number and the nota fiscal series.  

szNotaFiscalSeriesBSERcharOPTNONE

A two-character number that along with the nota fiscal number, identifies a nota fiscal. The Nota Fiscal Series field is the second key that the 
system uses to access a specific nota fiscal.

mnNextNumber001N001MATH_NUMERICOPTNONE

The number that the system will assign next. The system can use next numbers for voucher numbers, invoice numbers, journal entry 
numbers, employee numbers, address numbers, contract numbers, and sequential W-2s. You must use the next number types already 
established unless you provide custom programming.

szDocumentTypeDCTcharOPTNONE

A user defined code (00/DT) that identifies the origin and purpose of the transaction.  PeopleSoft reserves several prefixes for document 
types, such as, vouchers, invoices, receipts, and timesheets. The reserved document type prefixes for codes are: P Accounts payable 
documents R Accounts receivable documents  T Time and Pay documents I Inventory documents  O Purchase order documents  S Sales order 
documents 

mnUniqueKeyIDInternalUKIDMATH_NUMERICOPTNONE

This field is a unique number used to identify a record in a file.

cCurrencyConversionFlagEV01charOPTNONE

An option that specifies the type of processing for an event.

cCurrencyConverYNARCRYRcharOPTNONE

A code that specifies whether to use multi-currency accounting, and the method of multi-currency accounting to use: Codes are:    N Do not 
use multi-currency accounting. Use if you enter transactions in only one currency for all companies. The multi-currency fields will not appear 
on forms. The system supplies a value of N if you do not enter a value.    Y Activate multi-currency accounting and use multipliers to convert 
currency. The system multiplies the foreign amount by the exchange rate to calculate the domestic amount.    Z Activate multi-currency 
accounting and use divisors to convert currency. The system divides the foreign amount by the exchange rate to calculate the domestic amount.

szUserIdUSERcharOPTNONE

The code that identifies a user profile.

szProgramIdPIDcharOPTNONE

The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry 
interactive program is P4210, and the number of the Print Invoices batch process report is R42565. The program ID is a variable length value. 
It is assigned according to a structured syntax in the form TSSXXX, where: T The first character of the number is alphabetic and identifies the 
type, such as P for Program, R for Report, and so on. For example, the value P in the number P4210 indicates that the object is a 
program. SS The second and third characters of the number are numeric and identify the system code. For example, the value 42 in the number P4210 
indicates that this program belongs to system 42, which is the Sales Order Processing system. XXX The remaining characters of the numer are 
numeric and identify a unique program or report. For example, the value 10 in the number P4210 indicates that this is the Sales Order Entry 
program.

mnTimeOfDayTDAYMATH_NUMERICOPTNONE

The computer clock in hours:minutes:seconds.

jdDateUpdatedUPMJJDEDATEOPTNONE

The date that specifies the last update to the file record.

cAPInterfaceYNDistAPIcharOPTNONE

A code that indicates whether the system reflects the dollar or unit value of any activity containing this order line type in Accounts Payable. 
In World software, valid values are:    Y Reflect the dollar or unit value of any activity containing this order type in Accounts Payable.    N Do not 
reflect the dollar or unit value of any activity containing this order type in Accounts Payable. In OneWorld, a checkmark indicates that the 
system reflects the dollar or unit value of any activity containing this order type in Accounts Payable.

cInventoryInterfaceIVIcharOPTNONE

A code that identifies the type of interface to the Inventory Management system. Valid values are:    Y The dollar or unit value of any activity 
containing this line type will be reflected in inventory. The system also edits the item that you enter to ensure that it is a valid item. Y is the 
default.    A The system recognizes the number that you enter as a G/L account number. The system uses this code in purchasing only.    B The 
system performs edits when using format 4 in purchase order entry.        The system retrieves price data from the inventory tables, but does not 
update the quantity on the purchase order. This code is valid only when you have set the G/L Interface field to Y (yes). Budget checking is 
fully functional when you use this interface code.    D The item in this line is an inventory item that will not affect availability or quantities.    N The 
item is not an inventory item. To verify whether the item exists in the Item Master file, use Inventory Interface N in conjunction with the flag, Edit 
the Item Master for Non-Stock Items.

szPOStatusCodeNextNXTRcharOPTNONE

A user defined code (system 40/type AT) indicating the next step in the order flow of the line type.

szPOStatusCodeLastLTTRcharOPTNONE

A code (system 40/type AT) specifying the last step in the processing cycle that this order line has successfully completed.

szWorkStationIdJOBNcharOPTNONE

The code that identifies the work station ID that executed a particular job.

cReturnStatusEV01charOPTNONE

An option that specifies the type of processing for an event.

mnBatchNumberICUMATH_NUMERICOPTNONE

A number that identifies a group of transactions that the system processes and balances as a unit. When you enter a batch, you can either 
assign a batch number or let the system assign it using the Next Numbers program.

szGlClassVendorFRT_LCGLCcharOPTNONE

A code that determines the trade account that the system uses as the offset when you post invoices or vouchers. The system concatenates 
the value that you enter to the AAI item RC (for Accounts Receivable) or PC (for Accounts Payable) to locate the trade account. For 
example, if you enter TRAD, the system searches for the AAI item RCTRAD (for receivables) or PCTRAD (for payables).  You can assign up to four 
alphanumeric characters to represent the G/L offset or you can assign the three-character currency code (if you enter transactions in a 
multicurrency environment). You must, however, set up the corresponding AAI item for the system to use; otherwise, the system ignores the G/L 
offset and uses the account that is set up for PC or RC for the company specified.  If you set up a default value in the G/L Offset field of the 
customer or supplier record, the system uses the value during transaction entry unless you override it.  Note: Do not use code 9999. It is reserved for 
the post program and indicates that offsets should not be created.

szGlClassVendorINS_LCGLCcharOPTNONE

A code that determines the trade account that the system uses as the offset when you post invoices or vouchers. The system concatenates 
the value that you enter to the AAI item RC (for Accounts Receivable) or PC (for Accounts Payable) to locate the trade account. For 
example, if you enter TRAD, the system searches for the AAI item RCTRAD (for receivables) or PCTRAD (for payables).  You can assign up to four 
alphanumeric characters to represent the G/L offset or you can assign the three-character currency code (if you enter transactions in a 
multicurrency environment). You must, however, set up the corresponding AAI item for the system to use; otherwise, the system ignores the G/L 
offset and uses the account that is set up for PC or RC for the company specified.  If you set up a default value in the G/L Offset field of the 
customer or supplier record, the system uses the value during transaction entry unless you override it.  Note: Do not use code 9999. It is reserved for 
the post program and indicates that offsets should not be created.

szGlClassVendorEXP_LCGLCcharOPTNONE

A code that determines the trade account that the system uses as the offset when you post invoices or vouchers. The system concatenates 
the value that you enter to the AAI item RC (for Accounts Receivable) or PC (for Accounts Payable) to locate the trade account. For 
example, if you enter TRAD, the system searches for the AAI item RCTRAD (for receivables) or PCTRAD (for payables).  You can assign up to four 
alphanumeric characters to represent the G/L offset or you can assign the three-character currency code (if you enter transactions in a 
multicurrency environment). You must, however, set up the corresponding AAI item for the system to use; otherwise, the system ignores the G/L 
offset and uses the account that is set up for PC or RC for the company specified.  If you set up a default value in the G/L Offset field of the 
customer or supplier record, the system uses the value during transaction entry unless you override it.  Note: Do not use code 9999. It is reserved for 
the post program and indicates that offsets should not be created.

szGlClassLineTypeFRT_LCGLCcharOPTNONE

A code that determines the trade account that the system uses as the offset when you post invoices or vouchers. The system concatenates 
the value that you enter to the AAI item RC (for Accounts Receivable) or PC (for Accounts Payable) to locate the trade account. For 
example, if you enter TRAD, the system searches for the AAI item RCTRAD (for receivables) or PCTRAD (for payables).  You can assign up to four 
alphanumeric characters to represent the G/L offset or you can assign the three-character currency code (if you enter transactions in a 
multicurrency environment). You must, however, set up the corresponding AAI item for the system to use; otherwise, the system ignores the G/L 
offset and uses the account that is set up for PC or RC for the company specified.  If you set up a default value in the G/L Offset field of the 
customer or supplier record, the system uses the value during transaction entry unless you override it.  Note: Do not use code 9999. It is reserved for 
the post program and indicates that offsets should not be created.

szGlClassLineTypeINS_LCGLCcharOPTNONE

A code that determines the trade account that the system uses as the offset when you post invoices or vouchers. The system concatenates 
the value that you enter to the AAI item RC (for Accounts Receivable) or PC (for Accounts Payable) to locate the trade account. For 
example, if you enter TRAD, the system searches for the AAI item RCTRAD (for receivables) or PCTRAD (for payables).  You can assign up to four 
alphanumeric characters to represent the G/L offset or you can assign the three-character currency code (if you enter transactions in a 
multicurrency environment). You must, however, set up the corresponding AAI item for the system to use; otherwise, the system ignores the G/L 
offset and uses the account that is set up for PC or RC for the company specified.  If you set up a default value in the G/L Offset field of the 
customer or supplier record, the system uses the value during transaction entry unless you override it.  Note: Do not use code 9999. It is reserved for 
the post program and indicates that offsets should not be created.

szGlClassLineTypeEXP_LCGLCcharOPTNONE

A code that determines the trade account that the system uses as the offset when you post invoices or vouchers. The system concatenates 
the value that you enter to the AAI item RC (for Accounts Receivable) or PC (for Accounts Payable) to locate the trade account. For 
example, if you enter TRAD, the system searches for the AAI item RCTRAD (for receivables) or PCTRAD (for payables).  You can assign up to four 
alphanumeric characters to represent the G/L offset or you can assign the three-character currency code (if you enter transactions in a 
multicurrency environment). You must, however, set up the corresponding AAI item for the system to use; otherwise, the system ignores the G/L 
offset and uses the account that is set up for PC or RC for the company specified.  If you set up a default value in the G/L Offset field of the 
customer or supplier record, the system uses the value during transaction entry unless you override it.  Note: Do not use code 9999. It is reserved for 
the post program and indicates that offsets should not be created.

cInvInterfaceFRT_LCIVIcharOPTNONE

A code that identifies the type of interface to the Inventory Management system. Valid values are:    Y The dollar or unit value of any activity 
containing this line type will be reflected in inventory. The system also edits the item that you enter to ensure that it is a valid item. Y is the 
default.    A The system recognizes the number that you enter as a G/L account number. The system uses this code in purchasing only.    B The 
system performs edits when using format 4 in purchase order entry.        The system retrieves price data from the inventory tables, but does not 
update the quantity on the purchase order. This code is valid only when you have set the G/L Interface field to Y (yes). Budget checking is 
fully functional when you use this interface code.    D The item in this line is an inventory item that will not affect availability or quantities.    N The 
item is not an inventory item. To verify whether the item exists in the Item Master file, use Inventory Interface N in conjunction with the flag, Edit 
the Item Master for Non-Stock Items.

cInvInterfaceINS_LCIVIcharOPTNONE

A code that identifies the type of interface to the Inventory Management system. Valid values are:    Y The dollar or unit value of any activity 
containing this line type will be reflected in inventory. The system also edits the item that you enter to ensure that it is a valid item. Y is the 
default.    A The system recognizes the number that you enter as a G/L account number. The system uses this code in purchasing only.    B The 
system performs edits when using format 4 in purchase order entry.        The system retrieves price data from the inventory tables, but does not 
update the quantity on the purchase order. This code is valid only when you have set the G/L Interface field to Y (yes). Budget checking is 
fully functional when you use this interface code.    D The item in this line is an inventory item that will not affect availability or quantities.    N The 
item is not an inventory item. To verify whether the item exists in the Item Master file, use Inventory Interface N in conjunction with the flag, Edit 
the Item Master for Non-Stock Items.

cInvInterfaceEXP_LCIVIcharOPTNONE

A code that identifies the type of interface to the Inventory Management system. Valid values are:    Y The dollar or unit value of any activity 
containing this line type will be reflected in inventory. The system also edits the item that you enter to ensure that it is a valid item. Y is the 
default.    A The system recognizes the number that you enter as a G/L account number. The system uses this code in purchasing only.    B The 
system performs edits when using format 4 in purchase order entry.        The system retrieves price data from the inventory tables, but does not 
update the quantity on the purchase order. This code is valid only when you have set the G/L Interface field to Y (yes). Budget checking is 
fully functional when you use this interface code.    D The item in this line is an inventory item that will not affect availability or quantities.    N The 
item is not an inventory item. To verify whether the item exists in the Item Master file, use Inventory Interface N in conjunction with the flag, Edit 
the Item Master for Non-Stock Items.

cAPInterfaceFRT_LCAPIcharOPTNONE

A code that indicates whether the system reflects the dollar or unit value of any activity containing this order line type in Accounts Payable. 
In World software, valid values are:    Y Reflect the dollar or unit value of any activity containing this order type in Accounts Payable.    N Do not 
reflect the dollar or unit value of any activity containing this order type in Accounts Payable. In OneWorld, a checkmark indicates that the 
system reflects the dollar or unit value of any activity containing this order type in Accounts Payable.

cAPInterfaceINS_LCAPIcharOPTNONE

A code that indicates whether the system reflects the dollar or unit value of any activity containing this order line type in Accounts Payable. 
In World software, valid values are:    Y Reflect the dollar or unit value of any activity containing this order type in Accounts Payable.    N Do not 
reflect the dollar or unit value of any activity containing this order type in Accounts Payable. In OneWorld, a checkmark indicates that the 
system reflects the dollar or unit value of any activity containing this order type in Accounts Payable.

cAPInterfaceEXP_LCAPIcharOPTNONE

A code that indicates whether the system reflects the dollar or unit value of any activity containing this order line type in Accounts Payable. 
In World software, valid values are:    Y Reflect the dollar or unit value of any activity containing this order type in Accounts Payable.    N Do not 
reflect the dollar or unit value of any activity containing this order type in Accounts Payable. In OneWorld, a checkmark indicates that the 
system reflects the dollar or unit value of any activity containing this order type in Accounts Payable.

szDocTypeCadexExp_LCDCTcharOPTNONE

A user defined code (00/DT) that identifies the origin and purpose of the transaction.  PeopleSoft reserves several prefixes for document 
types, such as, vouchers, invoices, receipts, and timesheets. The reserved document type prefixes for codes are: P Accounts payable 
documents R Accounts receivable documents  T Time and Pay documents I Inventory documents  O Purchase order documents  S Sales order 
documents 

szDocTypeCadexReg_LCDCTcharOPTNONE

A user defined code (00/DT) that identifies the origin and purpose of the transaction.  PeopleSoft reserves several prefixes for document 
types, such as, vouchers, invoices, receipts, and timesheets. The reserved document type prefixes for codes are: P Accounts payable 
documents R Accounts receivable documents  T Time and Pay documents I Inventory documents  O Purchase order documents  S Sales order 
documents 

cF43121ByTotal_LCEV01charOPTNONE

An option that specifies the type of processing for an event.

cF43121ProcessFlag_LCEV01charOPTNONE

An option that specifies the type of processing for an event.

mnTotalFreight_LCBFRTMATH_NUMERICOPTNONE

A complementary expense to your customer. The system prorates this expense amount among each of the notas fiscais listed and adds 
the prorated amount to the ICMS taxable amount for each document.

mnTotalInsurance_LCBSEGMATH_NUMERICOPTNONE

The insurance amount that you charge the client as complementary expense. This amount must be included on the nota fiscal.

mnTotalExpenses_LCBDFNMATH_NUMERICOPTNONE

The amount of the total financial expenses that is printed on the nota fiscal.

cLandedCostYorNEV01charOPTNONE

An option that specifies the type of processing for an event.

szErrorMessageDSCAcharOPTNONE

A description for the data items. Enter text in upper and lower case. The system uses this name to search for similar data items. To enter an 
alpha description, follow these conventions: Dates Begin all date fields with the word, Date. Amounts Begin all amount fields with the word, 
Amount. Units Begin all unit, quantity, and volume fields with the word, Units. Name Begin all 30-byte description fields with the word, 
Name. Prompt Begin any Y/N prompting field with the word, Prompt. Address Number  Begin all address numbers (employee, customer, owner) with the 
word, Address Number.

szPOOverrideStatusLTTRcharOPTNONE

A code (system 40/type AT) specifying the last step in the processing cycle that this order line has successfully completed.

Related Functions

None

Related Tables

None
:10pt">Endif


// Add ICMS Recoverable Line

If (ICMS Recoverable Flag = 1 )

PRLAND = 3
Write Receipt Line (ICMS Recoverable)

Endif


// Add Repasse  Line

If ( AP Interface == Y )

PRLAND = 2
Else

PRLAND = 3
Endif

Write Receipt Line (Repasse)


// Add Trade Discount Line

If ( AP Interface == Y )

PRLAND = 2
Else

PRLAND = 3
Endif

Write Receipt Line (Trade Discount)


F0911 MBF  End Doc

Process Batch Header
If Update Flag == 1

Update F43121 with ALIN = 2 and LAND = 1
Call Update Average Cost (B7602030)

Endif

Clean Up


Write Receipt Line


If Amount != 0

Load Defaults
Update Flag = 1
// Move Amount to :

PRECST (Amount  Extended Cost)

PRAOPN (Amount  Open)

PRAREC (Amount  Received)


// Multi-Currency
If CNV ==1 and PRCRR != 0

If CRCY = Y
ForeignAmount = Amount/CRR
Endif
If CRCY = Z

ForeignAmount = Amount*CRR
Endif
Endif
Assign Foreign Amount to:

PRFEC (Foreign Extended Cost)
PRFAP (Foreign Open Amount)

PRFREC (Foreign Received Amount)


// Unit Cost

Unit Cost = Amount/PRUREC

Cum Unit Cost = Cum Unit Cost + Unit Cost


If GL Class [Code] != blank

PRGLC = GLClass [Code]
PRVRMK = Remark [Code]

Endif

// Process line number to write

PRALIN = SavNlin

LastNlin = LastNlin + 1

PRNLIN = LastNlin


Write F43121 (Key = unique from F7611B + PRNLIN)
Create GL Entries

Update Cardex 

Endif



Load Defaults


Quantities = 0: PRUORG, UPTD, UCLO, QTYS, QTYR, QTYW, QTYC, QTYJ. QTYA

Amounts = 0: PRPRRC, APTD, ACLO, AVCO, VARC, FRRC, FEC, FAPT, FAP, FREC, FCLO

Status = blanks: PRLTTR, NXTR

Tax Fields

Zero: JELN, DGL
Blanks: EXR1, TXA1, VANI

MATC = 1

TX = 1


Open Batch


Call Open Batch ( B0000042)

Save Batch Number



F0911 MBF  Begin Doc


Load Parameters

Call F0911FSBeginDoc (B0900049)



F0911 MBF  End Doc


Load Parameters

Call F0911FSEndDoc (B0900049)



Create GL Entries


// Get Accounts Numbers for Credit  AAI Tale 4385 and Debit- 4390


Compose new GL Class Code = Code Line + prglc

Get New GL Class and Remark in 76/GL

Call B7601080 (Get Distribution AAI and Validate Account)

Load Parameter for F0911 MBF  Edit Line

Update Line Number

Call F0911 MBF  Edit Line for Debit

Validate