Esempio n. 1
0
        private void MineralWaterTransaction(ACMSDAL.ConnectionProvider connProvider, ACMSLogic.POS pos)
        {
            if (pos.NCategoryID == 21 && pos.ReceiptItemsTable.Rows.Count > 0)
            {
                string strProductCode = pos.ReceiptItemsTable.Rows[0]["strCode"].ToString();
                int qtyToDeduct = ACMS.Convert.ToInt32(pos.ReceiptItemsTable.Rows[0]["MineralWaterQty"]);

                TblProductInventory producInv = new TblProductInventory();

                producInv.MainConnectionProvider = connProvider;

                producInv.IncreaseQuantity(strProductCode, pos.StrBranchCode, -qtyToDeduct);
            }
        }
Esempio n. 2
0
        private void PostToStock(ACMSDAL.ConnectionProvider connProvider, DataTable TblQty, ACMSLogic.POS pos)
        {
            TblProductInventory proInven = new TblProductInventory();
                proInven.MainConnectionProvider = connProvider;
            //SelectedGridItemChangedEventArgs();

                // deduct stock
                foreach (DataRow r in TblQty.Rows)
                {
                    if (r["strCode"].ToString().ToUpper() != "REG")
                    {
                        int nQuantity = ACMS.Convert.ToInt32(r["nQuantity"]);
                        proInven.IncreaseQuantity(r["strCode"].ToString(), pos.StrBranchCode, -nQuantity);
                    }
                }
        }
Esempio n. 3
0
        private void ActionTakeWhenVoidReceiptForCategory_11_12(string strReceiptNo, ConnectionProvider connProvider)
        {
            //string cmdText = "Select sum (nQuantity) as Qty, strCode From tblReceiptEntries where strReceiptNo = @strReceiptNo group by strReceiptNo, strCode";
            TblReceiptEntries receiptEntries = new TblReceiptEntries();
            receiptEntries.MainConnectionProvider = connProvider;
            DataTable table = receiptEntries.GetQty_StrCodeBaseStrReceiptNo(strReceiptNo);

            if (table.Rows.Count > 0)
            {
                TblProductInventory productInven = new TblProductInventory();
                productInven.MainConnectionProvider = connProvider;

                foreach (DataRow r in table.Rows)
                {
                    if (CheckIsRegistrationRow(r)) return;

                    if (r["strCode"].ToString().Length > 0)
                    {
                        string strCode = r["strCode"].ToString();
                        int totalQtyToAddup = ACMS.Convert.ToInt32(r["Qty"]);
                        productInven.IncreaseQuantity(strCode, User.BranchCode, totalQtyToAddup);
                    }
                }
            }
        }