示例#1
0
        // FiscalDocumentType -> TipoDeComprobante
        static int FDT2TDC(FiscalDocumentType type)
        {
            switch (type)
            {
            case FiscalDocumentType.Invoice:
            case FiscalDocumentType.FeeReceipt:
            case FiscalDocumentType.RentReceipt:
            case FiscalDocumentType.DebitNote:
                return((int)c_TipoDeComprobante.Ingreso);

            case FiscalDocumentType.CreditNote:
            case FiscalDocumentType.AdvancePaymentsApplied:
                return((int)c_TipoDeComprobante.Egreso);

            case FiscalDocumentType.PaymentReceipt:
                return((int)c_TipoDeComprobante.Pago);
            }

            throw new ArgumentOutOfRangeException(nameof(type));
        }
示例#2
0
        // FiscalDocumentType -> TipoDeComprobante
        static int FDT2TDC(FiscalDocumentType type)
        {
            switch (type) {
            case FiscalDocumentType.Invoice:
            case FiscalDocumentType.FeeReceipt:
            case FiscalDocumentType.RentReceipt:
            case FiscalDocumentType.DebitNote:
                return (int)Mictlanix.CFDv32.ComprobanteTipoDeComprobante.ingreso;
            case FiscalDocumentType.CreditNote:
                return (int)Mictlanix.CFDv32.ComprobanteTipoDeComprobante.egreso;
            }

            throw new ArgumentOutOfRangeException ("type");
        }