protected void SubTotal(decimal t1, decimal t2, decimal t3, decimal t4, decimal t5 , decimal t6) { TableRow r = new TableRow(); TableCell c; c = Rpt.Foot(); c.Text = "<strong>GRAND TOTAL</strong>"; c.ColumnSpan = 9; c.HorizontalAlign = HorizontalAlign.Left; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(Math.Round(t6, 2)); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = " "; c.ColumnSpan = 2; c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t1); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(Math.Round(t2, 0)); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t3); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t4); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t5); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); rpt.Rows.Add(r); }
private void SubTotal(string txt, decimal total, decimal t2, decimal t1, decimal t3, decimal t4, decimal t5, decimal t6) { TableRow r = new TableRow(); TableCell c; c = Rpt.Foot(); c.Text = txt; c.ColumnSpan = 6; c.HorizontalAlign = HorizontalAlign.Left; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(total); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t1); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t3); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t4); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(Math.Round(t2 - t4)); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t5); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t6); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); rpt.Rows.Add(r); }
private void SubTotal(decimal decTotalKontrak, decimal decTotalPriceList, decimal decTotalNilaiKontrak, decimal decTotalDiskon, decimal decTotalBayar, DateTime TglKontrak) { TableRow r = new TableRow(); TableCell c; c = Rpt.Foot(); c.Text = "SUBTOTAL UNIT PENJUALAN " + Cf.Day(TglKontrak); c.ColumnSpan = 3; c.HorizontalAlign = HorizontalAlign.Center; r.Cells.Add(c); c = Rpt.Foot(); c.Text = decTotalKontrak.ToString(); c.HorizontalAlign = HorizontalAlign.Center; r.Cells.Add(c); c = Rpt.Foot(); c.Text = "SUBTOTAL PENJUALAN " + Cf.Day(TglKontrak); c.ColumnSpan = 4; c.HorizontalAlign = HorizontalAlign.Center; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(decTotalPriceList); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(decTotalNilaiKontrak); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(decTotalDiskon); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(decTotalBayar); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = " "; r.Cells.Add(c); rpt.Rows.Add(r); }
private void SubTotal(string txt, decimal t1, decimal t2, decimal t3, decimal t4, decimal t5, decimal t6, decimal t7) { TableRow r = new TableRow(); TableCell c; c = Rpt.Foot(); c.Text = txt; c.HorizontalAlign = HorizontalAlign.Left; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t1) + " UNIT"; c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t2); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t3); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t4); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t5); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t6); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t7); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); rpt.Rows.Add(r); }
protected void SubTotal(decimal t) { TableRow r = new TableRow(); TableCell c; c = Rpt.Foot(); c.Text = "<strong>TOTAL</strong>"; c.HorizontalAlign = HorizontalAlign.Left; r.Cells.Add(c); c = Rpt.Foot(); c.Text = "<strong>" + Cf.Num(t) + "</strong>"; c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); rpt.Rows.Add(r); }
private void SubTotal(decimal GrandTotal) { TableRow r = new TableRow(); TableCell c; c = Rpt.Foot(); c.Text = "Grand Total"; c.HorizontalAlign = HorizontalAlign.Left; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(GrandTotal); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); rpt.Rows.Add(r); }
private void SubTotal(string txt, decimal t1) { TableRow r = new TableRow(); TableCell c; c = Rpt.Foot(); c.Text = txt; c.ColumnSpan = 12; c.HorizontalAlign = HorizontalAlign.Left; r.Cells.Add(c); //c = Rpt.Foot(); //c.Text = Cf.Num(t1); //c.HorizontalAlign = HorizontalAlign.Right; //r.Cells.Add(c); rpt.Rows.Add(r); }
private void SubTotal(decimal t1, decimal t2, decimal t3, decimal t4, decimal t5, decimal t6) { TableRow r = new TableRow(); TableCell c; c = Rpt.Foot(); c.Text = "TOTAL"; c.HorizontalAlign = HorizontalAlign.Left; c.VerticalAlign = VerticalAlign.Top; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t1); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t2); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t3); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t4); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t5); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t6); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); rpt.Rows.Add(r); }
private void SubTotal() { TableRow r = new TableRow(); TableCell c; c = Rpt.Foot(); c.Text = ""; c.ColumnSpan = 10; r.Cells.Add(c); c = Rpt.Foot(); c.Text = total1.Text; c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = total2.Text; c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = total3.Text; c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = ""; r.Cells.Add(c); c = Rpt.Foot(); c.Text = total4.Text; c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = total5.Text; c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); rpt.Rows.Add(r); }
private void SubTotal(string txt, decimal[] total, decimal t1, decimal t2, decimal t3) { TableRow r = new TableRow(); TableCell c; c = Rpt.Foot(); c.Text = txt; c.ColumnSpan = 9; c.HorizontalAlign = HorizontalAlign.Left; r.Cells.Add(c); for (int k = 0; k < total.Length; k++) { c = new TableCell(); c.Text = Cf.Num(total[k]); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); } rpt.Rows.Add(r); }
private void SubTotal(string txt, decimal t1, decimal t2, decimal t3, decimal TN, decimal KD, decimal KK, decimal TR, decimal BG, decimal UJ, decimal DN) { TableRow r = new TableRow(); TableCell c; c = Rpt.Foot(); c.Text = txt; c.ColumnSpan = 8; c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TN); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(KD); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TR); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(KK); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = " "; c.ColumnSpan = 4; c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); rpt.Rows.Add(r); }
private void SubTotal(string txt, decimal t1, decimal t2) { TableRow r = new TableRow(); TableCell c; c = Rpt.Foot(); c.Text = txt; c.ColumnSpan = 5; c.HorizontalAlign = HorizontalAlign.Left; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t1); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = " "; c.ColumnSpan = 4; c.HorizontalAlign = HorizontalAlign.Left; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t2); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); rpt.Rows.Add(r); r = new TableRow(); c = new TableCell(); c.Text = "<b>SISA TITIPAN : " + Cf.Num(t1 - t2) + "</b>"; c.ColumnSpan = 11; c.HorizontalAlign = HorizontalAlign.Left; r.Cells.Add(c); rpt.Rows.Add(r); }
private void SubTotal(decimal t1, decimal t2, decimal t3, decimal t4) { TableRow r = new TableRow(); TableCell c; c = Rpt.Foot(); c.Text = ""; c.ColumnSpan = 6; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t1); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t2); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t3); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t4); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = ""; c.ColumnSpan = 2; r.Cells.Add(c); rpt.Rows.Add(r); }
protected void Marketing1() { Table tb; TableRow tr; TableHeaderCell hc; TableCell c; tb = new Table(); tb.CssClass = "tb blue-skin"; tb.CellSpacing = 1; tr = new TableRow(); tb.Rows.Add(tr); c = new TableCell(); c.Text = "<b>A. SUMMARY STOCK</b>"; c.ColumnSpan = 10; tr.Cells.Add(c); tr = new TableRow(); tb.Rows.Add(tr); hc = new TableHeaderCell(); hc.Text = "Tower"; hc.RowSpan = 2; hc.ForeColor = Color.White; hc.Attributes["style"] = "background-color:#1E90FF"; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Tipe"; hc.RowSpan = 2; hc.ForeColor = Color.White; hc.Attributes["style"] = "background-color:#1E90FF"; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Available"; hc.ColumnSpan = 2; hc.ForeColor = Color.White; hc.Attributes["style"] = "background-color:#1E90FF"; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Sold"; hc.ColumnSpan = 2; hc.ForeColor = Color.White; hc.Attributes["style"] = "background-color:#1E90FF"; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Hold Internal"; hc.ColumnSpan = 2; hc.ForeColor = Color.White; hc.Attributes["style"] = "background-color:#1E90FF"; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Total"; hc.ColumnSpan = 2; hc.ForeColor = Color.White; hc.Attributes["style"] = "background-color:#1E90FF"; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); tr = new TableRow(); tb.Rows.Add(tr); hc = new TableHeaderCell(); hc.Text = "Unit"; hc.ForeColor = Color.White; hc.Attributes["style"] = "background-color:#1E90FF"; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "%"; hc.ForeColor = Color.White; hc.Attributes["style"] = "background-color:#1E90FF"; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Unit"; hc.ForeColor = Color.White; hc.Attributes["style"] = "background-color:#1E90FF"; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "%"; hc.ForeColor = Color.White; hc.Attributes["style"] = "background-color:#1E90FF"; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Unit"; hc.ForeColor = Color.White; hc.Attributes["style"] = "background-color:#1E90FF"; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "%"; hc.ForeColor = Color.White; hc.Attributes["style"] = "background-color:#1E90FF"; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Unit"; hc.HorizontalAlign = HorizontalAlign.Center; hc.ForeColor = Color.White; hc.Attributes["style"] = "background-color:#1E90FF"; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "%"; hc.ForeColor = Color.White; hc.Attributes["style"] = "background-color:#1E90FF"; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); rpt.Controls.Add(tb); string Project = "WHERE Project IN (" + Act.ProjectListSql + ")"; if (project.SelectedValue != "SEMUA") { Project = "WHERE Project = '" + project.SelectedValue + "'"; } DataTable rs = Db.Rs("SELECT DISTINCT Lokasi FROM MS_UNIT " + Project + ""); decimal t1 = 0, t2 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0, t7 = 0, t8 = 0; for (int i = 0; i < rs.Rows.Count; i++) { if (!Response.IsClientConnected) { break; } tr = new TableRow(); tb.Rows.Add(tr); c = new TableCell(); c.Text = rs.Rows[i]["Lokasi"].ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); DataTable r = Db.Rs("SELECT DISTINCT(JENIS) From MS_UNIT WHERE Lokasi = '" + rs.Rows[i]["Lokasi"].ToString() + "' " + Project.Replace("WHERE", "AND") + ""); for (int j = 0; j < r.Rows.Count; j++) { if (!Response.IsClientConnected) { break; } if (j > 0) { tr = new TableRow(); tb.Rows.Add(tr); c = new TableCell(); c.Text = ""; c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); } c = new TableCell(); c.Text = r.Rows[j]["Jenis"].ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = new TableCell(); decimal b = Nilai(rs.Rows[i]["Lokasi"].ToString(), r.Rows[j]["Jenis"].ToString(), "AVAILABLE", project.SelectedValue); c.Text = Cf.Num(b); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = new TableCell(); decimal d = Persen(rs.Rows[i]["Lokasi"].ToString(), r.Rows[j]["Jenis"].ToString(), "AVAILABLE", project.SelectedValue); c.Text = Cf.Num(Math.Round(d, 2)) + " %"; c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = new TableCell(); decimal e = Nilai(rs.Rows[i]["Lokasi"].ToString(), r.Rows[j]["Jenis"].ToString(), "SOLD", project.SelectedValue); c.Text = Cf.Num(e); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = new TableCell(); decimal f = Persen(rs.Rows[i]["Lokasi"].ToString(), r.Rows[j]["Jenis"].ToString(), "SOLD", project.SelectedValue); c.Text = Cf.Num(Math.Round(f, 2)) + " %"; c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = new TableCell(); decimal g = Nilai(rs.Rows[i]["Lokasi"].ToString(), r.Rows[j]["Jenis"].ToString(), "HOLD", project.SelectedValue); c.Text = Cf.Num(g); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = new TableCell(); decimal h = Persen(rs.Rows[i]["Lokasi"].ToString(), r.Rows[j]["Jenis"].ToString(), "HOLD", project.SelectedValue); c.Text = Cf.Num(Math.Round(h, 2)) + " %"; c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = new TableCell(); decimal k = Nilai(rs.Rows[i]["Lokasi"].ToString(), r.Rows[j]["Jenis"].ToString(), "TOTAL", project.SelectedValue); c.Text = Cf.Num(k); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = new TableCell(); decimal l = Persen(rs.Rows[i]["Lokasi"].ToString(), r.Rows[j]["Jenis"].ToString(), "TOTAL", project.SelectedValue); c.Text = Cf.Num(Math.Round(l, 2)) + " %"; c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); t7 += k; t1 += b; t2 = t1 / t7 * 100; t3 += e; t4 = t3 / t7 * 100; t5 += g; t6 = t5 / t7 * 100; t8 = t2 + t4 + t6; } } tr = new TableRow(); tb.Rows.Add(tr); c = Rpt.Foot(); c.Text = "Total"; c.ColumnSpan = 2; c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = Rpt.Foot(); c.Text = t1.ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(Math.Round(t2, 2)) + " %"; c.HorizontalAlign = HorizontalAlign.Right; tr.Cells.Add(c); c = Rpt.Foot(); c.Text = t3.ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(Math.Round(t4, 2)) + " %"; c.HorizontalAlign = HorizontalAlign.Right; tr.Cells.Add(c); c = Rpt.Foot(); c.Text = t5.ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(Math.Round(t6, 2)) + " %"; c.HorizontalAlign = HorizontalAlign.Right; tr.Cells.Add(c); c = Rpt.Foot(); c.Text = t7.ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(Math.Round(t8, 2)) + " %"; c.HorizontalAlign = HorizontalAlign.Right; tr.Cells.Add(c); }
protected void SubTotal(decimal t1, decimal t2, decimal t3, decimal t4, decimal t5, decimal t6, decimal t7, decimal t8, decimal t9, decimal t10, decimal t11, decimal t12, decimal t13, decimal t14) { TableRow r = new TableRow(); TableCell c; c = Rpt.Foot(); c.Text = "<strong>TOTAL</strong>"; c.ColumnSpan = 2; c.HorizontalAlign = HorizontalAlign.Left; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t1); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t2); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t3); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t4); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t5); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t6); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t7); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t8); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t9); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t10); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t11); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t12); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t13); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t14); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); rpt.Rows.Add(r); }
protected void Marketing2() { Table tb; TableRow tr; TableHeaderCell hc; TableCell c; tb = new Table(); tb.CssClass = "tb blue-skin"; tb.CellSpacing = 1; tr = new TableRow(); tb.Rows.Add(tr); c = new TableCell(); c.Text = "<b>2. SALES / PENJUALAN</b>"; c.ColumnSpan = 7; tr.Cells.Add(c); tr = new TableRow(); tb.Rows.Add(tr); hc = new TableHeaderCell(); hc.Text = "Lantai"; // hc.BackColor = Color.Gray; // hc.ForeColor = Color.White; hc.RowSpan = 2; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Unit"; // hc.BackColor = Color.Gray; // hc.ForeColor = Color.White; hc.ColumnSpan = 4; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Nilai Kontrak"; // hc.BackColor = Color.Gray; // hc.ForeColor = Color.White; hc.RowSpan = 2; hc.HorizontalAlign = HorizontalAlign.Right; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Jumlah Dasar Booking"; // hc.BackColor = Color.Gray; // hc.ForeColor = Color.White; hc.RowSpan = 2; hc.HorizontalAlign = HorizontalAlign.Right; tr.Cells.Add(hc); tr = new TableRow(); tb.Rows.Add(tr); hc = new TableHeaderCell(); hc.Text = "Stock Tersedia"; // hc.BackColor = Color.Gray; // hc.ForeColor = Color.White; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Penjualan Dasar SP"; // hc.BackColor = Color.Gray; // hc.ForeColor = Color.White; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Stock Booking"; // hc.BackColor = Color.Gray; // hc.ForeColor = Color.White; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Stock Available"; // hc.BackColor = Color.Gray; // hc.ForeColor = Color.White; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); rpt.Controls.Add(tb); int t1 = 0, t2 = 0, t3 = 0, t4 = 0; decimal t5 = 0, t6 = 0; DataTable rs = Db.Rs("SELECT DISTINCT Lokasi FROM ISC064_MARKETINGJUAL..MS_UNIT WHERE Project = '" + Project + "' ORDER BY Lokasi"); for (int i = 0; i < rs.Rows.Count; i++) { if (!Response.IsClientConnected) { break; } tr = new TableRow(); tb.Rows.Add(tr); c = new TableCell(); c.Text = rs.Rows[i]["Lokasi"].ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = new TableCell(); int a = TotalUnit(rs.Rows[i]["Lokasi"].ToString()); c.Text = a.ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = new TableCell(); int b = SoldUnit(rs.Rows[i]["Lokasi"].ToString()); c.Text = b.ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = new TableCell(); int x = BookedUnit(rs.Rows[i]["Lokasi"].ToString()); c.Text = x.ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = new TableCell(); int y = AvailableUnit(rs.Rows[i]["Lokasi"].ToString()); c.Text = y.ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = new TableCell(); decimal d = NilaiKontrak(rs.Rows[i]["Lokasi"].ToString()); c.Text = Cf.Num(d); c.HorizontalAlign = HorizontalAlign.Right; tr.Cells.Add(c); c = new TableCell(); decimal e = NilaiReservasi(rs.Rows[i]["Lokasi"].ToString()); c.Text = Cf.Num(e); c.HorizontalAlign = HorizontalAlign.Right; tr.Cells.Add(c); t1 += a; t2 += b; t3 += x; t4 += y; t5 += d; t6 += e; } tr = new TableRow(); tb.Rows.Add(tr); c = Rpt.Foot(); c.Text = "Total"; c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = Rpt.Foot(); c.Text = t1.ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = Rpt.Foot(); c.Text = t2.ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = Rpt.Foot(); c.Text = t3.ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = Rpt.Foot(); c.Text = t4.ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t5); c.HorizontalAlign = HorizontalAlign.Right; tr.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t6); c.HorizontalAlign = HorizontalAlign.Right; tr.Cells.Add(c); }
protected void Finance2() { Table tb; TableRow tr; TableHeaderCell hc; TableCell c; tb = new Table(); tb.CssClass = "tb blue-skin"; tb.CellSpacing = 1; tr = new TableRow(); tb.Rows.Add(tr); c = new TableCell(); c.Text = "<b>2. CLEARING BANK</b>"; c.ColumnSpan = 4; tr.Cells.Add(c); tr = new TableRow(); tb.Rows.Add(tr); hc = new TableHeaderCell(); hc.Text = "Lantai"; // hc.BackColor = Color.Gray; // hc.ForeColor = Color.White; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Collection<br />Dasar \"Voucher PB\""; // hc.BackColor = Color.Gray; // hc.ForeColor = Color.White; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Clearing Bank<br />Dasar \"Kwitansi\""; // hc.BackColor = Color.Gray; // hc.ForeColor = Color.White; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Saldo<br />Sisa"; // hc.BackColor = Color.Gray; // hc.ForeColor = Color.White; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); decimal t1 = 0, t2 = 0, t3 = 0; DataTable rs = Db.Rs("SELECT DISTINCT Lokasi FROM ISC064_MARKETINGJUAL..MS_UNIT WHERE Project = '" + Project + "' ORDER BY Lokasi"); for (int i = 0; i < rs.Rows.Count; i++) { if (!Response.IsClientConnected) { break; } tr = new TableRow(); tb.Rows.Add(tr); c = new TableCell(); c.Text = rs.Rows[i]["Lokasi"].ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = new TableCell(); decimal a = TotalLunas(rs.Rows[i]["Lokasi"].ToString()); c.Text = Cf.Num(a); c.HorizontalAlign = HorizontalAlign.Right; tr.Cells.Add(c); c = new TableCell(); decimal b = TotalLunasCair(rs.Rows[i]["Lokasi"].ToString()); c.Text = Cf.Num(b); c.HorizontalAlign = HorizontalAlign.Right; tr.Cells.Add(c); c = new TableCell(); decimal x = a - b; c.Text = Cf.Num(x); c.HorizontalAlign = HorizontalAlign.Right; tr.Cells.Add(c); t1 += a; t2 += b; t3 += x; } tr = new TableRow(); tb.Rows.Add(tr); c = Rpt.Foot(); c.Text = "Total"; c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t1); c.HorizontalAlign = HorizontalAlign.Right; tr.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t2); c.HorizontalAlign = HorizontalAlign.Right; tr.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t3); c.HorizontalAlign = HorizontalAlign.Right; tr.Cells.Add(c); rpt.Controls.Add(tb); }
private void Fill() { string Status = ""; if (StatusA != "") { Status = " AND A.Status = 'A'"; } if (StatusB != "") { Status = " AND A.Status = 'B'"; } string tgl = ""; string order = ""; tgl = "A.TglKontrak"; order = ",A.NoKontrak"; DateTime Dari = Db.SingleTime("SELECT FilterDari FROM LapPDF WHERE AttachmentID='" + AttachmentID + "'"); DateTime Sampai = Db.SingleTime("SELECT FilterSampai FROM LapPDF WHERE AttachmentID='" + AttachmentID + "'"); string nProject = ""; if (Project != "SEMUA") { nProject = " AND A.Project IN ('" + Project.Replace(",", "','") + "')"; } string nPerusahaan = ""; if (Perusahaan != "SEMUA") { nPerusahaan = " AND A.Pers = '" + Perusahaan + "'"; } int index = 1; int no = 1; string sql = "SELECT DISTINCT (NoAgent) from MS_KONTRAK A" + " where (select ISNULL(count(*),0) from MS_KOMISI where NoKontrak = A.NoKontrak) > 0" + nProject + nPerusahaan; DataTable sr = Db.Rs(sql); decimal t1 = 0, t2 = 0; for (int g = 0; g < sr.Rows.Count; g++) { if (!Response.IsClientConnected) { break; } string strSql = "SELECT " + "A.NoKontrak" + ",A.TglKontrak" + ",A.NilaiDPP" + ",A.NoUnit" + ",A.NilaiKontrak" + ",B.Nama AS Ag" + ",B.Principal" + ",B.NPWP" + ",B.Rekening" + ",A.Status" + ",A.PersenLunas" + ",C.Nama as Customer" + ",A.NoAgent" + ",A.NoStock" + " FROM MS_KONTRAK A INNER JOIN MS_AGENT B ON A.NoAgent = B.NoAgent" + " INNER JOIN MS_CUSTOMER C ON A.NoCustomer = C.NoCustomer" + " WHERE A.NoAgent= '" + sr.Rows[g]["NoAgent"] + "'" + " AND A.FlagKomisi = '1'" + Status + nProject + nPerusahaan + " AND CONVERT(varchar,A.TglKontrak,112) >= '" + Cf.Tgl112(Dari) + "'" + " AND CONVERT(varchar,A.TglKontrak,112) <= '" + Cf.Tgl112(Sampai) + "'" + " AND NoKontrak IN (SELECT NoKontrak FROM MS_KOMISI WHERE SudahBayar=1 AND Realisasi=0)" + " ORDER BY B.Nama" + order; DataTable rs = Db.Rs(strSql); for (int i = 0; i < rs.Rows.Count; i++) { if (!Response.IsClientConnected) { break; } TableRow r = new TableRow(); TableCell c; TableCell c2; TableRow r2; TableRow r2a; TableHeaderCell th2; Table tb; r.VerticalAlign = VerticalAlign.Top; r.Attributes["ondblclick"] = "popJadwalKomisi('" + rs.Rows[i]["NoKontrak"] + "')"; //nambah no default c = new TableCell(); c.Text = (no).ToString(); c.HorizontalAlign = HorizontalAlign.Left; r.Cells.Add(c); c = new TableCell(); c.Text = rs.Rows[i]["Status"].ToString(); c.HorizontalAlign = HorizontalAlign.Left; r.Cells.Add(c); c = new TableCell(); c.Text = rs.Rows[i]["NoKontrak"].ToString(); c.HorizontalAlign = HorizontalAlign.Left; r.Cells.Add(c); c = new TableCell(); c.Text = Cf.Day(rs.Rows[i]["TglKontrak"]); c.HorizontalAlign = HorizontalAlign.Left; r.Cells.Add(c); c = new TableCell(); c.Text = rs.Rows[i]["Customer"].ToString(); c.HorizontalAlign = HorizontalAlign.Left; r.Cells.Add(c); c = new TableCell(); c.Text = rs.Rows[i]["NoUnit"].ToString(); c.HorizontalAlign = HorizontalAlign.Left; r.Cells.Add(c); decimal LuasSG = Db.SingleDecimal("SELECT LuasSG FROM MS_UNIT WHERE NoStock = '" + rs.Rows[i]["NoStock"] + "'"); c = new TableCell(); c.Text = Cf.Num(LuasSG); c.HorizontalAlign = HorizontalAlign.Left; r.Cells.Add(c); c = new TableCell(); c.Text = rs.Rows[i]["Ag"].ToString(); c.HorizontalAlign = HorizontalAlign.Left; r.Cells.Add(c); c = new TableCell(); c.Text = rs.Rows[i]["NPWP"].ToString(); c.HorizontalAlign = HorizontalAlign.Left; r.Cells.Add(c); c = new TableCell(); c.Text = rs.Rows[i]["Rekening"].ToString(); c.HorizontalAlign = HorizontalAlign.Left; r.Cells.Add(c); c = new TableCell(); c.Text = Cf.Num(Convert.ToDecimal(rs.Rows[i]["NilaiDPP"])); c.HorizontalAlign = HorizontalAlign.Left; r.Cells.Add(c); //komisi marketing c = new TableCell(); c.Text = Cf.Num(Convert.ToDecimal(rs.Rows[i]["NilaiDPP"])); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); tb = new Table(); tb.CssClass = "datatb"; tb.Style.Add("width", "100%"); tb.BorderColor = Color.Black; c.Controls.Add(tb); r2 = new TableRow(); th2 = new TableHeaderCell(); th2.BackColor = Color.Gray; th2.ForeColor = Color.White; th2.Text = "Jenis"; r2.Cells.Add(th2); th2 = new TableHeaderCell(); th2.Text = "Penerima"; th2.BackColor = Color.Gray; th2.ForeColor = Color.White; r2.Cells.Add(th2); th2 = new TableHeaderCell(); th2.Text = "Nilai"; th2.BackColor = Color.Gray; th2.ForeColor = Color.White; r2.Cells.Add(th2); tb.Rows.Add(r2); DataTable kom = Db.Rs("SELECT * FROM MS_KOMISI WHERE NoKontrak='" + rs.Rows[i]["NoKontrak"] + "' AND Tipe !='OVN' AND SudahBayar=1 AND Realisasi=0"); decimal total = 0; for (int a = 0; a < kom.Rows.Count; a++) { r2a = new TableRow(); c2 = new TableCell(); c2.Text = kom.Rows[a]["NamaKomisi"].ToString(); c2.HorizontalAlign = HorizontalAlign.Left; r2a.Cells.Add(c2); c2 = new TableCell(); c2.Text = kom.Rows[a]["NamaPenerima"].ToString(); c2.HorizontalAlign = HorizontalAlign.Left; r2a.Cells.Add(c2); c2 = new TableCell(); c2.Text = Cf.Num(Convert.ToDecimal(kom.Rows[a]["NilaiKomisi"])); c2.HorizontalAlign = HorizontalAlign.Right; r2a.Cells.Add(c2); total += Convert.ToDecimal(kom.Rows[a]["NilaiKomisi"]); tb.Rows.Add(r2a); } r2a = new TableRow(); c2 = Rpt.Foot(); c2.Text = "Total"; c2.ColumnSpan = 2; c2.HorizontalAlign = HorizontalAlign.Left; r2a.Cells.Add(c2); c2 = Rpt.Foot(); c2.Text = Cf.Num(total); c2.HorizontalAlign = HorizontalAlign.Right; r2a.Cells.Add(c2); tb.Rows.Add(r2a); rpt.Rows.Add(r); no++; t1 += total; } } SubTotal("GRAND TOTAL", t1); }
protected void Marketing1() { Table tb; TableRow tr; TableHeaderCell hc; TableCell c; tb = new Table(); tb.CssClass = "tb blue-skin"; tb.CellSpacing = 1; tr = new TableRow(); tb.Rows.Add(tr); c = new TableCell(); c.Text = "<b>A. MARKETING</b>"; c.ColumnSpan = 3; tr.Cells.Add(c); tr = new TableRow(); tb.Rows.Add(tr); c = new TableCell(); c.Text = "<b>1. UNIT STOCK</b>"; c.ColumnSpan = 4; tr.Cells.Add(c); tr = new TableRow(); tb.Rows.Add(tr); hc = new TableHeaderCell(); hc.Text = "Lantai"; // hc.BackColor = Color.Gray; // hc.ForeColor = Color.White; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Stock Tersedia"; // hc.BackColor = Color.Gray; // hc.ForeColor = Color.White; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Price List"; // hc.BackColor = Color.Gray; // hc.ForeColor = Color.White; hc.HorizontalAlign = HorizontalAlign.Right; tr.Cells.Add(hc); rpt.Controls.Add(tb); DataTable rs = Db.Rs("SELECT DISTINCT Lokasi FROM ISC064_MARKETINGJUAL..MS_UNIT WHERE Project = '" + Project + "'"); int t1 = 0; decimal t2 = 0; for (int i = 0; i < rs.Rows.Count; i++) { if (!Response.IsClientConnected) { break; } tr = new TableRow(); tb.Rows.Add(tr); c = new TableCell(); c.Text = rs.Rows[i]["Lokasi"].ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = new TableCell(); int a = TotalUnit(rs.Rows[i]["Lokasi"].ToString()); c.Text = a.ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = new TableCell(); decimal b = PriceList(rs.Rows[i]["Lokasi"].ToString()); c.Text = Cf.Num(b); c.HorizontalAlign = HorizontalAlign.Right; tr.Cells.Add(c); t1 += a; t2 += b; } tr = new TableRow(); tb.Rows.Add(tr); c = Rpt.Foot(); c.Text = "Total"; c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = Rpt.Foot(); c.Text = t1.ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t2); c.HorizontalAlign = HorizontalAlign.Right; tr.Cells.Add(c); }
private void SubTotal(decimal t1, decimal t2, decimal t3, decimal t4, decimal t7, decimal t8, decimal t5, decimal t6, decimal t9, decimal t10) { TableRow r = new TableRow(); TableCell c; c = Rpt.Foot(); c.Text = "TOTAL"; c.ColumnSpan = 2; c.HorizontalAlign = HorizontalAlign.Left; c.VerticalAlign = VerticalAlign.Top; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t3) //+ "<br />" //+ Cf.Num(t3 / t5 * 100) + "%" ; c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(Math.Round(t4, 2)) + " %" //+ "<br />" //+ Cf.Num(t4 / t6 * 100) + "%" ; c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t1) //+ "<br />" //+ Cf.Num(t1 / t5 * 100) + "%" ; c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(Math.Round(t2, 2)) + " %" //+ "<br />" //+ Cf.Num(t2 / t6 * 100) + "%" ; c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t7) //+ "<br />" //+ Cf.Num(t7 / t5 * 100) + "%" ; c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(Math.Round(t8, 2)) + " %" //+ "<br />" //+ Cf.Num(t8 / t6 * 100) + "%" ; c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t5) //+ "<br />100%" ; c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(Math.Round(t6)) + " %" //+ "<br />100%" ; c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); rpt.Rows.Add(r); }
protected void GrandTotal(decimal t1, decimal t2, decimal t3, decimal t4, decimal t5, decimal t6) { TableRow r = new TableRow(); TableCell c; c = Rpt.Foot(); c.Text = "GRAND TOTAL"; c.ColumnSpan = 3; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t1); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = " "; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t2); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = " "; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t3); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = " "; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t4); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = " "; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t5); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = " "; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t6); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); rpt.Rows.Add(r); }
private void SubTotal(string txt, decimal TotalLalu, decimal TotalJan, decimal TotalFeb, decimal TotalMar, decimal TotalApr, decimal TotalMay, decimal TotalJun, decimal TotalJul, decimal TotalAug, decimal TotalSep, decimal TotalOct, decimal TotalNov, decimal TotalDec, decimal TargetJan, decimal TargetFeb, decimal TargetMar, decimal TargetApr, decimal TargetMay, decimal TargetJun, decimal TargetJul, decimal TargetAug, decimal TargetSep, decimal TargetOct, decimal TargetNov, decimal TargetDec, decimal Total, decimal GT, decimal totalBatal, decimal TotalLalua, decimal TotalJana, decimal TotalFeba, decimal TotalMara, decimal TotalApra, decimal TotalMaya, decimal TotalJuna, decimal TotalJula, decimal TotalAuga, decimal TotalSepa, decimal TotalOcta, decimal TotalNova, decimal TotalDeca, decimal TargetJana, decimal TargetFeba, decimal TargetMara, decimal TargetApra, decimal TargetMaya, decimal TargetJuna, decimal TargetJula, decimal TargetAuga, decimal TargetSepa, decimal TargetOcta, decimal TargetNova, decimal TargetDeca, decimal Totala, decimal GTa, decimal totalBatala) { TableRow r = new TableRow(); TableCell c; c = Rpt.Foot(); c.Text = txt; c.ColumnSpan = 4; c.HorizontalAlign = HorizontalAlign.Left; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TargetJan); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TotalJan); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TotalJana); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); if (TotalJana != 0 && TargetJan != 0) { c.Text = Cf.Num(TotalJana / TargetJan * 100) + "%"; } else { c.Text = Cf.Num(0) + "%"; } c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TargetFeb); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TotalFeb); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TotalFeba); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); if (TotalFeba != 0 && TargetFeb != 0) { c.Text = Cf.Num(TotalFeba / TargetFeb * 100) + "%"; } else { c.Text = Cf.Num(0) + "%"; } c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TargetMar); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TotalMar); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TotalMara); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); if (TotalMara != 0 && TargetMar != 0) { c.Text = Cf.Num(TotalMara / TargetMar * 100) + "%"; } else { c.Text = Cf.Num(0) + "%"; } c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TargetApr); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TotalApr); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TotalApra); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); if (TotalApra != 0 && TargetApr != 0) { c.Text = Cf.Num(TotalApra / TargetApr * 100) + "%"; } else { c.Text = Cf.Num(0) + "%"; } c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TargetMay); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TotalMay); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TotalMaya); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); if (TotalMaya != 0 && TargetMay != 0) { c.Text = Cf.Num(TotalMaya / TargetMay * 100) + "%"; } else { c.Text = Cf.Num(0) + "%"; } c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TargetJun); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TotalJun); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TotalJuna); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); if (TotalJuna != 0 && TargetJun != 0) { c.Text = Cf.Num(TotalJuna / TargetJun * 100) + "%"; } else { c.Text = Cf.Num(0) + "%"; } c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TargetJul); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TotalJul); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TotalJula); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); if (TotalJula != 0 && TargetJul != 0) { c.Text = Cf.Num(TotalJula / TargetJul * 100) + "%"; } else { c.Text = Cf.Num(0) + "%"; } c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TargetAug); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TotalAug); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TotalAuga); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); if (TotalAuga != 0 && TargetAug != 0) { c.Text = Cf.Num(TotalAuga / TargetAug * 100) + "%"; } else { c.Text = Cf.Num(0) + "%"; } c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TargetSep); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TotalSep); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TotalSepa); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); if (TotalSepa != 0 && TargetSep != 0) { c.Text = Cf.Num(TotalSepa / TargetSep * 100) + "%"; } else { c.Text = Cf.Num(0) + "%"; } c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TargetOct); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TotalOct); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TotalOcta); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); if (TotalOcta != 0 && TargetOct != 0) { c.Text = Cf.Num(TotalOcta / TargetOct * 100) + "%"; } else { c.Text = Cf.Num(0) + "%"; } c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TargetNov); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TotalNov); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TotalNova); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); if (TotalNova != 0 && TargetNov != 0) { c.Text = Cf.Num(TotalNova / TargetNov * 100) + "%"; } else { c.Text = Cf.Num(0) + "%"; } c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TargetDec); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TotalDec); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(TotalDeca); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); if (TotalDeca != 0 && TargetDec != 0) { c.Text = Cf.Num(TotalDeca / TargetDec * 100) + "%"; } else { c.Text = Cf.Num(0) + "%"; } c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(Total); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(Totala); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(totalBatal);//Cf.Num(TotalLalu); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(totalBatala);//Cf.Num(TotalLalu); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); decimal g = Total - totalBatal; c = Rpt.Foot(); c.Text = Cf.Num(g);//Cf.Num(GT); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); decimal ga = Totala - totalBatala; c = Rpt.Foot(); c.Text = Cf.Num(ga);//Cf.Num(GT); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); rpt.Rows.Add(r); }
protected void Finance() { Table tb; TableRow tr; TableHeaderCell hc; TableCell c; tb = new Table(); tb.CssClass = "tb blue-skin"; tb.CellSpacing = 1; tr = new TableRow(); tb.Rows.Add(tr); c = new TableCell(); c.Text = "<b>Finance</b>"; c.ColumnSpan = 4; tr.Cells.Add(c); tr = new TableRow(); tb.Rows.Add(tr); hc = new TableHeaderCell(); hc.Text = "Payment"; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Nilai (Rp.)"; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); tr = new TableRow(); tb.Rows.Add(tr); c = new TableCell(); c.Text = "Cash"; tr.Cells.Add(c); c = new TableCell(); decimal cash = Db.SingleDecimal("SELECT ISNULL(SUM(Total),0) FROM ISC064_FINANCEAR..MS_TTS WHERE TglTTS = '" + Cf.Tgl112(Tgl) + "' AND CaraBayar = 'TN' AND Project = '" + Project + "'"); c.Text = Cf.Num(cash); c.HorizontalAlign = HorizontalAlign.Right; tr.Cells.Add(c); tr = new TableRow(); tb.Rows.Add(tr); c = new TableCell(); c.Text = "Credit Card"; tr.Cells.Add(c); c = new TableCell(); decimal creditcard = Db.SingleDecimal("SELECT ISNULL(SUM(Total),0) FROM ISC064_FINANCEAR..MS_TTS WHERE TglTTS = '" + Cf.Tgl112(Tgl) + "' AND CaraBayar = 'KK' AND Project = '" + Project + "'"); c.Text = Cf.Num(creditcard); c.HorizontalAlign = HorizontalAlign.Right; tr.Cells.Add(c); tr = new TableRow(); tb.Rows.Add(tr); c = new TableCell(); c.Text = "Debit Card"; tr.Cells.Add(c); c = new TableCell(); decimal debitcard = Db.SingleDecimal("SELECT ISNULL(SUM(Total),0) FROM ISC064_FINANCEAR..MS_TTS WHERE TglTTS = '" + Cf.Tgl112(Tgl) + "' AND CaraBayar = 'KD' AND Project = '" + Project + "'"); c.Text = Cf.Num(debitcard); c.HorizontalAlign = HorizontalAlign.Right; tr.Cells.Add(c); tr = new TableRow(); tb.Rows.Add(tr); c = new TableCell(); c.Text = "Giro"; tr.Cells.Add(c); c = new TableCell(); decimal giro = Db.SingleDecimal("SELECT ISNULL(SUM(Total),0) FROM ISC064_FINANCEAR..MS_TTS WHERE TglTTS = '" + Cf.Tgl112(Tgl) + "' AND CaraBayar = 'BG' AND Project = '" + Project + "'"); c.Text = Cf.Num(giro); c.HorizontalAlign = HorizontalAlign.Right; tr.Cells.Add(c); tr = new TableRow(); tb.Rows.Add(tr); c = new TableCell(); c.Text = "Transfer"; tr.Cells.Add(c); c = new TableCell(); decimal transfer = Db.SingleDecimal("SELECT ISNULL(SUM(Total),0) FROM ISC064_FINANCEAR..MS_TTS WHERE TglTTS = '" + Cf.Tgl112(Tgl) + "' AND CaraBayar = 'TR' AND Project = '" + Project + "'"); c.Text = Cf.Num(transfer); c.HorizontalAlign = HorizontalAlign.Right; tr.Cells.Add(c); tr = new TableRow(); tb.Rows.Add(tr); c = Rpt.Foot(); c.Text = "Payment Received"; tr.Cells.Add(c); c = Rpt.Foot(); decimal total = Db.SingleDecimal("SELECT ISNULL(SUM(Total),0) FROM ISC064_FINANCEAR..MS_TTS WHERE TglTTS = '" + Cf.Tgl112(Tgl) + "' AND Project = '" + Project + "'"); c.Text = Cf.Num(total); c.HorizontalAlign = HorizontalAlign.Right; tr.Cells.Add(c); rpt.Controls.Add(tb); }
protected void Penjualan() { Table tb; TableRow tr; TableHeaderCell hc; TableCell c; tb = new Table(); tb.CssClass = "tb blue-skin"; tb.CellSpacing = 1; tr = new TableRow(); tb.Rows.Add(tr); c = new TableCell(); c.Text = "<b>B. PENJUALAN</b>"; c.ColumnSpan = 9; tr.Cells.Add(c); tr = new TableRow(); tb.Rows.Add(tr); hc = new TableHeaderCell(); hc.Text = "Tower"; hc.ForeColor = Color.White; hc.Attributes["style"] = "background-color:#1E90FF"; hc.RowSpan = 2; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Tipe"; hc.RowSpan = 2; hc.ForeColor = Color.White; hc.Attributes["style"] = "background-color:#1E90FF"; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Available"; hc.ForeColor = Color.White; hc.Attributes["style"] = "background-color:#1E90FF"; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Penjualan"; hc.ForeColor = Color.White; hc.Attributes["style"] = "background-color:#1E90FF"; hc.ColumnSpan = 2; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Batal"; hc.ColumnSpan = 2; hc.ForeColor = Color.White; hc.Attributes["style"] = "background-color:#1E90FF"; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Penjualan Bersih"; hc.ColumnSpan = 2; hc.ForeColor = Color.White; hc.Attributes["style"] = "background-color:#1E90FF"; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); tr = new TableRow(); tb.Rows.Add(tr); hc = new TableHeaderCell(); hc.Text = "Unit"; hc.ForeColor = Color.White; hc.Attributes["style"] = "background-color:#1E90FF"; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Unit"; hc.ForeColor = Color.White; hc.Attributes["style"] = "background-color:#1E90FF"; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Nilai Kontrak"; hc.ForeColor = Color.White; hc.Attributes["style"] = "background-color:#1E90FF"; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Unit"; hc.ForeColor = Color.White; hc.Attributes["style"] = "background-color:#1E90FF"; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Nilai Kontrak"; hc.ForeColor = Color.White; hc.Attributes["style"] = "background-color:#1E90FF"; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Unit"; hc.ForeColor = Color.White; hc.Attributes["style"] = "background-color:#1E90FF"; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Nilai Kontrak"; hc.ForeColor = Color.White; hc.Attributes["style"] = "background-color:#1E90FF"; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); rpt.Controls.Add(tb); string Project = "WHERE Project IN (" + Act.ProjectListSql + ")"; if (project.SelectedValue != "SEMUA") { Project = "WHERE Project = '" + project.SelectedValue + "'"; } string Perusahaan = ""; if (pers.SelectedValue != "SEMUA") { Perusahaan = "AND Project = '" + project.SelectedValue + "'"; } DataTable rs = Db.Rs("SELECT DISTINCT Lokasi FROM MS_UNIT " + Project + ""); decimal t1 = 0, t2 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0, t7 = 0; for (int i = 0; i < rs.Rows.Count; i++) { if (!Response.IsClientConnected) { break; } tr = new TableRow(); tb.Rows.Add(tr); c = new TableCell(); c.Text = rs.Rows[i]["Lokasi"].ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); DataTable r = Db.Rs("SELECT DISTINCT(JENIS) From MS_UNIT WHERE Lokasi = '" + rs.Rows[i]["Lokasi"].ToString() + "' " + Project.Replace("WHERE", "AND") + ""); for (int j = 0; j < r.Rows.Count; j++) { if (!Response.IsClientConnected) { break; } if (j > 0) { tr = new TableRow(); tb.Rows.Add(tr); c = new TableCell(); c.Text = rs.Rows[i]["Lokasi"].ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); } c = new TableCell(); c.Text = r.Rows[j]["Jenis"].ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = new TableCell(); decimal b = Nilai(rs.Rows[i]["Lokasi"].ToString(), r.Rows[j]["Jenis"].ToString(), "AVAILABLE", project.SelectedValue); c.Text = Cf.Num(b); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = new TableCell(); decimal e = Nilai(rs.Rows[i]["Lokasi"].ToString(), r.Rows[j]["Jenis"].ToString(), "SOLD", project.SelectedValue); c.Text = Cf.Num(e); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = new TableCell(); decimal g = NilaiKontrak(rs.Rows[i]["Lokasi"].ToString(), r.Rows[j]["Jenis"].ToString(), "SOLD", project.SelectedValue, pers.SelectedValue); c.Text = Cf.Num(Math.Round(g)); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = new TableCell(); decimal h = Nilai(rs.Rows[i]["Lokasi"].ToString(), r.Rows[j]["Jenis"].ToString(), "BATAL", project.SelectedValue); c.Text = Cf.Num(h); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = new TableCell(); decimal k = NilaiKontrak(rs.Rows[i]["Lokasi"].ToString(), r.Rows[j]["Jenis"].ToString(), "BATAL", project.SelectedValue, pers.SelectedValue); c.Text = Cf.Num(Math.Round(k)); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = new TableCell(); decimal l = e - h; c.Text = Cf.Num(Math.Round(l)); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = new TableCell(); decimal m = g - k; c.Text = Cf.Num(Math.Round(m)); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); t1 += b; t2 += e; t3 += g; t4 += h; t5 += k; t6 += l; t7 += m; } } tr = new TableRow(); tb.Rows.Add(tr); c = Rpt.Foot(); c.Text = "Total"; c.ColumnSpan = 2; c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = Rpt.Foot(); c.Text = t1.ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = Rpt.Foot(); c.Text = t2.ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(Math.Round(t3)); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = Rpt.Foot(); c.Text = t4.ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(Math.Round(t5)); c.HorizontalAlign = HorizontalAlign.Right; tr.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(Math.Round(t6)); c.HorizontalAlign = HorizontalAlign.Right; tr.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(Math.Round(t7)); c.HorizontalAlign = HorizontalAlign.Right; tr.Cells.Add(c); }
protected void Sales() { Table tb; TableRow tr; TableHeaderCell hc; TableCell c; tb = new Table(); tb.CssClass = "tb blue-skin"; tb.CellSpacing = 1; tr = new TableRow(); tb.Rows.Add(tr); c = new TableCell(); c.Text = "<b>Sales</b>"; c.ColumnSpan = 4; tr.Cells.Add(c); tr = new TableRow(); tb.Rows.Add(tr); hc = new TableHeaderCell(); hc.Text = "Tipe Unit"; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Jumlah Unit"; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Nilai Kontrak (Rp.)"; hc.HorizontalAlign = HorizontalAlign.Right; tr.Cells.Add(hc); rpt.Controls.Add(tb); int tunitjenis = 0; decimal tnilaijenis = 0; DataTable rs = Db.Rs("SELECT DISTINCT Jenis FROM ISC064_MARKETINGJUAL..MS_KONTRAK WHERE TglKontrak = '" + Cf.Tgl112(Tgl) + "' AND Status = 'A' AND Project = '" + Project + "'"); for (int i = 0; i < rs.Rows.Count; i++) { if (!Response.IsClientConnected) { break; } tr = new TableRow(); tb.Rows.Add(tr); c = new TableCell(); c.Text = rs.Rows[i]["Jenis"].ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = new TableCell(); int unitjenis = UnitJenis(rs.Rows[i]["Jenis"].ToString()); c.Text = unitjenis.ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = new TableCell(); decimal nilaijenis = NilaiJenis(rs.Rows[i]["Jenis"].ToString()); c.Text = Cf.Num(nilaijenis); c.HorizontalAlign = HorizontalAlign.Right; tr.Cells.Add(c); tunitjenis += unitjenis; tnilaijenis += nilaijenis; } tr = new TableRow(); tb.Rows.Add(tr); c = Rpt.Foot(); c.Text = "Total"; c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = Rpt.Foot(); c.Text = tunitjenis.ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(tnilaijenis); c.HorizontalAlign = HorizontalAlign.Right; tr.Cells.Add(c); }
protected void SubTotal(decimal t1, decimal t2, decimal t3, decimal t4, decimal[] re, decimal t5, decimal t6, decimal t7, decimal t8, decimal t9, decimal t10, decimal[] reSA, decimal[] reMO) { TableRow r = new TableRow(); TableCell c; c = Rpt.Foot(); c.Text = "<strong>GRAND TOTAL</strong>"; c.ColumnSpan = 3; c.HorizontalAlign = HorizontalAlign.Center; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t1); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t2); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t3); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t4); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = " "; c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = " "; c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = " "; c.ColumnSpan = 2; c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); for (int i = 0; i < re.Length; i++) { c = Rpt.Foot(); c.Text = Cf.Num(re[i]); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(reSA[i]); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(reMO[i]); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); } c = Rpt.Foot(); c.Text = Cf.Num(t5); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t7); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t8); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t6); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t9); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t10); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = " "; c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); rpt.Rows.Add(r); }
protected void StockUnit() { Table tb; TableRow tr; TableHeaderCell hc; TableCell c; tb = new Table(); tb.CssClass = "tb blue-skin"; tb.CellSpacing = 1; tr = new TableRow(); tb.Rows.Add(tr); c = new TableCell(); c.Text = "<b>Stock Unit</b>"; c.ColumnSpan = 5; tr.Cells.Add(c); tr = new TableRow(); tb.Rows.Add(tr); hc = new TableHeaderCell(); hc.Text = "Lokasi"; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Available"; hc.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Booking"; hc.HorizontalAlign = HorizontalAlign.Right; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Hold"; hc.HorizontalAlign = HorizontalAlign.Right; tr.Cells.Add(hc); hc = new TableHeaderCell(); hc.Text = "Sold"; hc.HorizontalAlign = HorizontalAlign.Right; tr.Cells.Add(hc); rpt.Controls.Add(tb); DataTable rs = Db.Rs("SELECT DISTINCT Lokasi FROM ISC064_MARKETINGJUAL..MS_UNIT WHERE Project = '" + Project + "'"); int tavailable = 0, tbooking = 0, thold = 0, tsold = 0; for (int i = 0; i < rs.Rows.Count; i++) { if (!Response.IsClientConnected) { break; } tr = new TableRow(); tb.Rows.Add(tr); c = new TableCell(); c.Text = rs.Rows[i]["Lokasi"].ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); //Available c = new TableCell(); int available = AvailableUnit(rs.Rows[i]["Lokasi"].ToString()) - BookedUnit(rs.Rows[i]["Lokasi"].ToString()); c.Text = available.ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); //Booking c = new TableCell(); int booking = BookedUnit(rs.Rows[i]["Lokasi"].ToString()); c.Text = booking.ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); //Hold c = new TableCell(); int hold = HoldUnit(rs.Rows[i]["Lokasi"].ToString()); c.Text = hold.ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); //Sold c = new TableCell(); int sold = SoldUnit(rs.Rows[i]["Lokasi"].ToString()); c.Text = sold.ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); tavailable += available; tbooking += booking; thold += hold; tsold += sold; } tr = new TableRow(); tb.Rows.Add(tr); c = Rpt.Foot(); c.Text = "Total"; c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = Rpt.Foot(); c.Text = tavailable.ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = Rpt.Foot(); c.Text = tbooking.ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = Rpt.Foot(); c.Text = thold.ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); c = Rpt.Foot(); c.Text = tsold.ToString(); c.HorizontalAlign = HorizontalAlign.Center; tr.Cells.Add(c); }
protected void SubTotal(decimal t1, decimal t2, decimal t3, decimal t4, decimal[] sawal, decimal[] t, decimal[] re, decimal[] sakhir) { TableRow r = new TableRow(); TableCell c; c = Rpt.Foot(); c.Text = "<strong>TOTAL</strong>"; c.ColumnSpan = 5; c.HorizontalAlign = HorizontalAlign.Center; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t1); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = " "; c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t2); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); for (int i = 0; i < t.Length; i++) { c = Rpt.Foot(); c.Text = Cf.Num(sawal[i]); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t[i]); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(re[i]); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = " "; c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(sakhir[i]); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); } c = Rpt.Foot(); c.Text = Cf.Num(t3); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t4); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); rpt.Rows.Add(r); }
private void SubTotal(string txt, decimal t1, decimal t2, decimal t3, decimal t4, decimal t5, decimal t6, decimal t7, decimal t8, decimal t9, decimal t10) { TableRow r = new TableRow(); TableCell c; c = Rpt.Foot(); c.Text = txt; c.ColumnSpan = 4; c.HorizontalAlign = HorizontalAlign.Left; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t1); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = " "; c.HorizontalAlign = HorizontalAlign.Left; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t2); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = " "; c.HorizontalAlign = HorizontalAlign.Left; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t3); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = " "; c.HorizontalAlign = HorizontalAlign.Left; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t4); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = " "; c.HorizontalAlign = HorizontalAlign.Left; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t7); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t8); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t5); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t6); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t9); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t10); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = " "; c.HorizontalAlign = HorizontalAlign.Left; r.Cells.Add(c); rpt.Rows.Add(r); }
private void SubTotal(string txt, decimal t1, decimal t2, decimal t3, decimal t4, decimal t5, decimal t6, decimal t7, decimal tBunga, decimal tDiskonTambahan, decimal tHargaGimmick, decimal tHargaLainLain, decimal t8) { TableRow r = new TableRow(); TableCell c; c = Rpt.Foot(); c.Text = txt; c.ColumnSpan = 10; c.HorizontalAlign = HorizontalAlign.Left; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t1); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t2); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t3); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(tBunga); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(tDiskonTambahan); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); //c = Rpt.Foot(); //c.Text = Cf.Num(tHargaGimmick); //c.HorizontalAlign = HorizontalAlign.Right; //r.Cells.Add(c); //c = Rpt.Foot(); //c.Text = Cf.Num(tHargaLainLain); //c.HorizontalAlign = HorizontalAlign.Right; //r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t4); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t8); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t7); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t5); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = Cf.Num(t6); c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); c = Rpt.Foot(); c.Text = ""; c.ColumnSpan = 10; c.HorizontalAlign = HorizontalAlign.Right; r.Cells.Add(c); rpt.Rows.Add(r); }