AddLinestoSalesOrderDetail

Add Lines to Sales Order Detail - Brazil - 42

Major Business Rule

Object Name: B7600980

Parent DLL: CLOC

Location: Client/Server

Language: C

B7600980 - Add Lines to Sales Order Detail

In order to be able to handle SO NF Accountg, we need to     

base all SOP taxes on the creation of additional SOP lines.  

We will then use the Distribution AAI's and create special   

Line Types (SB, NB, etc.) We will use this process to calcul 

ate ICMS Substitution, IPI, IPI Recoverable, ICMS Payabable, 

Freight, Insurance & Expenses (optional otherwise add Freigh 

t, Ins, Exp for B8).                                         

By using additional SO lines, we do not have to worry about  

reversing taxes, etc, since the standard process will handle 

this. But yet we'll need to write taxes and additional       

costs to the SO detail file.                                 

We will also need to account for the actual reverse of the   

Nota Fiscal (could be as simple as changing status).


This routine will add one tax line to F4211.

                                                             

^

Data Structure

D7600980 - Add Lines to Sales Order Detail - Brazil              - 42

Parameter NameData ItemData TypeReq/OptI/O/Both
mnDocumentOrderInvoiceEDOCOMATH_NUMERICOPTINPUT

A number that identifies an original document. This document can be a voucher, a sales order, an invoice, unapplied cash, a journal entry, 
and so on.

szOrderTypeDCTOcharOPTINPUT

A user defined code (00/DT) that identifies the type of document. This code also indicates the origin of the transaction. J.D. Edwards has 
reserved document type codes for vouchers, invoices, receipts, and time sheets, which create automatic offset entries during the post 
program. (These entries are not self-balancing when you originally enter them.) The following document types are defined by J.D. Edwards and 
should not be changed: P Accounts Payable documents   R Accounts Receivable documents   T Payroll documents   I Inventory documents  
O Purchase Order Processing documents   J General Accounting/Joint Interest Billing documents   S Sales Order Processing documents

szCompanyKeyOrderNoKCOOcharOPTINPUT

A number that, along with order number and order type, uniquely identifies an order document (such as a purchase order, a contract, a 
sales order, and so on). If you use the Next Numbers by Company/Fiscal Year facility, the Automatic Next Numbers program (X0010) uses the 
order company to retrieve the correct next number for that company. If two or more order documents have the same order number and order 
type, the order company lets you locate the desired document. If you use the regular Next Numbers facility, the order company is not used to 
assign a next number. In this case, you probably would not use the order company to locate the document.

mnLineNumberLNIDMATH_NUMERICOPTINPUT

A number that identifies multiple occurrences, such as line numbers on a purchase order or other document. Generally, the system assigns 
this number,but in some cases you can override it.

mnAmountFieldAAMATH_NUMERICOPTINPUT

A number that identifies the amount that the system will add to the account balance of the associated account number.  Enter credits with a 
minus sign (-) either before or after the amount. 

szAmountCodeCODEcharOPTINPUT

The Processing Code indicates how the PC-Based Remote Employee System will process the associated Employee Change Request 
record.  For example, it would be equal to "ADD" when and employee is added, or "CHG" when an employee's master record is changed.

szLineDescriptionDL01charOPTINPUT

A user defined name or remark.

szLineGlClassGLCcharOPTINPUT

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.

szLineTypeLNTYcharOPTINPUT

A code that controls how the system processes lines on a transaction. It controls the systems with which the transaction interfaces, such as 
General Ledger, Job Cost, Accounts Payable, Accounts Receivable, and Inventory Management. It also specifies the conditions under 
which a line prints on reports, and it is included in calculations. Codes include the following: S Stock item   J Job cost   N Nonstock item   F Freight  
T Text information   M Miscellaneous charges and credits   W Work order

cCurrencyConversionFLAGcharOPTINPUT

Contains an indicator for the operation.

cCurrencyConvTypeCRYRcharOPTINPUT

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.

cErrorCodeSL01charOPTOUTPUT

A code used to prompt detail selection from a list of items. Typically, the legitimate selection codes are explained at the bottom of the 
screen of the video display. If not, see the program help instructions.

cModeEV01charOPTINPUT

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

mnAmountForeignExtPriceFEAMATH_NUMERICOPTBOTH

The product of the foreign price times the number of units.

mnLastTaxLineLNIDMATH_NUMERICOPTBOTH

A number that identifies multiple occurrences, such as line numbers on a purchase order or other document. Generally, the system assigns 
this number,but in some cases you can override it.

szDataItemDTAIcharOPTOUTPUT

A code that identifies and defines a unit of information. It is an alphanumeric code up to 8 characters long that does not allow blanks or 
special characters such as %, &, or +. You create new data items using system codes 55-59. You cannot change the alias.

szProgramIdPIDcharOPTOUTPUT

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.

szGLClassErrorAA07charOPTNONE

This item is used scrub Specification Data fields that are 7 character alpha fields.

szDescriptErrorDS40charOPTNONE

A 40-character description.

Related Functions

None

Related Tables

None