Ejemplo n.º 1
0
        public static void CreateDebt(Po po, IUnitOfWork uow)
        {
            //create delivery.
            Delivery delivery = new Delivery();

            delivery.SetCreate();
            delivery.POCode    = po.PoCode;
            delivery.CompanyId = po.CompanyId;
            //create debt
            Debt debt = new Debt();

            debt.POCode = po.PoCode;
            debt.SetCreate();
            delivery.DeliveryCode = uow.DeliveryRepository.CreateCode(po.Company, DateTime.Today);
            uow.DeliveryRepository.Add(delivery);
            if (po.CreateDebt == true)
            {
                debt.DeliveryCode = delivery.DeliveryCode;
                uow.DebtRepository.Add(debt);
            }
            Quotation quotation = new Quotation();

            quotation.ApproveStatusId = (int)ApproveStatus.Approved;
            quotation.QuotationCode   = po.QuotationCode;
            uow.QuotationRepository.Lock(quotation);
            uow.PlanningRepository.CreateFromPO(po);
        }
Ejemplo n.º 2
0
 public Payment()
 {
     Po            = new Po();
     Company       = new Company();
     Staff         = new Staff();
     PaymentMethod = new PaymentMethod();
     Bank          = new Bank();
 }
Ejemplo n.º 3
0
 public Po(Po po)
 {
     PoId            = Guid.Empty;
     PoCode          = string.Empty;
     PoName          = po.PoName;
     CompanyId       = po.CompanyId;
     Company         = po.Company;
     CreateDebt      = po.CreateDebt;
     ApproveStatusId = (int)Utility.ApproveStatus.Wait;
     QuotationCode   = po.QuotationCode;
     Quotation       = po.Quotation;
     TakePlace       = po.TakePlace;
     Note            = po.Note;
     ApproveDate     = null;
     ApproveBy       = string.Empty;
     Quantity        = po.Quantity;
     TotalValue      = po.TotalValue;
     CreateDate      = DateTime.Now;
     CreateBy        = Utility.UserManagement.UserSession.UserName;
 }
Ejemplo n.º 4
0
 public Debt()
 {
     Company = new Company();
     Po      = new Po();
 }