Ejemplo n.º 1
0
 private void lbactamount_Click(object sender, EventArgs e)
 {
     decimal d = new InputQty().GetInputValue();
     if (d != 0)
     {
         lbactamount.Text = d.ToString("0.00");
         lbbackamount.Text = GetBackAmount();
     }
 }
Ejemplo n.º 2
0
        private void btnBack_Click(object sender, EventArgs e)
        {
            //退货,输入单据号
            if (selllist != null)
            {
                GlobalFun.MessageBoxError("还有单据未处理,不能进行退货操作");
                return;
            }

            InputQty iq = new InputQty();
            iq.Text = "请输入单据号";
            string billno = iq.GetInputValue().ToString();
            if (!string.IsNullOrEmpty(billno))
            {
                DALShopSellList dalshopselllist = new DALShopSellList();
                //查询这张单据!
                Shop_SellList ssl = dalshopselllist.GetByBillNO(billno);
                if (ssl == null)
                {
                    GlobalFun.MessageBoxError("找不到这张单据");
                    return;
                }
                if (ssl.BackFlag)
                {
                    GlobalFun.MessageBoxError("退货单,不能退货!");
                    return;
                }
                if (dalshopselllist.GetBackBillByNo(ssl.BillNO) != null)
                {
                    GlobalFun.MessageBoxError("已经退货的单据,不能重复退货");
                    return;
                }
                if (ssl.Duty.Shop.ShopID != GlobalValue.GShop.ShopID)
                {
                    GlobalFun.MessageBoxError("不是本门店的单据,不能退货");
                    return;
                }

                CreateBill();
                selllist.BackBillNo = ssl.BillNO;
                foreach (Shop_SellDetail ssd in ssl.Details)
                {
                    Shop_SellDetail sdnew = new Shop_SellDetail();

                    sdnew.Amount = -ssd.Amount;
                    sdnew.Price = ssd.Price;
                    sdnew.Pro = ssd.Pro;
                    selllist.Details.Add(sdnew);
                }

                ShowSellDetailByPageNo(true);
                //不允许增加产品!不允许修改数量!!!
                btnProSelect.Enabled = false;

            }
        }