protected override void ProcessLineItem(BaseProductLineItem item, decimal quantity)
        {
            var returnableItem = item as ReturnableLineItem;

            var adjustmentReason = "Order Inventory";

            if (returnableItem != null)
            {
                if (returnableItem.SaleQuantity < 1) return;

                adjustmentReason = "Returnable Inventory";
                quantity = returnableItem.SaleQuantity;
            }

            var command = InitCommand(new AddInventoryAdjustmentNoteLineItemCommand());

            var available = inventoryRepository.GetBalanceForProduct(item.ProductMasterId);

            command.Actual = available - quantity;
            command.Expected = available;
            command.Reason = adjustmentReason;
            command.Description = adjustmentReason;
            command.ProductId = item.ProductMasterId;
            Commands.Add(command);
        }
        protected override void ProcessLineItem(BaseProductLineItem item, decimal quantity)
        {
            var command = InitCommand(new AddInvoiceLineItemCommand());

            command.LineItemSequenceNo = Commands.OfType<AddInvoiceLineItemCommand>().Count() + 1;
            command.ProductId = item.ProductMasterId;
            command.Qty = quantity;
            command.ValueLineItem = item.Price;
            command.LineItemVatValue = item.VatRate * item.Price;
            command.LineItemId = Guid.NewGuid();

            Commands.Add(command);
        }
 protected override void ProcessLineItem(BaseProductLineItem item, decimal quantity)
 {
     if (quantity < 1) return;
     var command = InitCommand(new AddMainOrderLineItemCommand());
     
     command.CommandId = item.Id;
     command.LineItemSequenceNo = Commands.OfType<AddMainOrderLineItemCommand>().Count() + 1;
     command.ProductId = item.ProductMasterId;
     command.Qty = quantity;
     command.ValueLineItem = item.Price;
     command.LineItemVatValue = item.VatRate * item.Price;
     command.ProductDiscount = item.ProductDiscount;
     command.LineItemType = 1;
     Commands.Add(command);
 }
        protected override void ProcessLineItem(BaseProductLineItem item, decimal quantity)
        {
            var returnableItem = item as ReturnableLineItem;
            if (returnableItem == null) return;

            var creditNoteQuantity = returnableItem.Quantity - quantity;

            if (creditNoteQuantity == 0) return;

            var command = InitCommand(new AddCreditNoteLineItemCommand());
            command.ProductId = returnableItem.ProductMasterId;
            command.Qty = creditNoteQuantity;
            command.Value = returnableItem.Price;
            command.LineItemId = returnableItem.Id;

            Commands.Add(command);
        }
        protected override void ProcessLineItem(BaseProductLineItem item, decimal quantity)
        {
            var returnableItem = item as ReturnableLineItem;

            if (returnableItem != null)
            {
                if (returnableItem.SaleQuantity < 1) return;
                quantity = returnableItem.SaleQuantity;
            }

            var command = InitCommand(new AddDispatchNoteLineItemCommand());
            command.ProductId = item.ProductMasterId;
            command.Qty = quantity;
            command.Value = item.Value;
            command.LineItemVatValue = item.VatValue;

            Commands.Add(command);
        }
 protected override void ProcessLineItem(BaseProductLineItem item, decimal quantity)
 {
     //Not used for Receipt
 }