Condividi tramite


ReleaseUpdateTransformDB50_Ledger.updateFiscalDocuments_BR Upgrade Script

Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2

Class

ReleaseUpdateTransformDB50_Ledger

Method

updateFiscalDocuments_BR

Description

This script is used for updating the fiscal documents.

Script Type

Preprocessing 60: Live

Pre-processing60: Delta

Ax Version

Microsoft Dynamics AX 2009

Affected Modules and Tables

Affected Modules

General ledger

Affected Tables

DEL_FiscalDocJourUpgrade_BR

FiscalDocument_BR

FiscalDocTrans_BR

FiscalDocumentLine_BR

LogisticsPostalAddres

DEL_FiscalDocJourUpgrade_BR

FiscalDocumentCustVendTrans_BR

FiscalDocumentInstallment_BR

FiscalDocumentReferencedProcess_BR

FiscalDocumentShipmentStat_BR

Remarks

The script creates the new fiscal document model based on <c>FiscalDocJour</c> and <c>FiscalDocTrans</c> tables information.

Data Migration Section

From Table: FiscalDocJour

To Table: FiscalDocument_BR

RefRecId

RefRecId

RefTableId

RefTableId

Status

Status

InvoiceDate

FiscalDocumentDate

InvoiceDate

AccountingDate

FiscalDocNumber

FiscalDocumentNumber

InvoiceSeries

FiscalDocumentSeries

InventoryDirection

Direction

Voucher

Voucher

CFOPName

OperationDescription

InvoiceAccount

FiscalDocumentAccountNum

DeliveryCNPJCPFNum

DeliveryCNPJCPF

DeliveryIENum

DeliveryIE

DeliveryVehicleBrand

PackingBrand

DeliveryVehicleLicense

VehicleLicensePlateNumber

DeliveryVehicleLicenseState

VehicleLicensePlateState

ComplementaryInvoice

ComplementaryInvoice

DlvMode

DeliveryMode

DlvTerm

DeliveryTerm

ComplementaryType

ComplementaryType

TotalAmount

TotalAmount

TotalGoodsAmount

TotalGoodsAmount

TotalServicesAmount

TotalServicesAmount

TotalDiscountAmount

TotalDiscountAmount

SumMarkupFreight

TotalMarkupFreightAmount

SumMarkupInsurance

TotalMarkupInsuranceAmount

SumMarkupOthers

TotalMarkupOtherAmount

From Table: CompanyInfo

To Table: FiscalDocument_BR

Name

FiscalEstablishmentName

CNPJCPFNum

FiscalEstablishmentCNPJCPF

CCMNum

FiscalEstablishmentCCMNum

IENum

FiscalEstablishmentIE

Phone

FiscalEstablishmentPhone

TributarySubstitutionRegistry

FiscalEstablishmentTribSubstitutionReg

From Table: LogisticsPostalAddress

To Table: FiscalDocument_BR

RecId

FiscalEstablishmentPostalAddress

RecId

SalesCarrierLogisticsPostalAddress

From Table: CustTable

To Table: FiscalDocument_BR

Name

ThirdPartyName

CNPJCPFNum

ThirdPartyCNPJCPF

CCMNum

ThirdPartyCCMNum

IENum

ThirdPartyIE

Phone

ThirdPartyPhone

TeleFax

ThirdPartyFax

From Table: VendTable

To Table: FiscalDocument_BR

Name

ThirdPartyName

CNPJCPFNum

ThirdPartyCNPJCPF

CCMNum

ThirdPartyCCMNum

IENum

ThirdPartyIE

Phone

ThirdPartyPhone

TeleFax

ThirdPartyFax

From Table: CustInvoiceJour

To Table: LogisticsPostalAddress

InvoicingName

Address

InvCountryRegionId

CountryRegionId

InvState

State

InvZipCode

ZipCode

InvoiceCity

City

InvoiceStreet

Street

InvAddressNumber

StreetNumber

InvDistrictName

DistrictName

InvAddressComplement

BuildingCompliment

From Table: VendInvoiceJour

To Table: LogisticsPostalAddress

InvoiceAddress

Address

InvoiceCountryRegion

CountryRegionId

InvoiceState

State

InvoiceZipCode

ZipCode

InvoiceCity

City

InvoiceStreet

Street

InvoiceAddressNumber

StreetNumber

InvoiceDistrict

DistrictName

InvoiceAddressComplement

BuildingCompliment

From Table: CustPackingSlipJour

To Table: LogisticsPostalAddress

DeliveryAddress

Address

DlvCountryRegionId

CountryRegionId

DlvState

State

DlvZipCode

ZipCode

DeliveryCity

City

DeliveryStreet

Street

DlvAddressNumber

StreetNumber

DlvDistrictName

DistrictName

DlvAddressComplement

BuildingCompliment

From Table: FiscalDocJour

To Table: LogisticsPostalAddress

DeliveryAddress

Address

DeliveryAddressCountryRegion

CountryRegionId

DeliveryAddressState

State

DeliveryAddressZipCode

ZipCode

DeliveryAddressCity

City

DeliveryAddressStreet

Street

DeliveryAddressStreetNumber

StreetNumber

DeliveryAddressDistrict

DistrictName

DeliveryAddressComplement

BuldingCompliment

From Table: SalesCarrier

To Table: FiscalDocument_BR

RecId

SalesCarrier

From Table: FiscalDocument_BR

To Table: FiscalDocumentLine_BR

RecId

FiscalDocument

From Table: FiscalDocTrans

To Table: FiscalDocumentLine_BR

RefTableId

RefTableId

RefRecId

RefRecId

CFOPId

CFOP

ItemName

Description

LineNum

LineNum

ItemId

ItemId

InventTransId

InventTransId

LineUnit

Unit

Qty

Quantity

LineDiscAmount

LineDiscount

LineUnitPrice

UnitPrice

TaxationOrigin

Origin

ServiceCodeId

ServiceCode

LineUnitPrice

UnitPrice

From Table: FiscalDocJour

To Table: DEL_FiscalDocJourUpgrade_BR

RecId

FiscalDocJourRecId

RecVersion

RecVersionId

From Table: FiscalDocument_BR

To Table: DEL_FiscalDocJourUpgrade_BR

RecId

FiscalDocumentRecId

From Table: FiscalDocument_BR

To Table: FiscalDocumentCustVendTrans_BR

RecId

FiscalDocument

From Table: FiscalDocJour

To Table: FiscalDocumentCustVendTrans_BR

PrimaryMethod

DocumentType

PaymentDueDate

DueDate

TotalAmount

Amount

From Table: FiscalDocumentCustVendTrans_BR

To Table: FiscalDocumentInstallment_BR

RecId

FiscalDocumentCustVendTrans

From Table: CustPaymSchedLine

To Table: FiscalDocumentInstallment_BR

DueAmount

Amount

DueDate

DueDate

From Table: FiscalDocument_BR

To Table: FiscalDocumentReferencedProcess_BR

RecId

FiscalDocument

From Table: FiscalDocJour

To Table: FiscalDocumentReferencedProcess_BR

ProcessAgency

Agency

ProcessNumber

ProcessNumber

From Table: FiscalDocument_BR

To Table: FiscalDocumentShipmentStat_BR

RecId

FiscalDocument

From Table: FiscalDocJour

To Table: FiscalDocumentShipmentStat_BR

GrossWeight

GrossWeight

NetWeight

NetWeight

VolumeType

VolumeType

VolumeQty

VolumeQuantity

New Tables or Fields

Table

Field

Extended Data Type

-or- Base Enum

FiscalDocument_BR

FiscalDocumentLine_BR

FiscalDocumentCustVendTrans_BR

FiscalDocumentInstallment_BR

FiscalDocumentReferencedProcess_BR

FiscalDocumentShipmentStat_BR