コード例 #1
0
        private void populateFormValue(AcroFields pdfFormFields)
        {
            MCompanyProfile cmp  = CMasterReference.Instance.CompanyProfile;
            MVTaxDocument   vm   = (MVTaxDocument)vw;
            MVTaxFormPP30   pp30 = vm.TaxFormPP30;

            //pdfFormFields.SetField("Text1.0", "0 1155 48000 18 6");
            pdfFormFields.SetField("Text1.0", CTaxDocumentUtil.FormatTaxIDField(cmp.TaxID));
            pdfFormFields.SetField("Text1.01", cmp.RegistrationName);
            pdfFormFields.SetField("Text1.3", cmp.RegistrationAddress);
            pdfFormFields.SetField("Text1.4", cmp.BuildingName);
            pdfFormFields.SetField("Text1.5", cmp.RoomNo);
            pdfFormFields.SetField("Text1.6", cmp.FloorNo);
            pdfFormFields.SetField("Text1.7", cmp.VillageName);
            pdfFormFields.SetField("Text1.8", cmp.HomeNo);
            pdfFormFields.SetField("Text1.9", cmp.Moo);
            pdfFormFields.SetField("Text1.10", cmp.Soi);
            pdfFormFields.SetField("Text1.11", cmp.Road);
            pdfFormFields.SetField("Text1.12", cmp.District);
            pdfFormFields.SetField("Text1.13", cmp.Town);
            pdfFormFields.SetField("Text1.14", cmp.Province);
            pdfFormFields.SetField("Text1.15", cmp.Zip);
            pdfFormFields.SetField("Text1.16", cmp.Telephone);

            pdfFormFields.SetField("Text1.22", vm.TaxYearBD);

            pdfFormFields.SetField("Text2.1", CTaxDocumentUtil.FormatNumberField(pp30.SaleAmt));
            pdfFormFields.SetField("Text2.2", CTaxDocumentUtil.FormatNumberField(pp30.SaleZeroPctAmt, "0 00"));
            pdfFormFields.SetField("Text2.3", CTaxDocumentUtil.FormatNumberField(pp30.SaleExemptAmt, "0 00"));
            pdfFormFields.SetField("Text2.4", CTaxDocumentUtil.FormatNumberField(pp30.SaleEligibleAmt, "0 00"));
            pdfFormFields.SetField("Text2.5", CTaxDocumentUtil.FormatNumberField(pp30.SaleVatAmt, "0 00"));

            pdfFormFields.SetField("Text2.6", CTaxDocumentUtil.FormatNumberField(pp30.PurchaseEligibleAmt));
            pdfFormFields.SetField("Text2.7", CTaxDocumentUtil.FormatNumberField(pp30.PurchaseVatAmt));

            pdfFormFields.SetField("Text2.8", CTaxDocumentUtil.FormatNumberField(pp30.VatClaimAmt));
            pdfFormFields.SetField("Text2.9", CTaxDocumentUtil.FormatNumberField(pp30.VatExtraAmt));
            pdfFormFields.SetField("Text2.10", CTaxDocumentUtil.FormatNumberField(pp30.VatPreviousFwdAmt));

            pdfFormFields.SetField("Text2.11", CTaxDocumentUtil.FormatNumberField(pp30.VatClaimTotalAmt));
            pdfFormFields.SetField("Text2.12", CTaxDocumentUtil.FormatNumberField(pp30.VatExtraTotalAmt));

            pdfFormFields.SetField("Text2.13", CTaxDocumentUtil.FormatNumberField(pp30.AdditionalAmt));
            pdfFormFields.SetField("Text2.14", CTaxDocumentUtil.FormatNumberField(pp30.PenaltyAmt));

            pdfFormFields.SetField("Text2.15", CTaxDocumentUtil.FormatNumberField(pp30.VatClaimGrandAmt));
            pdfFormFields.SetField("Text2.16", CTaxDocumentUtil.FormatNumberField(pp30.VatExtraGrandAmt));

            int month    = CUtil.StringToInt(vm.TaxMonth);
            int monthIdx = monthMap[month];

            pdfFormFields.SetField("Radio Button3", monthIdx.ToString(), true);
        }
コード例 #2
0
        private void populateCoverFormValue(AcroFields pdfFormFields, int category)
        {
            pdfFormFields.SetField("Text1.0", CTaxDocumentUtil.FormatTaxIDField(company.TaxID));
            pdfFormFields.SetField("Text1.2", company.RegistrationName);
            pdfFormFields.SetField("Text1.3", company.BuildingName);
            pdfFormFields.SetField("Text1.4", company.RoomNo);
            pdfFormFields.SetField("Text1.5", company.FloorNo);
            pdfFormFields.SetField("Text1.6", company.VillageName);
            pdfFormFields.SetField("Text1.7", company.HomeNo);
            pdfFormFields.SetField("Text1.8", company.Moo);
            pdfFormFields.SetField("Text1.9", company.Soi);
            pdfFormFields.SetField("Text1.11", company.Road);
            pdfFormFields.SetField("Text1.12", company.District);
            pdfFormFields.SetField("Text1.13", company.Town);
            pdfFormFields.SetField("Text1.14", company.Province);
            pdfFormFields.SetField("Text1.15", company.Zip);
            pdfFormFields.SetField("Text1.16", company.Telephone);

            int idx = 0;

            if (taxDocType == TaxDocumentType.TaxDocRev3)
            {
                pdfFormFields.SetField("Radio Button0", "0", true);
                //pdfFormFields.SetField("Radio Button2", "0", true);
                pdfFormFields.SetField("Radio Button3", "0", true);

                pdfFormFields.SetField("Text1.18", actualView.TaxYearBD);
                idx = 1;
            }
            else
            {
                //53
                //pdfFormFields.SetField("Radio Button0", "0", true);
                pdfFormFields.SetField("Radio Button2", "0", true);
                pdfFormFields.SetField("Radio Button3", "0", true);

                pdfFormFields.SetField("Text1.17", actualView.TaxYearBD);
                idx = 0;
            }

            int month    = CUtil.StringToInt(actualView.TaxMonth);
            int monthIdx = monthMap[month][idx];

            pdfFormFields.SetField("Radio Button10", monthIdx.ToString(), true);


            pdfFormFields.SetField("Text1.19", suppliers.Count.ToString());
            pdfFormFields.SetField("Text1.20", pages.Count.ToString());

            pdfFormFields.SetField("Text2.1", CTaxDocumentUtil.FormatNumberField(actualView.ExpenseAmount));
            pdfFormFields.SetField("Text2.2", CTaxDocumentUtil.FormatNumberField(actualView.WhAmount));
            pdfFormFields.SetField("Text2.4", CTaxDocumentUtil.FormatNumberField(actualView.WhAmount));
        }
コード例 #3
0
        private void populateDetailFormValue(AcroFields pdfFormFields, int category, int pageNo, int pageCount, CTaxFormPageRv3_53 page)
        {
            String fldName = getFormFieldName(-1, -1, "CompanyTaxID");

            pdfFormFields.SetField(fldName, CTaxDocumentUtil.FormatTaxIDField(company.TaxID));

            fldName = getFormFieldName(-1, -1, "SheetNo");
            pdfFormFields.SetField(fldName, pageNo.ToString());

            fldName = getFormFieldName(-1, -1, "TotalSheet");
            pdfFormFields.SetField(fldName, pageCount.ToString());

            fldName = getFormFieldName(-1, -1, "TotalExpenseAmount");
            pdfFormFields.SetField(fldName, CTaxDocumentUtil.FormatNumberField(actualView.ExpenseAmount));

            fldName = getFormFieldName(-1, -1, "TotalWhAmount");
            pdfFormFields.SetField(fldName, CTaxDocumentUtil.FormatNumberField(actualView.WhAmount));


            int grpNo = 0;

            foreach (CTaxFormGroupBySupplierRv3_53 grp in page.Groups)
            {
                currSeq++;

                fldName = getFormFieldName(grpNo, -1, "SupplierTaxID");
                if (taxDocType == TaxDocumentType.TaxDocRev3)
                {
                    pdfFormFields.SetField(fldName, CTaxDocumentUtil.FormatTaxIDField(grp.TaxID));
                }
                else
                {
                    //53
                    pdfFormFields.SetField(fldName, CTaxDocumentUtil.FormatTaxIDField2(grp.TaxID));
                }

                fldName = getFormFieldName(grpNo, -1, "SupplierAddress");
                pdfFormFields.SetField(fldName, grp.Address);

                if (taxDocType == TaxDocumentType.TaxDocRev3)
                {
                    String[] s = CTaxDocumentUtil.GetNameLastname(grp.Name);
                    fldName = getFormFieldName(grpNo, -1, "SupplierName");
                    pdfFormFields.SetField(fldName, s[0]);

                    fldName = getFormFieldName(grpNo, -1, "SupplierLastName");
                    pdfFormFields.SetField(fldName, s[1]);
                }
                else
                {
                    //53
                    fldName = getFormFieldName(grpNo, -1, "SupplierName");
                    pdfFormFields.SetField(fldName, grp.Name);
                }

                fldName = getFormFieldName(grpNo, -1, "SeqNo");
                pdfFormFields.SetField(fldName, currSeq.ToString());

                int j = 0;
                foreach (MVTaxFormPRV3_53 row in grp.WhItems)
                {
                    whAmt      = whAmt + CUtil.StringToDouble(row.WhAmount);
                    expenseAmt = expenseAmt + CUtil.StringToDouble(row.ExpenseAmt);

                    fldName = getFormFieldName(grpNo, j, "DocumentDate");
                    pdfFormFields.SetField(fldName, "  " + row.DocumentDateFmt);

                    fldName = getFormFieldName(grpNo, j, "WhPayType");
                    pdfFormFields.SetField(fldName, " " + row.WhPayType);

                    fldName = getFormFieldName(grpNo, j, "WhGroupDesc");
                    pdfFormFields.SetField(fldName, row.WhGroupDesc);

                    fldName = getFormFieldName(grpNo, j, "WhPct");
                    pdfFormFields.SetField(fldName, row.WhPct);

                    fldName = getFormFieldName(grpNo, j, "WhAmount");
                    pdfFormFields.SetField(fldName, CTaxDocumentUtil.FormatNumberField(row.WhAmount));

                    fldName = getFormFieldName(grpNo, j, "ExpenseAmt");
                    pdfFormFields.SetField(fldName, CTaxDocumentUtil.FormatNumberField(row.ExpenseAmt));

                    j++;
                }

                grpNo++;
            }

            fldName = getFormFieldName(-1, -1, "TotalExpenseAmount");
            pdfFormFields.SetField(fldName, CTaxDocumentUtil.FormatNumberField(expenseAmt.ToString()));

            fldName = getFormFieldName(-1, -1, "TotalWhAmount");
            pdfFormFields.SetField(fldName, CTaxDocumentUtil.FormatNumberField(whAmt.ToString()));
        }
コード例 #4
0
        private void populateDetailFormValue(AcroFields pdfFormFields, int category, int pageNo, int pageCount, CTaxFormPageRv1 page)
        {
            String fldName = getFormFieldName(-1, -1, "CompanyTaxID");

            pdfFormFields.SetField(fldName, CTaxDocumentUtil.FormatTaxIDField(company.TaxID));

            fldName = getFormFieldName(-1, -1, "SheetNo");
            pdfFormFields.SetField(fldName, pageNo.ToString());

            fldName = getFormFieldName(-1, -1, "TotalSheet");
            pdfFormFields.SetField(fldName, pageCount.ToString());

            fldName = getFormFieldName(-1, -1, "TotalExpenseAmount");
            pdfFormFields.SetField(fldName, CTaxDocumentUtil.FormatNumberField(actualView.ExpenseAmount));

            fldName = getFormFieldName(-1, -1, "TotalWhAmount");
            pdfFormFields.SetField(fldName, CTaxDocumentUtil.FormatNumberField(actualView.WhAmount));

            fldName = getFormFieldName(-1, -1, "Condition");
            pdfFormFields.SetField(fldName, "0");

            int grpNo = 0;

            foreach (CTaxFormGroupByEmployeeRv1 grp in page.Groups)
            {
                currSeq++;

                fldName = getFormFieldName(grpNo, 0, "SupplierTaxID");
                pdfFormFields.SetField(fldName, CTaxDocumentUtil.FormatTaxIDField(grp.TaxID));

                String[] s = CTaxDocumentUtil.GetNameLastname(grp.Name);
                fldName = getFormFieldName(grpNo, 0, "SupplierName");
                pdfFormFields.SetField(fldName, s[0]);

                fldName = getFormFieldName(grpNo, 0, "SupplierLastName");
                pdfFormFields.SetField(fldName, s[1]);

                fldName = getFormFieldName(grpNo, 0, "SeqNo");
                pdfFormFields.SetField(fldName, currSeq.ToString());

                int j = 0;
                foreach (MVTaxFormPRV1 row in grp.WhItems)
                {
                    whAmt      = whAmt + CUtil.StringToDouble(row.WhAmount);
                    expenseAmt = expenseAmt + CUtil.StringToDouble(row.ExpenseAmt);

                    fldName = getFormFieldName(grpNo, j, "PayrollDate");
                    pdfFormFields.SetField(fldName, "  " + row.DocumentDateFmt);

                    fldName = getFormFieldName(grpNo, j, "WhAmount");
                    pdfFormFields.SetField(fldName, CTaxDocumentUtil.FormatNumberField(row.WhAmount));

                    fldName = getFormFieldName(grpNo, j, "ExpenseAmt");
                    pdfFormFields.SetField(fldName, CTaxDocumentUtil.FormatNumberField(row.ExpenseAmt));

                    fldName = getFormFieldName(grpNo, j, "Condition");
                    pdfFormFields.SetField(fldName, "  1");

                    j++;
                }

                grpNo++;
            }

            fldName = getFormFieldName(-1, -1, "TotalExpenseAmount");
            pdfFormFields.SetField(fldName, CTaxDocumentUtil.FormatNumberField(expenseAmt.ToString()));

            fldName = getFormFieldName(-1, -1, "TotalWhAmount");
            pdfFormFields.SetField(fldName, CTaxDocumentUtil.FormatNumberField(whAmt.ToString()));
        }