Ejemplo n.º 1
0
        private void AddTableDetails(int Month, Table aTable, EmployeeMonthlyTaxRecord monthRecs)
        {
            if (monthRecs != null)
            {
                //Totals
                aTable.AddCell(new Phrase(monthRecs.Month, tcFont));  //Col 0

                Cell A = new Cell(new Phrase(string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0:N0}", monthRecs.A), tcFont));
                A.HorizontalAlignment = Cell.ALIGN_RIGHT;
                aTable.AddCell(A);//Col 1

                Cell B = new Cell(new Phrase(string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0:N0}", monthRecs.B), tcFont));
                B.HorizontalAlignment = Cell.ALIGN_RIGHT;
                aTable.AddCell(B);//Col 2

                Cell C = new Cell(new Phrase(string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0:N0}", monthRecs.C), tcFont));
                C.HorizontalAlignment = Cell.ALIGN_RIGHT;
                aTable.AddCell(C);//Col 3

                Cell D = new Cell(new Phrase(string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0:N0}", monthRecs.D), tcFont));
                D.HorizontalAlignment = Cell.ALIGN_RIGHT;
                aTable.AddCell(D);//Col 4

                Cell E1 = new Cell(new Phrase(string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0:N0}", monthRecs.E1), tcFont));
                E1.HorizontalAlignment = Cell.ALIGN_RIGHT;
                aTable.AddCell(E1);//Col 5

                Cell E2 = new Cell(new Phrase(string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0:N0}", monthRecs.E2), tcFont));
                E2.HorizontalAlignment = Cell.ALIGN_RIGHT;
                aTable.AddCell(E2);//Col 6

                Cell E3 = new Cell(new Phrase(string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0:N0}", monthRecs.E3), tcFont));
                E3.HorizontalAlignment = Cell.ALIGN_RIGHT;
                aTable.AddCell(E3);//Col 7

                Cell F = new Cell(new Phrase(string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0:N0}", monthRecs.F), tcFont));
                F.HorizontalAlignment = Cell.ALIGN_RIGHT;
                aTable.AddCell(F);//Col 8

                Cell G = new Cell(new Phrase(string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0:N0}", monthRecs.G), tcFont));
                G.HorizontalAlignment = Cell.ALIGN_RIGHT;
                aTable.AddCell(G);//Col 9

                Cell H = new Cell(new Phrase(string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0:N0}", monthRecs.H), tcFont));
                H.HorizontalAlignment = Cell.ALIGN_RIGHT;
                aTable.AddCell(H);//Col 10

                Cell J = new Cell(new Phrase(string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0:N0}", monthRecs.J), tcFont));
                J.HorizontalAlignment = Cell.ALIGN_RIGHT;
                J.Colspan             = 2;
                aTable.AddCell(J);                                                                                                              //Col 11

                Cell K = new Cell(new Phrase(string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0:N0}", monthRecs.K), tcFont)); //Col 12
                K.HorizontalAlignment = Cell.ALIGN_RIGHT;
                aTable.AddCell(K);
            }
        }
Ejemplo n.º 2
0
        private List <EmployeeMonthlyTaxRecord> GetEmployeeMonthlyTax9B()
        {
            try
            {
                System.Globalization.DateTimeFormatInfo mfi = new
                                                              System.Globalization.DateTimeFormatInfo();

                List <EmployeeMonthlyTaxRecord> empTax = new List <EmployeeMonthlyTaxRecord>();

                List <EmployeeMonthlyTaxRecord> taxrec = rep.GetEmployeeMonthlyTaxRecord(current, _EmpNo, _year);

                foreach (EmployeeMonthlyTaxRecord pm in taxrec)
                {
                    EmployeeMonthlyTaxRecord tr = new EmployeeMonthlyTaxRecord();
                    //populate
                    tr.MonthInt = pm.MonthInt; // all periods = month
                    tr.Month    = mfi.GetAbbreviatedMonthName(tr.MonthInt);
                    tr.A        = pm.A;
                    tr.B        = pm.B;
                    tr.C        = pm.C;
                    //tr.D  = computed
                    //tr.D=rep.
                    tr.E2 = pm.E2;
                    tr.E3 = decimal.Parse(rep.SettingLookup("DEFCONTR"));
                    decimal maxSavingsPlan   = decimal.Parse(rep.SettingLookup("SPLANMAX"));
                    decimal contrSavingsPlan = rep.SavingsPlan(_EmployeeId, _EmpNo);
                    tr.F = Math.Min(maxSavingsPlan, contrSavingsPlan);
                    //tr.G = computed;
                    tr.H = pm.H;
                    //tr.J = pm.PayeTax;
                    tr.J  = pm.J;
                    tr.J1 = pm.J1;
                    //tr.K = computed

                    //add to list
                    empTax.Add(tr);
                }

                return(empTax);
            }
            catch (Exception ex)
            {
                Utils.ShowError(ex);
                return(null);
            }
        }