Esempio n. 1
0
        private decimal PhiIn()
        {
            if (this.ToChayDigi == null || this.SoTrangA4 <= 0)
            {
                return(0);
            }
            //--qua
            decimal result = 0;

            /*
             * var BHR = this.ToChayDigi.BHR;
             * var tocDo = this.ToChayDigi.TocDo; //Tờ trên giờ
             * var click4M = this.ToChayDigi.ClickA4BonMau;//PHí trang A4
             * var click6M = this.ToChayDigi.ClickA4SauMau;
             * var click1M = this.ToChayDigi.ClickA4MotMau;
             * decimal phiSetup = (decimal)this.ToChayDigi.ThoiGianSanSang * BHR; //Lấy giờ
             * var phiGiaySanSang = this.ToChayDigi.PhiPhePhamSanSang;
             *
             *
             * var thoiGianChay = (decimal)this.SoTrangA4 / tocDo;
             * var phiChay =  thoiGianChay * BHR;
             * //Phí mực theo click của từng tờ in
             * decimal phiMuc = 0;
             */
            switch (this.MauInChon)
            {
            case MauInS.BonMau:
                duLieuTinhGia.ClickTrangA4 = this.ToChayDigi.ClickA4BonMau * this.SoTrangA4;
                break;

            case MauInS.MotMau:
                duLieuTinhGia.ClickTrangA4 = this.ToChayDigi.ClickA4MotMau * this.SoTrangA4;
                break;

            case MauInS.SauMau:
                duLieuTinhGia.ClickTrangA4 = this.ToChayDigi.ClickA4SauMau * this.SoTrangA4;
                break;
            }

            result = new GiaInNhanhTheoMay(this.duLieuTinhGia, this.SoTrangA4, this.TyLeMarkUp).ChiPhi(this.SoTrangA4);

            return(result);
        }
Esempio n. 2
0
        public decimal GiaBan()
        {
            if (this.BangGiaInNhanh == null || this.IdToInDiGi <= 0)
            {
                return(0);
            }
            //Tiếp
            decimal kq = 0;

            var gioiHanSoTrangTheoBangGia = this.SoTrangToiDaTheoBang;

            if (gioiHanSoTrangTheoBangGia > 0 && this.SoLuongA4 > gioiHanSoTrangTheoBangGia)
            {
                kq = new GiaInNhanhTheoMay(duLieuInDigi, this.SoLuongA4, this.TyLeMarkUpSales).ThanhTienSales();
            }
            else
            {
                kq = new GiaInNhanhNiemYet(this.SoLuongA4, this.BangGiaInNhanh).ThanhTienSales();
            }

            return(Math.Round(kq));
        }