コード例 #1
0
        /// <inheritdoc />
        public async Task UpdateOutputInvoice(OutputInvoiceEntity entity)
        {
            var currentEntity = await ReadSingleAsync <OutputInvoiceEntity>(x => x.Id == entity.Id);

            if (currentEntity == null)
            {
                throw new ArgumentNullException(nameof(currentEntity));
            }

            currentEntity.CompanyId    = entity.CompanyId;
            currentEntity.DocumentDate = entity.DocumentDate;
            currentEntity.SerialNumber = entity.SerialNumber;
            currentEntity.BasisAmountForCalculation = entity.BasisAmountForCalculation;
            currentEntity.DocumentType                  = entity.DocumentType;
            currentEntity.ExportDeliveryAmount          = entity.ExportDeliveryAmount;
            currentEntity.InvoiceAmountForOtherDelivery = entity.InvoiceAmountForOtherDelivery;
            currentEntity.InvoiceAmount                 = entity.InvoiceAmount;
            currentEntity.InvoiceNumber                 = entity.InvoiceNumber;
            currentEntity.InternalInvoiceAmount         = entity.InternalInvoiceAmount;
            currentEntity.OutputPDV   = entity.OutputPDV;
            currentEntity.OutputPDV32 = entity.OutputPDV32;
            currentEntity.OutputPDV33 = entity.OutputPDV33;
            currentEntity.OutputPDV34 = entity.OutputPDV34;
            currentEntity.BasicforCalulcationToNonRegisteredUser = entity.BasicforCalulcationToNonRegisteredUser;
            currentEntity.OutputPDVToNonRegisteredUser           = entity.OutputPDVToNonRegisteredUser;
            currentEntity.ModifiedDate = DateTime.Now;

            await Save();
        }
コード例 #2
0
        /// <inheritdoc />
        public async Task InsertOutputInvoice(OutputInvoiceEntity entity)
        {
            if (entity == null)
            {
                throw new ArgumentNullException(nameof(entity));
            }

            // Check if number of records is greated than x
            entity.CreatedDate    = DateTime.Now;
            entity.OridinalNumber = "01";

            await AddAndSaveEntitiesAsync(entity);
        }