public static Print_quotationItemsList GetData(string p_id) { Print_quotationItemsList list = new Print_quotationItemsList(); // List <Quotationitems> inv_item_list = new List <Quotationitems>(); //if (Customise.Invoice_poid_dcid == true) //{ // inv_item_list = CQuotationitems_exten.FKId(p_id, new DAL()); //} //if ((Customise.Invoice_pono_dcno == true) || (Customise.Invoice_Without_podc == true)) //{ inv_item_list = CQuotationitems_exten.FKNo(p_id, new DAL()); //} for (int r = 0; r <= inv_item_list.Count - 1; r++) { Print_quotationitemsRow row = new Print_quotationitemsRow(); // row.QUOTATION_ITEM_ID = inv_item_list[r].Quotationitems_id; row.QUOTATION_ID = inv_item_list[r].Quotation_id; row.SL_NO = (r + 1).ToString(); row.PRODUCT_ID = Checks.RemoveEscape(inv_item_list[r].Product_id); row.HSN_CODE_ID = Ccoreplus.GetHsncode_name(inv_item_list[r].Product_id); row.SIZES_ID = inv_item_list[r].Sizes_id; row.QTY = ConvertTO.DecimalToS(inv_item_list[r].Qty); row.PRICE = ConvertTO.Decimal2d(inv_item_list[r].Price.ToString()); decimal vAmount = 0M; decimal vTaxableValue = 0M; decimal vQty = Global.ToDecimal(row.QTY); decimal vPrice = Global.ToDecimal(row.PRICE); vTaxableValue = vQty * vPrice; vAmount = vTaxableValue; row.TAXABLEVALUE = ConvertTO.Decimal2d(vTaxableValue.ToString()); row.SUB_TOTAL = ConvertTO.Decimal2d(vAmount.ToString()); // list.Add(row); // } // return(list); }
public static Print_invoiceItemsList GetData(string p_id) { Print_invoiceItemsList list = new Print_invoiceItemsList(); // List <Upvc_invoiceitems> inv_item_list = CUpvc_invoiceitems_exten.FKId(p_id, new DAL()); for (int r = 0; r <= inv_item_list.Count - 1; r++) { Print_invoiceitemsRow row = new Print_invoiceitemsRow(); // row.INVOICE_ITEM_ID = inv_item_list[r].Upvc_invoiceitems_id; row.INVOICE_ID = inv_item_list[r].Upvc_invoice_id; row.SL_NO = (r + 1).ToString(); row.PRODUCT_ID = inv_item_list[r].Product_id; row.HSN_CODE_ID = Ccoreplus.GetHsncode_name(inv_item_list[r].Product_id); row.PCRATE = inv_item_list[r].Pcrate; row.MSM = inv_item_list[r].Msm; row.QTY = ConvertTO.DecimalToS(inv_item_list[r].Qty.ToString()); row.WIDTHS = ConvertTO.DecimalToS(inv_item_list[r].Widths.ToString()); row.HEIGTHS = ConvertTO.DecimalToS(inv_item_list[r].Heights.ToString()); row.AREASQ = ConvertTO.DecimalToS(inv_item_list[r].TotalAreasq.ToString()); row.PRICE = ConvertTO.DecimalToS(inv_item_list[r].Price.ToString()); Upvc_invoiceitems obj = new Upvc_invoiceitems() { Pcrate = row.PCRATE, Msm = row.MSM, Qty = ConvertTO.Decimal(row.QTY), Widths = ConvertTO.Decimal(row.WIDTHS), Heights = ConvertTO.Decimal(row.HEIGTHS), Price = ConvertTO.Decimal(row.PRICE), Cgst_percent = inv_item_list[r].Cgst_percent, Sgst_percent = inv_item_list[r].Sgst_percent, Igst_percent = inv_item_list[r].Igst_percent }; UpvcCalculation.Calculate(obj); row.TAXABLEVALUE = ConvertTO.Decimal2d(obj.Taxable_amount.ToString()); row.CGST_PERCENT = ConvertTO.DecimalToS(obj.Cgst_percent.ToString()); row.CGST_AMOUNT = ConvertTO.Decimal2d(obj.Cgst_amount.ToString()); row.SGST_PERCENT = ConvertTO.DecimalToS(obj.Sgst_percent.ToString()); row.SGST_AMOUNT = ConvertTO.Decimal2d(obj.Sgst_amount.ToString()); row.SUB_TOTAL = ConvertTO.Decimal2d((obj.Taxable_amount + obj.Cgst_amount + obj.Sgst_amount + obj.Igst_amount).ToString()); // list.Add(row); // } // return(list); }
void FrmLookup_LookupSelected(object sender, EventArgs e) { System.Data.DataRow vEntity = frmLookup.SelectedEntity; switch (lookupColName) { case UPVC_INVOICEITEMS.PRODUCT_ID: if (vEntity == null) { editgrid[UPVC_INVOICEITEMS.PRODUCT_ID, lookupRow].Value = ""; } else { editgrid[UPVC_INVOICEITEMS.PRODUCT_ID, lookupRow].Value = vEntity[PRODUCT.PRODUCT_NAME]; editgrid[UPVC_INVOICEITEMS.SGST_PERCENT, lookupRow].Value = Ccoreplus.GetSgst_Name(vEntity[PRODUCT.PRODUCT_NAME] + ""); editgrid[UPVC_INVOICEITEMS.CGST_PERCENT, lookupRow].Value = Ccoreplus.GetCgst_Name(vEntity[PRODUCT.PRODUCT_NAME] + ""); } break; case UPVC_INVOICEITEMS.PCRATE: if (vEntity == null) { editgrid[UPVC_INVOICEITEMS.PCRATE, lookupRow].Value = ""; } else { editgrid[UPVC_INVOICEITEMS.PCRATE, lookupRow].Value = vEntity[UPVC_INVOICEITEMS.PCRATE]; } break; case UPVC_INVOICEITEMS.MSM: if (vEntity == null) { editgrid[UPVC_INVOICEITEMS.MSM, lookupRow].Value = ""; } else { editgrid[UPVC_INVOICEITEMS.MSM, lookupRow].Value = vEntity[UPVC_INVOICEITEMS.MSM]; } break; } }
void FrmLookup_LookupSelected(object sender, EventArgs e) { System.Data.DataRow vEntity = frmLookup.SelectedEntity; switch (lookupColName) { //case PURCHASEITEMS.PO_ID: // if (vEntity == null) // { // editgrid[PURCHASEITEMS.PO_ID, lookupRow].Value = ""; // } // else // { // if (Customise.Purchase_poid_dcid == true) // { // editgrid[PURCHASEITEMS.PO_ID, lookupRow].Value = vEntity[PO.PO_NO]; // if (vEntity[PO.PO_NO] + "" != Core.Without_Po) // { // editgrid[PURCHASEITEMS.DC_ID, lookupRow].Value = vEntity[DC.DC_NO]; // editgrid[PURCHASEITEMS.DCITEMS_ID, lookupRow].Value = vEntity[DCITEMS.DCITEMS_ID]; // editgrid[PURCHASEITEMS.PRODUCT_ID, lookupRow].Value = vEntity[DCITEMS.PRODUCT_ID]; // editgrid[PURCHASEITEMS.QTY, lookupRow].Value = vEntity[DCITEMS.QTY]; // editgrid[PURCHASEITEMS.PRICE, lookupRow].Value = vEntity[POITEMS.PRICE]; // if (txt_taxtype_id.Text == "SGST") // { // editgrid[PURCHASEITEMS.SGST_PERCENT, lookupRow].Value = Ccoreplus.GetSgst_Name(vEntity[PRODUCT.PRODUCT_ID] + ""); // editgrid[PURCHASEITEMS.CGST_PERCENT, lookupRow].Value = Ccoreplus.GetCgst_Name(vEntity[PRODUCT.PRODUCT_ID] + ""); // } // else if (txt_taxtype_id.Text == "IGST") // { // editgrid[PURCHASEITEMS.IGST_PERCENT, lookupRow].Value = Ccoreplus.GetIgst_Name(vEntity[PRODUCT.PRODUCT_ID] + ""); // } // editgrid.CurrentCell = editgrid[PURCHASEITEMS.PRICE, lookupRow]; // } // else // { // editgrid.CurrentCell = editgrid[PURCHASEITEMS.PO_ID, lookupRow]; // } // } // } // break; //// //case PURCHASEITEMS.DC_ID: // if (vEntity == null) // { // editgrid[PURCHASEITEMS.DC_ID, lookupRow].Value = ""; // } // else // { // if (Customise.Purchase_poid_dcid == true) // { // editgrid[PURCHASEITEMS.DC_ID, lookupRow].Value = vEntity[DC.DC_NO]; // if (vEntity[DCITEMS.DC_NO] + "" != Core.Without_Dc) // { // editgrid[PURCHASEITEMS.PO_ID, lookupRow].Value = Core.Without_Po; // //editgrid[PURCHASEITEMS.DCITEM_ID, lookupRow].Value = vEntity[Dc_item.DC_ITEM_ID]; // editgrid[PURCHASEITEMS.PRODUCT_ID, lookupRow].Value = vEntity[DCITEMS.PRODUCT_ID]; // editgrid[PURCHASEITEMS.QTY, lookupRow].Value = vEntity[DCITEMS.REFERED_QTY]; // editgrid[PURCHASEITEMS.PRICE, lookupRow].Value = vEntity[POITEMS.PRICE]; // editgrid.CurrentCell = editgrid[PURCHASEITEMS.PRODUCT_ID, lookupRow]; // } // else // { // editgrid.CurrentCell = editgrid[PURCHASEITEMS.DC_ID, lookupRow]; // } // } // } // break; case PURCHASEITEMS.PRODUCT_ID: if (vEntity == null) { editgrid[PURCHASEITEMS.PRODUCT_ID, lookupRow].Value = ""; } else { //if (Customise.Purchase_poid_dcid == true) //{ // editgrid[PURCHASEITEMS.PO_ID, lookupRow].Value = Core.Without_Po; // editgrid[PURCHASEITEMS.DC_ID, lookupRow].Value = Core.Without_Dc; //} editgrid[PURCHASEITEMS.PRODUCT_ID, lookupRow].Value = vEntity[PRODUCT.PRODUCT_NAME]; editgrid.CurrentCell = editgrid[PURCHASEITEMS.PRODUCT_ID, lookupRow]; if (txt_taxtype_id.Text == "SGST") { editgrid[PURCHASEITEMS.SGST_PERCENT, lookupRow].Value = Ccoreplus.GetSgst_Name(vEntity[PRODUCT.PRODUCT_ID] + ""); editgrid[PURCHASEITEMS.CGST_PERCENT, lookupRow].Value = Ccoreplus.GetCgst_Name(vEntity[PRODUCT.PRODUCT_ID] + ""); } else if (txt_taxtype_id.Text == "IGST") { editgrid[PURCHASEITEMS.IGST_PERCENT, lookupRow].Value = Ccoreplus.GetIgst_Name(vEntity[PRODUCT.PRODUCT_ID] + ""); } } break; } }
private static Print_CreditnoteList ReturnCreditnote(string Id, List <PrintCopies> printcopies) { Creditnote invoice = CCreditnote_exten.PKId(Id); List <Creditnoteitems> invoiceitems = CCreditnoteitems_exten.FKId(Id); Company company = CCompany_exten.PKId(Current.Company_id); Party party = CParty_exten.SearchName(invoice.Party_id, new DAL()); Company_bank cmpbank = CCompany_bank_exten.PKId("1"); Print_CreditnoteList list = new Print_CreditnoteList(); for (int i = 0; i < printcopies.Count; i++) { Print_Creditnote row = new Print_Creditnote(); row.COPY_NAME = printcopies[i].Copies; row.SALES_TYPE = invoice.Salestype_id; row.TAX_TYPE = invoice.Taxtype_id; row.COMPANY_NAME = company.Display_name; row.COMPANY_ADDRESS_1 = company.Street1 + ", " + company.Street2; row.COMPANY_ADDRESS_2 = company.City_id + "- " + company.Pincode_id + ", " + company.State_id + " - (" + Ccoreplus.GetStateCode(company.State_id) + ") . Email :- " + company.Email; row.COMPANY_PHONE = company.Phone; row.COMPANY_CELL1 = company.Cell1; row.COMPANY_CELL2 = company.Cell2; row.COMPANY_EMAIL = company.Email; row.COMPANY_WEBSITE = company.Website; if (company.Gstin.Trim().Length != 0) { row.COMPANY_GSTIN = "GSTIN : " + company.Gstin; if (company.Cell1.Trim().Length != 0) { row.COMPANY_GSTIN = "GSTIN : " + company.Gstin + " , Mobile : " + company.Cell1; if (company.Cell2.Trim().Length != 0) { row.COMPANY_GSTIN = "GSTIN : " + company.Gstin + " , Mobile : " + company.Cell1 + ", " + company.Cell2; } } } else { row.COMPANY_GSTIN = ""; } row.CREDITNOTE_ID = invoice.Creditnote_id; row.CREDITNOTE_NO = ":. " + invoice.Creditnote_no; row.CREDITNOTE_DATE = ": " + ConvertTO.Date2S(invoice.Creditnote_date); row.PARTY_NAME = party.Party_name; row.PARTY_STREET_1 = party.Street_1 + ","; if (party.Street_2.Trim().Length != 0) { row.PARTY_STREET_2 = party.Street_2 + ","; } if (party.Pincode_id.Trim().Length == 6) { row.PARTY_CITY = party.City_id + " - :" + party.Pincode_id + ","; } else { row.PARTY_CITY = party.City_id + ","; } row.PARTY_STATE = party.State_id + " - (" + Ccoreplus.GetStateCode(party.State_id) + ")."; row.PARTY_STATE_CODE = ""; row.PARTY_COUNTRY = party.Country_id; row.PARTY_PINCODE = party.Pincode_id; if (party.Gstin.Trim().Length != 0) { row.PARTY_GSTIN = "GSTIN :" + party.Gstin; } row.TOTAL_QTY = invoice.Total_qty.ToString(); row.TAXABLE_VALUE = invoice.Total_taxable_amount.ToString(); if (Customised.TaxType == Core.SGST) { row.CGST_PERCENT = " Add CGST " + (invoiceitems[0].Cgst_percent.ToString()) + " %"; row.SGST_PERCENT = " Add SGST " + (invoiceitems[0].Sgst_percent.ToString()) + " %"; row.TOTAL_CGST = invoice.Total_cgst.ToString(); row.TOTAL_SGST = invoice.Total_sgst.ToString(); } else if (Customised.TaxType == Core.IGST) { row.CGST_PERCENT = ""; row.SGST_PERCENT = " Add IGST " + (invoiceitems[0].Igst_percent.ToString()) + " %"; row.TOTAL_CGST = ""; row.TOTAL_SGST = invoice.Total_igst.ToString(); } row.TOTAL_SUB = invoice.Grandtotal.ToString(); row.LEDGER = CLedger_exten.GetName_Id(invoice.Ledger_id); if (invoice.Additional != 0) { row.ADDITIONAL = invoice.Additional.ToString(); } else { row.ADDITIONAL = ""; } row.ROUNDS = invoice.Rounds.ToString(); row.GSTTOTAL = invoice.Gsttotal.ToString(); row.GRANDTOTAL = invoice.Grandtotal.ToString(); row.AMOUNT_IN_WORDS = "Rupees : " + Global.AmountInWords(invoice.Grandtotal); row.NOTES = invoice.Notes; row.ENTRY_BY = invoice.User_id; row.FORSIGN = company.Display_name; if (Customised.InvoiceWithBankDetails) { row.ACCOUNT_NO = "A/C NO : " + cmpbank.Account_number; row.IFSC_CODE = "IFSC CODE : " + cmpbank.Ifsc_code; row.BANK_NAME = "BANK NAME : " + cmpbank.Company_bank_name; row.BRANCH = "BRANCH : " + cmpbank.Branch_name; } else { row.ACCOUNT_NO = ""; row.IFSC_CODE = ""; row.BANK_NAME = ""; row.BRANCH = ""; } row.TERMS_1 = Message.TERMS_1; row.TERMS_2 = Message.TERMS_2; row.TERMS_3 = Message.TERMS_3; row.TERMS_4 = Customised.Terms_4; list.Add(row); } return(list); }
private static Print_QuotationList GetData(string p_id, List <PrintCopies> printcopies) { Upvc_Quotation quote_obj = CUpvc_Quotation_exten.PKId(p_id, new DAL()); Print_QuotationList list = new Print_QuotationList(); for (int i = 0; i < printcopies.Count; i++) { Print_QuotationRow row = new Print_QuotationRow(); row.COPIES = printcopies[i].Copies; row.QUOTATION_ID = p_id; //Company obj = Company.SetCompany(Current.Company_id); Company obj = CCompany_exten.PKId(Current.Company_id); row.COMPANY_NAME = obj.Display_name.ToUpper(); row.ADDRESS1 = obj.Street1 + ", " + obj.Street2 + ", " + obj.City_id + " - " + obj.Pincode_id + " , " + obj.State_id + ". State code - 33"; row.ADDRESS2 = "Email : " + obj.Email + " www.smsupvc.com "; row.COMPANY_GST = "GSTIN : " + obj.Gstin; row.SALES_TYPE = "Create Quotation : " + quote_obj.Salestype_id; row.QUOTATION_NO = "Serial no.of Quotation : " + quote_obj.Quotation_no + " / " + CAcy_exten.GetName_Id(quote_obj.Acy_id); row.QUOTATION_DATE = "Invoice Date : " + ConvertTO.Date2S(quote_obj.Quotation_date); row.TRANSPORT = "Mode of Transport : " + quote_obj.Transport_id; row.VEHICLE_NO = ""; row.PLACE = "Place of Supply : " + Ccoreplus.GetCity_id(quote_obj.Delivered_id); row.PARTY_NAME = quote_obj.Party_id; Party party_obj = CParty_exten.SearchName(quote_obj.Party_id, new DAL()); if (party_obj.Party_name != null) { row.STREET1 = party_obj.Street_1 + ", " + party_obj.Street_2; row.STREET2 = ""; row.CITY = party_obj.City_id + " - " + party_obj.Pincode_id + " , " + party_obj.State_id + ", State Code -" + Ccoreplus.GetStateCode(party_obj.State_id); row.STATE = ""; row.COUNTRY = party_obj.Country_id; row.PINCODE = ""; if (party_obj.Gstin.Trim().Length != 0) { row.GSTIN = "TIN No : " + party_obj.Gstin; } if (party_obj.Gstin.Trim().Length != 0) { row.GSTIN += ", GSTIN No : " + party_obj.Gstin; } } row.SHIPPING_NAME = CParty_exten.GetName_Id(quote_obj.Delivered_id); Party shipping_obj = CParty_exten.PKId(quote_obj.Delivered_id, new DAL()); if (shipping_obj.Party_name != null) { row.SHIPPING_STREET1 = shipping_obj.Street_1 + ", " + shipping_obj.Street_2; row.SHIPPING_STREET2 = ""; row.SHIPPING_CITY = shipping_obj.City_id + " - " + shipping_obj.Pincode_id + " , " + shipping_obj.State_id + ", State Code -" + Ccoreplus.GetStateCode(shipping_obj.State_id); row.SHIPPING_STATE = ""; row.SHIPPING_COUNTRY = shipping_obj.Country_id; row.SHIPPING_PINCODE = ""; if (shipping_obj.Gstin.Trim().Length != 0) { row.SHIPPING_GSTIN += ", GSTIN No : " + shipping_obj.Gstin; } } row.TOTAL_QTY = ConvertTO.DecimalToS(quote_obj.Total_qty + ""); row.TOTAL_AREASQ = ConvertTO.DecimalToS(quote_obj.Total_areasq + ""); row.TAXABLE_VALUE = ConvertTO.Decimal2d(quote_obj.Total_taxable_amount + ""); List <Upvc_Quotationitems> klist = CUpvc_Quotationitems_exten.FKId(p_id, new DAL()); row.LBL_SGST = " Add SGST tax @ " + ConvertTO.DecimalToS(klist[0].Sgst_percent.ToString()) + " %"; row.TOTAL_SGST = ConvertTO.Decimal2d(quote_obj.Total_sgst + ""); row.LBL_CGST = " Add CGST tax @ " + ConvertTO.DecimalToS(klist[0].Cgst_percent.ToString()) + " %"; row.TOTAL_CGST = ConvertTO.Decimal2d(quote_obj.Total_cgst + ""); row.TOTAL_SUB = (ConvertTO.Decimal(row.TAXABLE_VALUE) + ConvertTO.Decimal(row.TOTAL_CGST) + ConvertTO.Decimal(row.TOTAL_SGST)).ToString(); if (quote_obj.Ledger_id != null) { if (quote_obj.Ledger_id.Trim() != "") { row.LEDGER = " " + quote_obj.Ledger_id; row.ADDITIONAL = quote_obj.Additional + ""; } else { row.LEDGER = ""; row.ADDITIONAL = ""; } } row.ROUNDS = quote_obj.Rounds + ""; row.GSTTOTAL = quote_obj.Gsttotal + ""; row.GRANDTOTAL = quote_obj.Grandtotal + ""; if (quote_obj.Notes != null) { if (quote_obj.Notes.Trim().Length != 0) { row.NOTES = "Notes : " + quote_obj.Notes; } } row.AMOUNT_IN_WORDS = "Rupees : " + Global.AmountInWords(Convert.ToDecimal(quote_obj.Grandtotal)); row.ENTRY_BY = quote_obj.User_id; list.Add(row); } return(list); }
public static Print_invoiceItemsList GetData(string p_id) { Print_invoiceItemsList list = new Print_invoiceItemsList(); // List <Purchaseitems> inv_item_list = new List <Purchaseitems>(); if (Customise.Purchase_poid_dcid == true) { inv_item_list = CPurchaseitems_exten.FKId(p_id, new DAL()); } if ((Customise.Purchase_pono_dcno == true) || (Customise.Purchase_Without_podc == true)) { inv_item_list = CPurchaseitems_exten.FKNo(p_id, new DAL()); } for (int r = 0; r <= inv_item_list.Count - 1; r++) { Print_invoiceitemsRow row = new Print_invoiceitemsRow(); // row.PURCHASE_ITEM_ID = inv_item_list[r].Purchaseitems_id; row.PURCHASE_ID = inv_item_list[r].Purchase_id; row.SL_NO = (r + 1).ToString(); if (inv_item_list[r].Po_id == "Without Po") { row.PO_ID = ""; } else { row.PO_ID = inv_item_list[r].Po_id; } if (inv_item_list[r].Dc_id == "0") { row.DC_ID = ""; } else { row.DC_ID = inv_item_list[r].Dc_id; } row.PRODUCT_ID = inv_item_list[r].Product_id; row.HSN_CODE_ID = Ccoreplus.GetHsncode_name(inv_item_list[r].Product_id); row.QTY = ConvertTO.DecimalToS(inv_item_list[r].Qty); row.PRICE = ConvertTO.Decimal2d(inv_item_list[r].Price.ToString()); decimal vAmount = 0M; decimal vTaxableValue = 0M; decimal vQty = Global.ToDecimal(row.QTY); decimal vPrice = Global.ToDecimal(row.PRICE); decimal vcgst_per = Global.ToDecimal(inv_item_list[r].Cgst_percent); decimal vsgst_per = Global.ToDecimal(inv_item_list[r].Sgst_percent); decimal vigst_per = Global.ToDecimal(inv_item_list[r].Igst_percent); vTaxableValue = vQty * vPrice; decimal vCGST = decimal.Round(((vTaxableValue * vcgst_per) / 100), 2); decimal vSGST = decimal.Round(((vTaxableValue * vsgst_per) / 100), 2); decimal vIGST = decimal.Round(((vTaxableValue * vigst_per) / 100), 2); vAmount = vTaxableValue + vCGST + vSGST + vIGST; row.TAXABLEVALUE = ConvertTO.Decimal2d(vTaxableValue.ToString()); row.CGST_PERCENT = ConvertTO.DecimalToS(vcgst_per.ToString()); row.CGST_AMOUNT = ConvertTO.Decimal2d(vCGST.ToString()); row.SGST_PERCENT = ConvertTO.DecimalToS(vsgst_per.ToString()); row.SGST_AMOUNT = ConvertTO.Decimal2d(vSGST.ToString()); row.IGST_PERCENT = ConvertTO.DecimalToS(vigst_per.ToString()); row.IGST_AMOUNT = ConvertTO.Decimal2d(vIGST.ToString()); row.SUB_TOTAL = ConvertTO.Decimal2d(vAmount.ToString()); // list.Add(row); // } // return(list); }
public static Print_invoiceItemsList GetData(string p_id) { Print_invoiceItemsList list = new Print_invoiceItemsList(); // List <Labouritems> inv_item_list = new List <Labouritems>(); inv_item_list = CLabouritems_exten.FKId(p_id); for (int r = 0; r <= inv_item_list.Count - 1; r++) { Print_invoiceitemsRow row = new Print_invoiceitemsRow(); // row.LABOUR_ITEM_ID = inv_item_list[r].Labouritems_id; row.LABOUR_ID = inv_item_list[r].Labour_id; row.SL_NO = (r + 1).ToString(); row.PO_NO = inv_item_list[r].Po_no; row.DC_NO = inv_item_list[r].Dc_no; row.PRODUCT_ID = inv_item_list[r].Product_id; row.HSN_CODE_ID = Ccoreplus.GetHsncode_name(inv_item_list[r].Product_id); if (inv_item_list[r].Sizes_id == "") { row.SIZES = ""; } else { row.SIZES = inv_item_list[r].Sizes_id; } if (inv_item_list[r].Qty == "0") { row.QTY = ""; } else { row.QTY = inv_item_list[r].Qty.ToString(); } if (inv_item_list[r].Price == 0) { row.PRICE = ""; } else { row.PRICE = ConvertTO.Decimal2d(inv_item_list[r].Price.ToString()); } decimal vAmount = 0M; decimal vTaxableValue = 0M; decimal vQty = ConvertTO.Decimal(row.QTY); decimal vPrice = Global.ToDecimal(row.PRICE); decimal vcgst_per = Global.ToDecimal(inv_item_list[r].Cgst_percent); decimal vsgst_per = Global.ToDecimal(inv_item_list[r].Sgst_percent); decimal vigst_per = Global.ToDecimal(inv_item_list[r].Igst_percent); vTaxableValue = vQty * vPrice; decimal vCGST = decimal.Round(((vTaxableValue * vcgst_per) / 100), 2); decimal vSGST = decimal.Round(((vTaxableValue * vsgst_per) / 100), 2); decimal vIGST = decimal.Round(((vTaxableValue * vigst_per) / 100), 2); vAmount = vTaxableValue + vCGST + vSGST + vIGST; if (vTaxableValue == 0) { row.TAXABLEVALUE = ""; } else { row.TAXABLEVALUE = ConvertTO.Decimal2d(vTaxableValue.ToString()); } if (vcgst_per == 0) { row.CGST_PERCENT = ""; } else { row.CGST_PERCENT = ConvertTO.DecimalToS(vcgst_per.ToString()); } if (vCGST == 0) { row.CGST_AMOUNT = ""; } else { row.CGST_AMOUNT = ConvertTO.Decimal2d(vCGST.ToString()); } if (vsgst_per == 0) { row.SGST_PERCENT = ""; } else { row.SGST_PERCENT = ConvertTO.DecimalToS(vsgst_per.ToString()); } if (vSGST == 0) { row.SGST_AMOUNT = ""; } else { row.SGST_AMOUNT = ConvertTO.Decimal2d(vSGST.ToString()); } if (vigst_per == 0) { row.IGST_PERCENT = ""; } else { row.IGST_PERCENT = ConvertTO.DecimalToS(vigst_per.ToString()); } if (vIGST == 0) { row.IGST_AMOUNT = ""; } else { row.IGST_AMOUNT = ConvertTO.Decimal2d(vIGST.ToString()); } if (vAmount == 0) { row.SUB_TOTAL = ""; } else { row.SUB_TOTAL = ConvertTO.Decimal2d(vAmount.ToString()); } // list.Add(row); // } // return(list); }