public PixGeneralLedgerInventoryTransaction(ManhattanPerpetualInventoryTransfer pix, IList <GeneralLedgerTransactionReasonCodeMap> generalLedgerTransactionReasonCodeMap, IConfigurationManager configurationManager) : base(configurationManager) { _pix = pix; _generalLedgerTransactionReasonCodeMap = generalLedgerTransactionReasonCodeMap; }
private void MarkPixAsProcessed(ManhattanPerpetualInventoryTransfer manhattanPerpetualInventoryTransfer) { _databaseRepository.InsertPixGeneralLedgerProcessing(new PixGeneralLedgerProcessing { ManhattanPerpetualInventoryTransferId = manhattanPerpetualInventoryTransfer.ManhattanPerpetualInventoryTransferId, ProcessedDate = DateTime.Now }); }
public PixInventoryAdjustment(ManhattanPerpetualInventoryTransfer perpetualInventoryTransfer) { if (perpetualInventoryTransfer.TransactionType != TransactionType.InventoryAdjustment) { throw new ArgumentException(perpetualInventoryTransfer.TransactionType + " is not a valid pix type"); } _perpetualInventoryTransfer = perpetualInventoryTransfer; }
public PixReturn(ManhattanPerpetualInventoryTransfer perpetualInventoryTransfer) { if (perpetualInventoryTransfer.TransactionCode != TransactionCode.Return) { throw new ArgumentException(perpetualInventoryTransfer.TransactionCode + " is not a valid pix return code"); } if (perpetualInventoryTransfer.TransactionType != TransactionType.QuantityAdjust) { throw new ArgumentException(perpetualInventoryTransfer.TransactionType + " is not a valid pix return type"); } _perpetualInventoryTransfer = perpetualInventoryTransfer; }
private void WriteGeneralLedger(ManhattanPerpetualInventoryTransfer pix) { var glTransactionReasonMap = _databaseRepository.GetGeneralLedgerTransactionReasonCodeMap(); var glInterface = new PixGeneralLedgerInventoryTransaction(pix, glTransactionReasonMap, _configurationManager); if (glInterface.GeneralLedgerAccount == null) { _log.Warning("No GL mapping found for pix id " + pix.ManhattanPerpetualInventoryTransferId + ". Transaction marked as processed."); } else { _databaseRepository.InsertIntegrationInventoryAdjustment(new DatabaseIntegrationsInventoryAdjustment(glInterface)); } MarkPixAsProcessed(pix); }
private void ProcessPurchaseOrderDetailLineItem(ManhattanPerpetualInventoryTransfer pix, int detailId) { var purchaseOrderGl = new PurchaseOrderGeneralLedger(pix); var databasePurchaseOrderReceiptDetailLineItem = new DatabasePurchaseOrderReceiptDetailLineItem { PoReceiptDetailId = detailId, LineNumber = purchaseOrderGl.LineItemNumber.ToString(CultureInfo.InvariantCulture), Upc = purchaseOrderGl.Sku, Uom = purchaseOrderGl.UnitOfMeasure, QuantityInvoiced = purchaseOrderGl.NumberUnitsShipped.ToString(CultureInfo.InvariantCulture), DateAdded = DateTime.Now }; _databaseRepository.InsertDatabasePurchaseOrderReceiptDetailLineItem(databasePurchaseOrderReceiptDetailLineItem); MarkPixAsProcessed(pix); }
private int GetQuantity(ManhattanPerpetualInventoryTransfer r) { var modifier = r.InventoryAdjustmntType == "S" ? -1 : 1; return((int)r.InventoryAdjustmentQuantity * modifier); }
public PurchaseOrderGeneralLedger(ManhattanPerpetualInventoryTransfer pix) { _pix = pix; }