SAPbobsCOM descuento de fila de documento SAP B1

Como estan,
Tengo esta duda, estoy usando la librería SAPbobsCOM pero necesito identificar cual es el nombre de los campos descuento de fila y descuento de documento, ya que solo tengo un descuento: DiscountPercent
No se como usarlo ya que solo me aparece 1 y necesito el descuento de fila de documento.

Descuento de Linea esta en el documents.Lines.DiscountPercent el descuento de documento es es que tienes en la imagen.

2 Me gusta

Hola @eduardo_buitr como estas, es que no entiendo muy bien como saber cual es el descuento de cabecera y de detalle si estos campos tienen el mismo nombre, en el codigo solo veo uno que es el DiscountPercent

using System;
using System.Runtime.InteropServices;

namespace SAPbobsCOM
{
    [Guid("A6DA575B-E105-4585-9F4B-50CC4044EEDD")]
    [TypeLibType(4160)]
    public interface IDocuments
    {
        [DispId(1)]
        int Add();
        [DispId(35)]
        bool GetByKey(int AbsEntry);
        [DispId(38)]
        void SaveXML(ref string FileName);
        [DispId(39)]
        int Update();
        [DispId(44)]
        int Cancel();
        [DispId(45)]
        int Close();
        [DispId(46)]
        int Remove();
        [DispId(137)]
        string GetAsXML();
        [DispId(138)]
        void SaveToFile(string FileName);
        [DispId(171)]
        int Reopen();
        [DispId(213)]
        int SaveDraftToDocument();
        [DispId(214)]
        int GetApprovalTemplates();
        [DispId(217)]
        int UpdateFromXML(string FileName);
        [DispId(232)]
        Documents CreateCancellationDocument();
        [DispId(253)]
        int HandleApprovalRequest();
        [DispId(298)]
        int ExportEWayBill();
        [DispId(299)]
        int RequestApproveCancellation();

        [DispId(2)]
        Document_Lines Lines { get; }
        [DispId(3)]
        int DocNum { get; set; }
        [DispId(4)]
        BoDocumentTypes DocType { get; set; }
        [DispId(5)]
        BoYesNoEnum HandWritten { get; set; }
        [DispId(6)]
        PrintStatusEnum Printed { get; set; }
        [DispId(7)]
        DateTime DocDate { get; set; }
        [DispId(8)]
        DateTime DocDueDate { get; set; }
        [DispId(9)]
        string CardCode { get; set; }
        [DispId(10)]
        string CardName { get; set; }
        [DispId(11)]
        string Address { get; set; }
        [DispId(12)]
        string NumAtCard { get; set; }
        [DispId(13)]
        string DocCurrency { get; set; }
        [DispId(14)]
        double DocRate { get; set; }
        [DispId(15)]
        double DocTotal { get; set; }
        [DispId(16)]
        string Reference1 { get; set; }
        [DispId(17)]
        string Reference2 { get; set; }
        [DispId(18)]
        string Comments { get; set; }
        [DispId(19)]
        string JournalMemo { get; set; }
        [DispId(20)]
        int PaymentGroupCode { get; set; }
        [DispId(21)]
        DateTime DocTime { get; set; }
        [DispId(22)]
        int SalesPersonCode { get; set; }
        [DispId(23)]
        int TransportationCode { get; set; }
        [DispId(25)]
        BoYesNoEnum Confirmed { get; set; }
        [DispId(26)]
        int ImportFileNum { get; set; }
        [DispId(27)]
        BoDocSummaryTypes SummeryType { get; set; }
        [DispId(28)]
        int ContactPersonCode { get; set; }
        [DispId(29)]
        BoYesNoEnum ShowSCN { get; set; }
        [DispId(30)]
        int Series { get; set; }
        [DispId(31)]
        DateTime TaxDate { get; set; }
        [DispId(32)]
        BoYesNoEnum PartialSupply { get; set; }
        [DispId(37)]
        UserFields UserFields { get; }
        [DispId(40)]
        BoObjectTypes DocObjectCode { get; set; }
        [DispId(41)]
        string ShipToCode { get; set; }
        [DispId(42)]
        string Indicator { get; set; }
        [DispId(43)]
        string FederalTaxID { get; set; }
        [DispId(48)]
        DataBrowser Browser { get; }
        [DispId(49)]
        double DiscountPercent { get; set; }
        [DispId(50)]
        string PaymentReference { get; set; }
        [DispId(51)]
        int DocEntry { get; }
        [DispId(52)]
        DateTime CreationDate { get; }
        [DispId(53)]
        DateTime UpdateDate { get; }
        [DispId(54)]
        int FinancialPeriod { get; }
        [DispId(55)]
        int TransNum { get; }
        [DispId(56)]
        double VatSum { get; }
        [DispId(57)]
        double VatSumSys { get; }
        [DispId(58)]
        double VatSumFc { get; }
        [DispId(59)]
        BoYesNoEnum NetProcedure { get; }
        [DispId(60)]
        double DocTotalFc { get; set; }
        [DispId(61)]
        double DocTotalSys { get; }
        [DispId(62)]
        int Form1099 { get; set; }
        [DispId(63)]
        string Box1099 { get; set; }
        [DispId(64)]
        BoYesNoEnum RevisionPo { get; set; }
        [DispId(65)]
        DateTime RequriedDate { get; set; }
        [DispId(66)]
        DateTime CancelDate { get; set; }
        [DispId(67)]
        BoYesNoEnum BlockDunning { get; set; }
        [DispId(68)]
        BoYesNoEnum Submitted { get; }
        [DispId(69)]
        int Segment { get; }
        [DispId(70)]
        BoYesNoEnum PickStatus { get; }
        [DispId(71)]
        BoYesNoEnum Pick { get; set; }
        [DispId(72)]
        string PaymentMethod { get; set; }
        [DispId(73)]
        BoYesNoEnum PaymentBlock { get; set; }
        [DispId(74)]
        int PaymentBlockEntry { get; set; }
        [DispId(75)]
        string CentralBankIndicator { get; set; }
        [DispId(76)]
        BoYesNoEnum MaximumCashDiscount { get; set; }
        [DispId(77)]
        BoYesNoEnum Reserve { get; }
        [DispId(78)]
        string Project { get; set; }
        [DispId(80)]
        DateTime ExemptionValidityDateFrom { get; set; }
        [DispId(81)]
        DateTime ExemptionValidityDateTo { get; set; }
        [DispId(82)]
        BoDocWhsUpdateTypes WareHouseUpdateType { get; set; }
        [DispId(83)]
        DocumentsAdditionalExpenses Expenses { get; }
        [DispId(84)]
        BoYesNoEnum Rounding { get; set; }
        [DispId(89)]
        string ExternalCorrectedDocNum { get; set; }
        [DispId(90)]
        int InternalCorrectedDocNum { get; set; }
        [DispId(91)]
        int NextCorrectingDocument { get; }
        [DispId(92)]
        BoYesNoEnum DeferredTax { get; set; }
        [DispId(93)]
        string TaxExemptionLetterNum { get; set; }
        [DispId(94)]
        double WTApplied { get; }
        [DispId(95)]
        double WTAppliedFC { get; }
        [DispId(96)]
        BoYesNoEnum BillOfExchangeReserved { get; }
        [DispId(97)]
        string AgentCode { get; set; }
        [DispId(98)]
        double WTAppliedSC { get; }
        [DispId(99)]
        double TotalEqualizationTax { get; }
        [DispId(100)]
        double TotalEqualizationTaxFC { get; }
        [DispId(101)]
        double TotalEqualizationTaxSC { get; }
        [DispId(102)]
        int NumberOfInstallments { get; set; }
        [DispId(103)]
        BoYesNoEnum ApplyTaxOnFirstInstallment { get; set; }
        [DispId(104)]
        double WTNonSubjectAmount { get; }
        [DispId(105)]
        double WTNonSubjectAmountSC { get; }
        [DispId(106)]
        double WTNonSubjectAmountFC { get; }
        [DispId(107)]
        double WTExemptedAmount { get; }
        [DispId(108)]
        double WTExemptedAmountSC { get; }
        [DispId(109)]
        double WTExemptedAmountFC { get; }
        [DispId(110)]
        double BaseAmountSC { get; }
        [DispId(111)]
        double BaseAmountFC { get; }
        [DispId(112)]
        double WTAmountFC { get; }
        [DispId(113)]
        double WTAmountSC { get; }
        [DispId(114)]
        double BaseAmount { get; }
        [DispId(115)]
        double WTAmount { get; }
        [DispId(116)]
        DateTime VatDate { get; set; }
        [DispId(117)]
        string ManualNumber { get; set; }
        [DispId(118)]
        BoYesNoEnum UseShpdGoodsAct { get; set; }
        [DispId(119)]
        int FolioNumber { get; set; }
        [DispId(120)]
        BoDocumentSubType DocumentSubType { get; set; }
        [DispId(121)]
        string BPChannelCode { get; set; }
        [DispId(122)]
        int BPChannelContact { get; set; }
        [DispId(123)]
        WithholdingTaxData WithholdingTaxData { get; }
        [DispId(124)]
        string DocObjectCodeEx { get; set; }
        [DispId(125)]
        string Address2 { get; set; }
        [DispId(126)]
        BoStatus DocumentStatus { get; }
        [DispId(127)]
        string PeriodIndicator { get; }
        [DispId(129)]
        string PayToCode { get; set; }
        [DispId(130)]
        int DocumentsOwner { get; set; }
        [DispId(131)]
        string FolioPrefixString { get; set; }
        [DispId(132)]
        BoYesNoEnum IsPayToBank { get; set; }
        [DispId(133)]
        string PayToBankCountry { get; set; }
        [DispId(134)]
        string PayToBankCode { get; set; }
        [DispId(135)]
        string PayToBankAccountNo { get; set; }
        [DispId(136)]
        string PayToBankBranch { get; set; }
        [DispId(139)]
        int BPL_IDAssignedToInvoice { get; set; }
        [DispId(140)]
        DateTime ClosingDate { get; set; }
        [DispId(141)]
        int SequenceSerial { get; set; }
        [DispId(142)]
        int SequenceCode { get; set; }
        [DispId(143)]
        string SeriesString { get; set; }
        [DispId(144)]
        string SubSeriesString { get; set; }
        [DispId(145)]
        string SequenceModel { get; set; }
        [DispId(146)]
        TaxExtension TaxExtension { get; }
        [DispId(147)]
        double DownPayment { get; set; }
        [DispId(148)]
        BoYesNoEnum ReserveInvoice { get; set; }
        [DispId(149)]
        int LanguageCode { get; set; }
        [DispId(150)]
        string TrackingNumber { get; set; }
        [DispId(151)]
        string PickRemark { get; set; }
        [DispId(152)]
        BoYesNoEnum UseCorrectionVATGroup { get; set; }
        [DispId(153)]
        double TotalDiscount { get; }
        [DispId(154)]
        double VatPercent { get; set; }
        [DispId(155)]
        DocumentPackages Packages { get; }
        [DispId(156)]
        Document_Installments Installments { get; }
        [DispId(157)]
        Document_SpecialLines SpecialLines { get; }
        [DispId(158)]
        double DownPaymentAmount { get; set; }
        [DispId(159)]
        double DownPaymentPercentage { get; set; }
        [DispId(160)]
        DownPaymentTypeEnum DownPaymentType { get; set; }
        [DispId(161)]
        DownPaymentsToDraw DownPaymentsToDraw { get; }
        [DispId(162)]
        double DownPaymentAmountFC { get; set; }
        [DispId(163)]
        double DownPaymentAmountSC { get; set; }
        [DispId(164)]
        string OpeningRemarks { get; set; }
        [DispId(165)]
        string ClosingRemarks { get; set; }
        [DispId(166)]
        double RoundingDiffAmount { get; set; }
        [DispId(167)]
        double RoundingDiffAmountFC { get; }
        [DispId(168)]
        double RoundingDiffAmountSC { get; }
        [DispId(169)]
        BoYesNoEnum Cancelled { get; }
        [DispId(170)]
        BoYesNoEnum InsuranceOperation347 { get; set; }
        [DispId(172)]
        double ServiceGrossProfitPercent { get; set; }
        [DispId(173)]
        AddressExtension AddressExtension { get; }
        [DispId(174)]
        string ControlAccount { get; set; }
        [DispId(175)]
        BoYesNoEnum ArchiveNonremovableSalesQuotation { get; set; }
        [DispId(176)]
        int GTSChecker { get; set; }
        [DispId(177)]
        int GTSPayee { get; set; }
        [DispId(178)]
        int ExtraMonth { get; set; }
        [DispId(179)]
        int ExtraDays { get; set; }
        [DispId(180)]
        int CashDiscountDateOffset { get; set; }
        [DispId(181)]
        BoPayTermDueTypes StartFrom { get; set; }
        [DispId(182)]
        BoYesNoEnum NTSApproved { get; set; }
        [DispId(183)]
        int ETaxWebSite { get; set; }
        [DispId(184)]
        string ETaxNumber { get; set; }
        [DispId(185)]
        string NTSApprovedNumber { get; set; }
        [DispId(186)]
        string SignatureInputMessage { get; }
        [DispId(187)]
        string SignatureDigest { get; }
        [DispId(188)]
        string CertificationNumber { get; }
        [DispId(189)]
        int PrivateKeyVersion { get; }
        [DispId(190)]
        int GroupSeries { get; set; }
        [DispId(191)]
        int GroupNumber { get; set; }
        [DispId(192)]
        BoYesNoEnum GroupHandWritten { get; set; }
        [DispId(193)]
        BoYesNoEnum ReopenOriginalDocument { get; set; }
        [DispId(194)]
        BoYesNoEnum ReopenManuallyClosedOrCanceledDocument { get; set; }
        [DispId(195)]
        EDocGenerationTypeEnum EDocGenerationType { get; set; }
        [DispId(196)]
        int EDocSeries { get; set; }
        [DispId(197)]
        string EDocNum { get; set; }
        [DispId(198)]
        int EDocExportFormat { get; set; }
        [DispId(199)]
        BoSoStatus DownPaymentStatus { get; set; }
        [DispId(200)]
        BoYesNoEnum CreateOnlineQuotation { get; set; }
        [DispId(201)]
        string POSEquipmentNumber { get; set; }
        [DispId(202)]
        string POSManufacturerSerialNumber { get; set; }
        [DispId(203)]
        int POSCashierNumber { get; set; }
        [DispId(204)]
        BoYesNoEnum ApplyCurrentVATRatesForDownPaymentsToDraw { get; set; }
        [DispId(210)]
        ClosingOptionEnum ClosingOption { get; set; }
        [DispId(211)]
        DateTime SpecifiedClosingDate { get; set; }
        [DispId(212)]
        BoYesNoEnum OpenForLandedCosts { get; set; }
        [DispId(215)]
        Document_ApprovalRequests Document_ApprovalRequests { get; }
        [DispId(216)]
        DocumentAuthorizationStatusEnum AuthorizationStatus { get; }
        [DispId(218)]
        double TotalDiscountFC { get; }
        [DispId(219)]
        double TotalDiscountSC { get; }
        [DispId(220)]
        BoYesNoEnum RelevantToGTS { get; set; }
        [DispId(221)]
        EDocStatusEnum EDocStatus { get; set; }
        [DispId(222)]
        string EDocErrorCode { get; set; }
        [DispId(223)]
        string EDocErrorMessage { get; set; }
        [DispId(224)]
        string BPLName { get; }
        [DispId(225)]
        string VATRegNum { get; }
        [DispId(226)]
        int AnnualInvoiceDeclarationReference { get; set; }
        [DispId(227)]
        string Supplier { get; set; }
        [DispId(228)]
        int Releaser { get; set; }
        [DispId(229)]
        int Receiver { get; set; }
        [DispId(230)]
        int BlanketAgreementNumber { get; set; }
        [DispId(231)]
        BoYesNoEnum IsAlteration { get; set; }
        [DispId(233)]
        DateTime AssetValueDate { get; set; }
        [DispId(234)]
        string Requester { get; set; }
        [DispId(235)]
        string RequesterName { get; set; }
        [DispId(236)]
        int RequesterBranch { get; set; }
        [DispId(237)]
        int RequesterDepartment { get; set; }
        [DispId(238)]
        string RequesterEmail { get; set; }
        [DispId(239)]
        BoYesNoEnum SendNotification { get; set; }
        [DispId(240)]
        int AttachmentEntry { get; set; }
        [DispId(241)]
        int ReqType { get; set; }
        [DispId(242)]
        CancelStatusEnum CancelStatus { get; }
        [DispId(243)]
        DocumentDeliveryTypeEnum DocumentDelivery { get; set; }
        [DispId(244)]
        BoYesNoEnum ReuseDocumentNum { get; set; }
        [DispId(245)]
        BoYesNoEnum ReuseNotaFiscalNum { get; set; }
        [DispId(246)]
        string AuthorizationCode { get; set; }
        [DispId(247)]
        DateTime StartDeliveryDate { get; set; }
        [DispId(248)]
        DateTime StartDeliveryTime { get; set; }
        [DispId(249)]
        DateTime EndDeliveryDate { get; set; }
        [DispId(250)]
        DateTime EndDeliveryTime { get; set; }
        [DispId(251)]
        string VehiclePlate { get; set; }
        [DispId(252)]
        string ATDocumentType { get; set; }
        [DispId(254)]
        ElecCommStatusEnum ElecCommStatus { get; set; }
        [DispId(255)]
        string ElecCommMessage { get; }
        [DispId(256)]
        BoYesNoEnum PrintSEPADirect { get; set; }
        [DispId(257)]
        string FiscalDocNum { get; set; }
        [DispId(258)]
        int POSDailySummaryNo { get; set; }
        [DispId(259)]
        int POSReceiptNo { get; set; }
        [DispId(260)]
        string PointOfIssueCode { get; set; }
        [DispId(261)]
        FolioLetterEnum Letter { get; set; }
        [DispId(262)]
        int FolioNumberFrom { get; set; }
        [DispId(263)]
        int FolioNumberTo { get; set; }
        [DispId(264)]
        BoInterimDocTypes InterimType { get; set; }
        [DispId(265)]
        int RelatedType { get; set; }
        [DispId(266)]
        int RelatedEntry { get; set; }
        [DispId(267)]
        WithholdingTaxDataWTX WithholdingTaxDataWTX { get; }
        [DispId(268)]
        string DocumentTaxID { get; set; }
        [DispId(269)]
        DateTime DateOfReportingControlStatementVAT { get; set; }
        [DispId(270)]
        string ReportingSectionControlStatementVAT { get; set; }
        [DispId(271)]
        BoYesNoEnum ExcludeFromTaxReportControlStatementVAT { get; set; }
        [DispId(272)]
        int POS_CashRegister { get; set; }
        [DispId(273)]
        DateTime UpdateTime { get; }
        [DispId(274)]
        string DownPaymentTrasactionID { get; set; }
        [DispId(275)]
        GSTTransactionTypeEnum GSTTransactionType { get; set; }
        [DispId(276)]
        BoYesNoEnum Revision { get; set; }
        [DispId(277)]
        string OriginalRefNo { get; set; }
        [DispId(278)]
        DateTime OriginalRefDate { get; set; }
        [DispId(279)]
        string OriginalCreditOrDebitNo { get; set; }
        [DispId(280)]
        DateTime OriginalCreditOrDebitDate { get; set; }
        [DispId(281)]
        string ECommerceOperator { get; set; }
        [DispId(282)]
        string ECommerceGSTIN { get; set; }
        [DispId(283)]
        string TaxInvoiceNo { get; set; }
        [DispId(284)]
        DateTime TaxInvoiceDate { get; set; }
        [DispId(285)]
        string ShipFrom { get; set; }
        [DispId(287)]
        BoYesNoEnum UseBillToAddrToDetermineTax { get; set; }
        [DispId(288)]
        PriceModeDocumentEnum PriceMode { get; set; }
        [DispId(289)]
        CommissionTradeTypeEnum CommissionTrade { get; set; }
        [DispId(290)]
        BoYesNoEnum CommissionTradeReturn { get; set; }
        [DispId(291)]
        int IssuingReason { get; set; }
        [DispId(292)]
        int SOIWizardId { get; }
        [DispId(293)]
        ElectronicProtocols ElectronicProtocols { get; }
        [DispId(294)]
        Document_EWayBillDetails EWayBillDetails { get; }
        [DispId(295)]
        string SAPPassport { get; }
        [DispId(296)]
        int Cig { get; set; }
        [DispId(297)]
        int Cup { get; set; }
        [DispId(300)]
        EDocTypeEnum EDocType { get; set; }
        [DispId(301)]
        Document_DocumentReferences DocumentReferences { get; }
        [DispId(302)]
        double PaidToDate { get; }
        [DispId(303)]
        double PaidToDateFC { get; }
        [DispId(304)]
        double PaidToDateSys { get; }
    }
}

Aunque tengan los mismos nombres, están el lugares diferentes del objeto

Descuento de cabecera está en
objecto Documents, propiedad DiscountPercent = Documents.DiscountPercent = 10;

Descuento de linea, está en un child object del Documents
objecto Documents, chilld object Lines, propiedad DiscountPercent = Documents.Lines.DiscountPercent

Todos los campos de cabecera del documento pertenecen al objecto Documents que corresponde a la tabla OINV en caso de ventas, por ejemplo
Todos los campos de las lineas del documento pertececen al child object Lines que corresponde al la tabla INV1 en caso de ventas, por ejemplo.

Atte.

2 Me gusta

Más masticado no pudo haber…esperemos le sirva de mucho.

saludos

1 me gusta

Mil gracias por la aclaración @felipe.loyola la verdad si estaba un poco confundido, buen dia.

Este tema se cerró automáticamente 7 días después de la última publicación. No se permiten nuevas respuestas.