コード例 #1
0
 public PixGeneralLedgerInventoryTransaction(ManhattanPerpetualInventoryTransfer pix,
                                             IList <GeneralLedgerTransactionReasonCodeMap> generalLedgerTransactionReasonCodeMap,
                                             IConfigurationManager configurationManager) : base(configurationManager)
 {
     _pix = pix;
     _generalLedgerTransactionReasonCodeMap = generalLedgerTransactionReasonCodeMap;
 }
コード例 #2
0
 private void MarkPixAsProcessed(ManhattanPerpetualInventoryTransfer manhattanPerpetualInventoryTransfer)
 {
     _databaseRepository.InsertPixGeneralLedgerProcessing(new PixGeneralLedgerProcessing
     {
         ManhattanPerpetualInventoryTransferId = manhattanPerpetualInventoryTransfer.ManhattanPerpetualInventoryTransferId,
         ProcessedDate = DateTime.Now
     });
 }
コード例 #3
0
        public PixInventoryAdjustment(ManhattanPerpetualInventoryTransfer perpetualInventoryTransfer)
        {
            if (perpetualInventoryTransfer.TransactionType != TransactionType.InventoryAdjustment)
            {
                throw new ArgumentException(perpetualInventoryTransfer.TransactionType + " is not a valid pix type");
            }

            _perpetualInventoryTransfer = perpetualInventoryTransfer;
        }
コード例 #4
0
ファイル: PixReturn.cs プロジェクト: ewin66/WmMiddleware
        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;
        }
コード例 #5
0
        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);
        }
コード例 #6
0
        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);
        }
コード例 #7
0
        private int GetQuantity(ManhattanPerpetualInventoryTransfer r)
        {
            var modifier = r.InventoryAdjustmntType == "S" ? -1 : 1;

            return((int)r.InventoryAdjustmentQuantity * modifier);
        }
コード例 #8
0
 public PurchaseOrderGeneralLedger(ManhattanPerpetualInventoryTransfer pix)
 {
     _pix = pix;
 }