Пример #1
0
        public string PrintKitchenStockReport(List <InventoryStockReport> aReports)
        {
            string strBody = "";
            StringPrintFormater stringPrintFormater = new StringPrintFormater(172);
            VariousMethod       aMethod             = new VariousMethod();
            string header = aMethod.GetPrintDecorationText(VariousMethod.PrintDecoration.HEADER);

            strBody += header;
            //   strBody += "\r\n";

            strBody += "\r\n" + stringPrintFormater.CenterTextWithWhiteSpace("Kitchen Stock Report");
            // strBody += "\r\n";
            double totalRawCost = aReports.Sum(a => a.Price);

            strBody += "\r\n" + "Total Raw Costing= " + totalRawCost.ToString("F02");
            double balanceAmount = aReports.Sum(a => a.UnitPrice * a.BalanceQty);

            strBody += "\r\n" + stringPrintFormater.ItemLabeledText("Total Balance Price: " + balanceAmount, "");

            strBody += "\r\n";
            strBody += "\r\n" + stringPrintFormater.CreateDashedLine();

            strBody += "\r\n" + stringPrintFormater.GridCell("Date", 30, false);
            strBody += stringPrintFormater.GridCell("Item Name", 50, false);
            strBody += stringPrintFormater.GridCell("Received Qty.", 17, false);
            strBody += stringPrintFormater.GridCell("Send Qty.", 17, false); // Its should be active when Professional Package is active
            strBody += stringPrintFormater.GridCell("Damage Qty.", 17, false);
            strBody += stringPrintFormater.GridCell("Sale Qty.", 17, false);
            strBody += stringPrintFormater.GridCell("Balance Qty.", 17, false);
            strBody += stringPrintFormater.GridCell("Raw M.P.", 17, false); //// Its should be active when Professional Package is active
            // strBody += stringPrintFormater.GridCell("Advance Amount", 19, false);

            strBody += "\r\n" + stringPrintFormater.CreateDashedLine();

            foreach (InventoryStockReport report in aReports)
            {
                strBody += "\r\n" + stringPrintFormater.GridCell(report.Date.ToString(), 30, false);
                strBody += stringPrintFormater.GridCell(report.ItemName, 50, false);
                strBody += stringPrintFormater.GridCell(report.ReceivedQty.ToString("F02"), 17, false);
                strBody += stringPrintFormater.GridCell(report.SendQty.ToString("F02"), 17, false);  // Its should be active when Professional Package is active
                strBody += stringPrintFormater.GridCell(report.DamageQty.ToString("F02"), 17, false);
                strBody += stringPrintFormater.GridCell(report.SaleQty.ToString("F02"), 17, false);
                strBody += stringPrintFormater.GridCell(report.BalanceQty.ToString("F02"), 17, false);
                strBody += stringPrintFormater.GridCell(report.Price.ToString("F02"), 17, false); // Its should be active when Professional Package is active
                // strBody += stringPrintFormater.GridCell(report.AdvanceAmount.ToString(), 19, false);
                strBody += "\r\n" + stringPrintFormater.CreateDashedLine();
            }


            strBody += aMethod.AddEndPart();


            return(strBody);
        }
Пример #2
0
        public string PrintPurchaseReport(List <InventoryReport> aReports)
        {
            string strBody = "";
            StringPrintFormater stringPrintFormater = new StringPrintFormater(172);
            VariousMethod       aMethod             = new VariousMethod();
            string header = aMethod.GetPrintDecorationText(VariousMethod.PrintDecoration.HEADER);

            strBody += header;
            //   strBody += "\r\n";
            double totalPrice = aReports.Sum(a => a.TotalAmount);

            strBody += "\r\n" + stringPrintFormater.ItemLabeledText("Total Purchase Price: " + totalPrice, "");
            strBody += "\r\n" + stringPrintFormater.CenterTextWithWhiteSpace("Inventory Purchase Report");
            // strBody += "\r\n";
            strBody += "\r\n";
            strBody += "\r\n" + stringPrintFormater.CreateDashedLine();

            strBody += "\r\n" + stringPrintFormater.GridCell("Date", 23, false);
            strBody += stringPrintFormater.GridCell("Item Name", 35, false);
            strBody += stringPrintFormater.GridCell("Supplier Name", 35, false);
            strBody += stringPrintFormater.GridCell("Quantity", 17, false);
            strBody += stringPrintFormater.GridCell("Unit", 10, false);
            strBody += stringPrintFormater.GridCell("Total Amount", 17, false);
            strBody += stringPrintFormater.GridCell("Paid Amount", 17, false);
            strBody += stringPrintFormater.GridCell("Payment Type", 21, false);


            strBody += "\r\n" + stringPrintFormater.CreateDashedLine();

            foreach (InventoryReport report in aReports)
            {
                strBody += "\r\n" + stringPrintFormater.GridCell(report.Date.ToString(), 23, false);
                strBody += stringPrintFormater.GridCell(report.ItemName, 35, false);
                strBody += stringPrintFormater.GridCell(report.SupplierName, 35, false);
                strBody += stringPrintFormater.GridCell(report.Quantity.ToString("F02"), 17, false);
                strBody += stringPrintFormater.GridCell(report.Unit, 10, false);
                strBody += stringPrintFormater.GridCell(report.TotalAmount.ToString("F02"), 17, false);
                strBody += stringPrintFormater.GridCell(report.PaidAmount.ToString("F02"), 17, false);
                strBody += stringPrintFormater.GridCell(report.PaymentType, 21, false);
                // strBody += stringPrintFormater.GridCell(report.DamageReport, 17, false);
                // strBody += stringPrintFormater.GridCell(report.AdvanceAmount.ToString(), 19, false);
                strBody += "\r\n" + stringPrintFormater.CreateDashedLine();
            }


            strBody += aMethod.AddEndPart();


            return(strBody);
        }