on 06-15-2015 8:31 PM
Buenas tardes, vengo con una duda y la cual es como seria el XML para poder generar una orden de venta. Lo estoy manejando desde un WebService consumido por PHP y quería saber si alguien tendría un ejemplo de como crear una orden de venta gracias.
Buenos días
El XML tiene la siguiente estructura.
<BOM>
<BO>
<AdmInfo>
<Object>17</Object>
<Version>2</Version>
</AdmInfo>
<Documents>
<row>
<CardCode>XXXXX</CardCode>
<DocDate>YYYYMMDD</CardCode>
<DocDueDate>YYYYMMDD</DocDueDate>
</row>
</Documents>
<Document_Lines>
<row>
<ItemCode>XXXXXX</ItemCode>
<Quantity>1000</Quantity>
<Price>12000.00</Price>
</row>
<row>
<ItemCode>XXXXXX</ItemCode>
<Quantity>1000</Quantity>
<Price>12000.00</Price>
</row>
<row>
<ItemCode>XXXXXX</ItemCode>
<Quantity>1000</Quantity>
<Price>12000.00</Price>
</row>
</Document_Lines>
<BO>
<BOM>
Aquí un XML completo
<?xml version="1.0" encoding="UTF-16"?>
<BOM>
<BO>
<AdmInfo>
<Object>17</Object>
<Version>2</Version>
</AdmInfo>
<Documents>
<row>
<DocEntry>247435</DocEntry>
<DocNum>1005582</DocNum>
<DocType>dDocument_Items</DocType>
<HandWritten>tNO</HandWritten>
<Printed>psYes</Printed>
<DocDate>20150326</DocDate>
<DocDueDate>20150626</DocDueDate>
<CardCode>C53150040</CardCode>
<CardName>SUCESION AUGUSTO MARIO LOPEZ LODIZ</CardName>
<Address>SAN DIEGO Nº158 SANTIAGO SANTIAGO CHILE</Address>
<DocTotal>128699.000000</DocTotal>
<DocCurrency>$</DocCurrency>
<DocRate>1.000000</DocRate>
<Reference1>1005582</Reference1>
<Comments>DESPACHAR Basado en Ofertas de ventas 23004693. Basado en Pedidos de cliente 25004326.</Comments>
<JournalMemo>Facturas clientes - C53150040</JournalMemo>
<PaymentGroupCode>3</PaymentGroupCode>
<DocTime>1611</DocTime>
<SalesPersonCode>13</SalesPersonCode>
<TransportationCode>-1</TransportationCode>
<Confirmed>tYES</Confirmed>
<SummeryType>dNoSummary</SummeryType>
<ContactPersonCode>0</ContactPersonCode>
<ShowSCN>tNO</ShowSCN>
<Series>5</Series>
<TaxDate>20150326</TaxDate>
<PartialSupply>tYES</PartialSupply>
<DocObjectCode>13</DocObjectCode>
<ShipToCode>DESPACHO</ShipToCode>
<Indicator>33</Indicator>
<FederalTaxID>53150040-7</FederalTaxID>
<DiscountPercent>0.000000</DiscountPercent>
<DocTotalFc>0.000000</DocTotalFc>
<RevisionPo>tNO</RevisionPo>
<BlockDunning>tNO</BlockDunning>
<Pick>tNO</Pick>
<PaymentMethod/>
<PaymentBlock>tNO</PaymentBlock>
<MaximumCashDiscount>tNO</MaximumCashDiscount>
<WareHouseUpdateType>dwh_Stock</WareHouseUpdateType>
<Rounding>tNO</Rounding>
<DeferredTax>tNO</DeferredTax>
<NumberOfInstallments>1</NumberOfInstallments>
<ApplyTaxOnFirstInstallment>tNO</ApplyTaxOnFirstInstallment>
<DocumentsOwner>142</DocumentsOwner>
<FolioPrefixString>33</FolioPrefixString>
<FolioNumber>86924</FolioNumber>
<DocumentSubType>bod_None</DocumentSubType>
<Address2>SAN DIEGO Nº158 SANTIAGO SANTIAGO CHILE</Address2>
<PayToCode>PRINCIPAL</PayToCode>
<UseShpdGoodsAct>tNO</UseShpdGoodsAct>
<IsPayToBank>tNO</IsPayToBank>
<DownPayment>0.000000</DownPayment>
<ReserveInvoice>tNO</ReserveInvoice>
<LanguageCode>25</LanguageCode>
<PickRemark/>
<SequenceModel>0</SequenceModel>
<UseCorrectionVATGroup>tNO</UseCorrectionVATGroup>
<DownPaymentAmount>0.000000</DownPaymentAmount>
<DownPaymentPercentage>0.000000</DownPaymentPercentage>
<DownPaymentType>dptInvoice</DownPaymentType>
<DownPaymentAmountSC>0.000000</DownPaymentAmountSC>
<DownPaymentAmountFC>0.000000</DownPaymentAmountFC>
<VatPercent>0.000000</VatPercent>
<ServiceGrossProfitPercent>0.000000</ServiceGrossProfitPercent>
<OpeningRemarks/>
<ClosingRemarks/>
<RoundingDiffAmount>0.000000</RoundingDiffAmount>
<ControlAccount>11104011</ControlAccount>
<InsuranceOperation347>tNO</InsuranceOperation347>
<ArchiveNonremovableSalesQuotation>tNO</ArchiveNonremovableSalesQuotation>
<ExtraMonth>3</ExtraMonth>
<ExtraDays>0</ExtraDays>
<CashDiscountDateOffset>0</CashDiscountDateOffset>
<StartFrom>pdt_None</StartFrom>
<NTSApproved>tNO</NTSApproved>
<EDocGenerationType>edocNotRelevant</EDocGenerationType>
<EDocStatus>edoc_Ok</EDocStatus>
<DownPaymentStatus>so_Open</DownPaymentStatus>
<GroupHandWritten>tNO</GroupHandWritten>
<CreateOnlineQuotation>tNO</CreateOnlineQuotation>
<ApplyCurrentVATRatesForDownPaymentsToDraw>tNO</ApplyCurrentVATRatesForDownPaymentsToDraw>
<ClosingOption>coByCurrentSystemDate</ClosingOption>
<OpenForLandedCosts>tYES</OpenForLandedCosts>
<RelevantToGTS>tNO</RelevantToGTS>
<IsAlteration>tNO</IsAlteration>
<DocumentDelivery>ddtNoneSeleted</DocumentDelivery>
<ReuseDocumentNum>tNO</ReuseDocumentNum>
<ReuseNotaFiscalNum>tNO</ReuseNotaFiscalNum>
<PrintSEPADirect>tNO</PrintSEPADirect>
<U_Bol_Ini>0</U_Bol_Ini>
<U_Bol_Fin>0</U_Bol_Fin>
<U_Fae_EstFae>0</U_Fae_EstFae>
<U_Fae_MsgFaE>Proceso OK</U_Fae_MsgFaE>
<U_Tipo_Venta>Distrib</U_Tipo_Venta>
<U_CTX_ICDC>N</U_CTX_ICDC>
<U_CTX_STBD>0.000000</U_CTX_STBD>
<U_CTX_STPD>0.000000</U_CTX_STPD>
<U_CTX_ICDL>N</U_CTX_ICDL>
<U_CTX_ORDR>Y</U_CTX_ORDR>
<U_CTX_STTS>P</U_CTX_STTS>
<U_CTX_CONF>N</U_CTX_CONF>
<U_CTX_DRFNO>10692</U_CTX_DRFNO>
<U_CTX_CDOC>N</U_CTX_CDOC>
<U_SEGURO>0.000000</U_SEGURO>
<U_FEE>0.000000</U_FEE>
<U_PORCFLETECARGA>0.000000</U_PORCFLETECARGA>
<U_CBM>0.000000</U_CBM>
<U_PESOKG>0.000000</U_PESOKG>
</row>
</Documents>
<Document_Lines>
<row>
<LineNum>0</LineNum>
<ItemCode>1096177</ItemCode>
<ItemDescription>SA-77 TECLADO C/FUENTE 9.5V CASIO</ItemDescription>
<Quantity>3.000000</Quantity>
<ShipDate>20150331</ShipDate>
<Price>36050.000000</Price>
<PriceAfterVAT>42899.500000</PriceAfterVAT>
<Currency>$</Currency>
<Rate>0.000000</Rate>
<DiscountPercent>0.000000</DiscountPercent>
<VendorNum/>
<WarehouseCode>DEALER</WarehouseCode>
<SalesPersonCode>13</SalesPersonCode>
<CommisionPercent>0.000000</CommisionPercent>
<TreeType>iProductionTree</TreeType>
<AccountCode>41111100</AccountCode>
<UseBaseUnits>tNO</UseBaseUnits>
<SupplierCatNum/>
<CostingCode>CHL</CostingCode>
<ProjectCode/>
<BarCode>1096177</BarCode>
<VatGroup>IVA</VatGroup>
<Height1>0.000000</Height1>
<Height2>0.000000</Height2>
<Lengh1>0.000000</Lengh1>
<Lengh2>0.000000</Lengh2>
<Weight1>0.000000</Weight1>
<Weight2>0.000000</Weight2>
<Factor1>1.000000</Factor1>
<Factor2>1.000000</Factor2>
<Factor3>1.000000</Factor3>
<Factor4>1.000000</Factor4>
<BaseType>17</BaseType>
<BaseEntry>4326</BaseEntry>
<BaseLine>0</BaseLine>
<Volume>0.035328</Volume>
<VolumeUnit>4</VolumeUnit>
<Width1>0.000000</Width1>
<Width2>0.000000</Width2>
<Address>CAMINO LA VARA #03411 BLOCK MOD-9 78274028 SANTIAGO CHILE</Address>
<TaxCode>IVA</TaxCode>
<TaxType>tt_Yes</TaxType>
<TaxLiable>tYES</TaxLiable>
<BackOrder>tYES</BackOrder>
<FreeText/>
<ShippingMethod>2</ShippingMethod>
<CorrectionInvoiceItem>ciis_ShouldBe</CorrectionInvoiceItem>
<CorrInvAmountToStock>0.000000</CorrInvAmountToStock>
<CorrInvAmountToDiffAcct>0.000000</CorrInvAmountToDiffAcct>
<WTLiable>tNO</WTLiable>
<DeferredTax>tNO</DeferredTax>
<MeasureUnit>UNIDAD</MeasureUnit>
<UnitsOfMeasurment>1.000000</UnitsOfMeasurment>
<LineTotal>108150.000000</LineTotal>
<TaxPercentagePerRow>19.000000</TaxPercentagePerRow>
<TaxTotal>20549.000000</TaxTotal>
<ConsumerSalesForecast>tNO</ConsumerSalesForecast>
<ExciseAmount>0.000000</ExciseAmount>
<CountryOrg/>
<SWW/>
<DistributeExpense>tYES</DistributeExpense>
<ShipToCode>DESPACHO</ShipToCode>
<RowTotalFC>0.000000</RowTotalFC>
<TaxOnly>tNO</TaxOnly>
<UnitPrice>36050.000000</UnitPrice>
<LineStatus>bost_Open</LineStatus>
<PackageQuantity>3.000000</PackageQuantity>
<LineType>dlt_Regular</LineType>
<COGSCostingCode>CHL</COGSCostingCode>
<COGSAccountCode>51111100</COGSAccountCode>
<ChangeAssemlyBoMWarehouse>N</ChangeAssemlyBoMWarehouse>
<GrossBuyPrice>21596.330000</GrossBuyPrice>
<GrossBase>-5</GrossBase>
<GrossProfitTotalBasePrice>64789.000000</GrossProfitTotalBasePrice>
<CostingCode2>DIST</CostingCode2>
<CostingCode3>DISTRIB</CostingCode3>
<ItemDetails>SA-77 TECLADO C/FUENTE 9.5V CASIO</ItemDetails>
<ActualDeliveryDate>20150326</ActualDeliveryDate>
<RequiredQuantity>0.000000</RequiredQuantity>
<COGSCostingCode2>DIST</COGSCostingCode2>
<COGSCostingCode3>DISTRIB</COGSCostingCode3>
<WithoutInventoryMovement>tNO</WithoutInventoryMovement>
<ShipToDescription>SAN DIEGO Nº158 SANTIAGO SANTIAGO CHILE</ShipToDescription>
<DocEntry>247435</DocEntry>
<Surpluses>0.000000</Surpluses>
<DefectAndBreakup>0.000000</DefectAndBreakup>
<Shortages>0.000000</Shortages>
<ConsiderQuantity>tNO</ConsiderQuantity>
<PartialRetirement>tNO</PartialRetirement>
<RetirementQuantity>0.000000</RetirementQuantity>
<RetirementAPC>0.000000</RetirementAPC>
<UoMEntry>-1</UoMEntry>
<InventoryQuantity>3.000000</InventoryQuantity>
<Incoterms>0</Incoterms>
<TransportMode>0</TransportMode>
<U_Saldo_Bodega>0.000000</U_Saldo_Bodega>
<U_CTX_STAL>0.000000</U_CTX_STAL>
<U_CTX_SETL>0.000000</U_CTX_SETL>
<U_CTX_S2TL>0.000000</U_CTX_S2TL>
<U_CTX_S3TL>0.000000</U_CTX_S3TL>
<U_CTX_SWTA>0.000000</U_CTX_SWTA>
<U_CTX_QTTD>0.000000</U_CTX_QTTD>
<U_CTX_QTYD>0.000000</U_CTX_QTYD>
<U_CTX_ALPR>0.000000</U_CTX_ALPR>
<U_CTX_ALCT>N</U_CTX_ALCT>
<U_CTX_ALTP>G</U_CTX_ALTP>
<U_CTX_E1WT>0.000000</U_CTX_E1WT>
<U_CTX_E2WT>0.000000</U_CTX_E2WT>
<U_CTX_E3WT>0.000000</U_CTX_E3WT>
<U_CTX_INKEY>B68DF161-94BC-4F76-966F-37AE14093611</U_CTX_INKEY>
<U_CantIquique>0.000000</U_CantIquique>
<U_CantSantiago>0.000000</U_CantSantiago>
<U_CantLima>0.000000</U_CantLima>
<U_Cant_Cotizada>0.000000</U_Cant_Cotizada>
</row>
</Document_Lines>
<LineTaxJurisdictions>
<row>
<JurisdictionCode>IVA</JurisdictionCode>
<JurisdictionType>1</JurisdictionType>
<TaxAmount>20549.000000</TaxAmount>
<DocEntry>247435</DocEntry>
<LineNumber>0</LineNumber>
<RowSequence>0</RowSequence>
</row>
</LineTaxJurisdictions>
<LineExpenseTaxJurisdictions>
<row>
<JurisdictionCode>IVA</JurisdictionCode>
<JurisdictionType>1</JurisdictionType>
<TaxAmount>20549.000000</TaxAmount>
<DocEntry>247435</DocEntry>
<LineNumber>0</LineNumber>
<RowSequence>0</RowSequence>
</row>
</LineExpenseTaxJurisdictions>
<DocExpenseTaxJurisdictions>
<row>
<JurisdictionCode>IVA</JurisdictionCode>
<JurisdictionType>1</JurisdictionType>
<TaxAmount>20549.000000</TaxAmount>
<DocEntry>247435</DocEntry>
<LineNumber>0</LineNumber>
<RowSequence>0</RowSequence>
</row>
</DocExpenseTaxJurisdictions>
<Document_Installments>
<row>
<DueDate>20150626</DueDate>
<Percentage>100.000000</Percentage>
<Total>128699.000000</Total>
<DunningLevel>0</DunningLevel>
<InstallmentId>1</InstallmentId>
</row>
</Document_Installments>
<TaxExtension>
<row>
<NFRef>DESPACHAR Basado en Ofertas de ventas 23004693. DESPACHAR Basado en Ofertas de ventas 23004693. Basado en Pedidos de cliente 25004326.</NFRef>
<NetWeight>0.000000</NetWeight>
<GrossWeight>0.000000</GrossWeight>
<StreetS>SAN DIEGO Nº158 SANTIAGO</StreetS>
<BuildingS/>
<CityS>SANTIAGO</CityS>
<CountyS>SANTIAGO</CountyS>
<CountryS>CL</CountryS>
<StreetB>SAN DIEGO Nº158 SANTIAGO</StreetB>
<BuildingB/>
<CityB>SANTIAGO</CityB>
<CountyB>SANTIAGO</CountyB>
<CountryB>CL</CountryB>
</row>
</TaxExtension>
<AddressExtension>
<row>
<ShipToStreet>SAN DIEGO Nº158 SANTIAGO</ShipToStreet>
<ShipToBuilding/>
<ShipToCity>SANTIAGO</ShipToCity>
<ShipToCounty>SANTIAGO</ShipToCounty>
<ShipToCountry>CL</ShipToCountry>
<BillToStreet>SAN DIEGO Nº158 SANTIAGO</BillToStreet>
<BillToBuilding/>
<BillToCity>SANTIAGO</BillToCity>
<BillToCounty>SANTIAGO</BillToCounty>
<BillToCountry>CL</BillToCountry>
</row>
</AddressExtension>
</BO>
</BOM>
Saludos
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Estimado
Todos los documentos de marketing (compra y venta) tienen la misma estructura de objeto y XML, lo único que cambia es el valor del Object, ya que debe ir el número del objeto que corresponda
23 oferta de venta
17 nota de venta
22 orden de compra
13 factura de deudores
18 factura de proveedores
etc
etc
<AdmInfo>
<Object>17</Object>
<Version>2</Version>
</AdmInfo>
Todo el resto, es la misma estructura
Saludos
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.