Beta Release 2.1.0.4-1

Sales Parts,Sales Serrice, Sales Vehile
This commit is contained in:
2023-05-06 23:46:46 +05:30
parent b3451c485b
commit 35206614ef
9 changed files with 151 additions and 98 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+151 -98
View File
@@ -112,6 +112,7 @@ namespace TallyDataTool
cbTransactionTypes.Items.Add("KTM Parts Sales"); cbTransactionTypes.Items.Add("KTM Parts Sales");
cbTransactionTypes.Items.Add("Chetak Vehicle Sales"); cbTransactionTypes.Items.Add("Chetak Vehicle Sales");
cbTransactionTypes.Items.Add("Chetak Parts Sales"); cbTransactionTypes.Items.Add("Chetak Parts Sales");
cbTransactionTypes.Items.Add("KTM Service Sales");
cbTransactionTypes.Items.Add("Chetak Service Sales"); cbTransactionTypes.Items.Add("Chetak Service Sales");
cbTransactionTypes.Items.Add("Chetak Receipt"); cbTransactionTypes.Items.Add("Chetak Receipt");
string pStrFilePath = Application.StartupPath + "/TallyDataConfig.ini"; string pStrFilePath = Application.StartupPath + "/TallyDataConfig.ini";
@@ -207,6 +208,15 @@ namespace TallyDataTool
procImportSpareSalesToTally("KTM"); procImportSpareSalesToTally("KTM");
} }
else if (cbTransactionTypes.Text == "KTM Vehicle Sales")
{
pSWTallySyncLogs.WriteLine("================================================================================");
pSWTallySyncLogs.WriteLine("Chetak Vehicle Sales Data Import on " + System.DateTime.Now.ToShortDateString() + " @ " + System.DateTime.Now.ToShortTimeString());
pSWTallySyncLogs.WriteLine("================================================================================");
procImportExcelDataToDatatable();
procImportExcelVehicleSalesToDataTable();
procImportVehicleSalesToTally("KTM");
}
else if (cbTransactionTypes.Text == "Chetak Vehicle Sales") else if (cbTransactionTypes.Text == "Chetak Vehicle Sales")
{ {
pSWTallySyncLogs.WriteLine("================================================================================"); pSWTallySyncLogs.WriteLine("================================================================================");
@@ -225,6 +235,17 @@ namespace TallyDataTool
procImportExcelPartSalesToDataTable(); procImportExcelPartSalesToDataTable();
procImportSpareSalesToTally("CHETAK"); procImportSpareSalesToTally("CHETAK");
}
else if (cbTransactionTypes.Text == "KTM Service Sales")
{
pSWTallySyncLogs.WriteLine("================================================================================");
pSWTallySyncLogs.WriteLine("KTM Service Sales Data Import on " + System.DateTime.Now.ToShortDateString() + " @ " + System.DateTime.Now.ToShortTimeString());
pSWTallySyncLogs.WriteLine("================================================================================");
procImportExcelDataToDatatable();
procImportExcelServiceSalesToDataTable();
procImportServiceSalesToTally("KTM");
} }
else if (cbTransactionTypes.Text == "Chetak Service Sales") else if (cbTransactionTypes.Text == "Chetak Service Sales")
{ {
@@ -233,6 +254,7 @@ namespace TallyDataTool
pSWTallySyncLogs.WriteLine("================================================================================"); pSWTallySyncLogs.WriteLine("================================================================================");
procImportExcelDataToDatatable(); procImportExcelDataToDatatable();
procImportExcelServiceSalesToDataTable(); procImportExcelServiceSalesToDataTable();
procImportServiceSalesToTally("CHETAK");
} }
@@ -493,7 +515,7 @@ namespace TallyDataTool
TransactionHeaderModel oPurchase = new TransactionHeaderModel(); TransactionHeaderModel oPurchase = new TransactionHeaderModel();
List<TransactionLedgerDetailsModel> oLedgerDetails = new List<TransactionLedgerDetailsModel>(); List<TransactionLedgerDetailsModel> oLedgerDetails = new List<TransactionLedgerDetailsModel>();
List <TransactionInventoryDetailsModel> oInventoryDetails = new List<TransactionInventoryDetailsModel>(); List<TransactionInventoryDetailsModel> oInventoryDetails = new List<TransactionInventoryDetailsModel>();
pDblTotalAmount = 0; pDblTotalAmount = 0;
if (TransType == "KTM") if (TransType == "KTM")
{ {
@@ -863,20 +885,20 @@ namespace TallyDataTool
pDblTotalAmount = 0; pDblTotalAmount = 0;
if (TransType == "KTM") if (TransType == "KTM")
{ {
oPurchase.TransactionTypeName = "Sales - KTM"; oPurchase.TransactionTypeName = "Sales Vehicle- KTM";
} }
else else
{ {
oPurchase.TransactionTypeName = "Sales - Chetak"; oPurchase.TransactionTypeName = "Sales Vehicle- Chetak";
} }
oPurchase.TransactionNumber = dtExcelSource.Rows[i]["DocNo"].ToString(); oPurchase.TransactionNumber = dtExcelSource.Rows[i]["DocNo"].ToString();
oPurchase.TransactionDate = dtExcelSource.Rows[i]["DocDate"].ToString(); oPurchase.TransactionDate = dtExcelSource.Rows[i]["DocDate"].ToString();
oPurchase.PartyName = dtExcelSource.Rows[i]["SupplierName"].ToString(); oPurchase.PartyName = dtExcelSource.Rows[i]["Customer_Name"].ToString();
oPurchase.Narration = ""; oPurchase.Narration = "";
oPurchase.VoucherMode = "Invoice"; oPurchase.VoucherMode = "Invoice";
//Party Ledger //Party Ledger
if (double.Parse(dtExcelSource.Rows[i][""].ToString()) > 0) if (double.Parse(dtExcelSource.Rows[i]["Sale_TotalAmount"].ToString()) > 0)
{ {
oLedgerDetails.Add(new TransactionLedgerDetailsModel oLedgerDetails.Add(new TransactionLedgerDetailsModel
{ {
@@ -908,7 +930,7 @@ namespace TallyDataTool
LedgerName = "CGST @14%", LedgerName = "CGST @14%",
IsDeemedPositive = "NO", IsDeemedPositive = "NO",
IsPartyLedger = "NO", IsPartyLedger = "NO",
LedgerAmount = double.Parse(dtExcelSource.Rows[i]["IGST"].ToString()).ToString() LedgerAmount = double.Parse(dtExcelSource.Rows[i]["Sales_CGST14"].ToString()).ToString()
}); });
pDblTotalAmount = pDblTotalAmount + double.Parse(double.Parse(dtExcelSource.Rows[i]["Sales_CGST14"].ToString()).ToString("0.00")); pDblTotalAmount = pDblTotalAmount + double.Parse(double.Parse(dtExcelSource.Rows[i]["Sales_CGST14"].ToString()).ToString("0.00"));
@@ -954,6 +976,19 @@ namespace TallyDataTool
}); });
pDblTotalAmount = pDblTotalAmount + double.Parse(double.Parse(dtExcelSource.Rows[i]["Sales_SGST9"].ToString()).ToString("0.00")); pDblTotalAmount = pDblTotalAmount + double.Parse(double.Parse(dtExcelSource.Rows[i]["Sales_SGST9"].ToString()).ToString("0.00"));
}
if (double.Parse(dtExcelSource.Rows[i]["CessAmt"].ToString()) > 0)
{
oLedgerDetails.Add(new TransactionLedgerDetailsModel
{
LedgerName = "Cess @3%",
IsDeemedPositive = "NO",
IsPartyLedger = "NO",
LedgerAmount = double.Parse(dtExcelSource.Rows[i]["CessAmt"].ToString()).ToString()
});
pDblTotalAmount = pDblTotalAmount + double.Parse(double.Parse(dtExcelSource.Rows[i]["CessAmt"].ToString()).ToString("0.00"));
} }
Int16 j = 0; Int16 j = 0;
@@ -976,7 +1011,7 @@ namespace TallyDataTool
{ {
ItemName = drItemDetails[j]["ProductCode"].ToString(), ItemName = drItemDetails[j]["ProductCode"].ToString(),
ItemQty = drItemDetails[j]["ProductQty"].ToString(), ItemQty = drItemDetails[j]["ProductQty"].ToString(),
ItemRate = drItemDetails[j]["ProductRate"].ToString(), ItemRate = drItemDetails[j]["ProductPrice"].ToString(),
ItemAmount = drItemDetails[j]["ProductAmount"].ToString(), ItemAmount = drItemDetails[j]["ProductAmount"].ToString(),
InventortyLedgerName = pStrInvLedgerName, InventortyLedgerName = pStrInvLedgerName,
IsDeemedPositive = "No" IsDeemedPositive = "No"
@@ -1024,7 +1059,7 @@ namespace TallyDataTool
if (pStrVoucherXML != "") if (pStrVoucherXML != "")
{ {
pStrXMLResponse = oLibTallySync.TallyVoucherSyncBasic(pStrVoucherXML, pStrTallyPort); pStrXMLResponse = oLibTallySync.TallyVoucherSyncInventory(pStrVoucherXML, pStrTallyPort);
if (pStrXMLResponse.Contains("ERROR") == true && pStrXMLResponse.Contains("already exists!") == false) if (pStrXMLResponse.Contains("ERROR") == true && pStrXMLResponse.Contains("already exists!") == false)
{ {
@@ -1207,7 +1242,7 @@ namespace TallyDataTool
{ {
pStrXMLResponse = oLibTallySync.TallyVoucherSyncBasic(pStrVoucherXML, pStrTallyPort); pStrXMLResponse = oLibTallySync.TallyVoucherSyncBasic(pStrVoucherXML, pStrTallyPort);
if (pStrXMLResponse.Contains("ERROR") == true && pStrXMLResponse.Contains("already exists!") == false) if (pStrXMLResponse.Contains("ERRORS>1") == true && pStrXMLResponse.Contains("already exists!") == false)
{ {
pSWTallySyncLogs.WriteLine(dtExcelSource.Rows[i]["docno"] + "-" + pStrXMLResponse); pSWTallySyncLogs.WriteLine(dtExcelSource.Rows[i]["docno"] + "-" + pStrXMLResponse);
@@ -1219,6 +1254,7 @@ namespace TallyDataTool
} }
private void procImportServiceSalesToTally(string TransType) private void procImportServiceSalesToTally(string TransType)
{ {
@@ -1254,11 +1290,20 @@ namespace TallyDataTool
oPurchase.TransactionNumber = dtExcelSource.Rows[i]["DocNo"].ToString(); oPurchase.TransactionNumber = dtExcelSource.Rows[i]["DocNo"].ToString();
oPurchase.TransactionDate = dtExcelSource.Rows[i]["DocDate"].ToString(); oPurchase.TransactionDate = dtExcelSource.Rows[i]["DocDate"].ToString();
oPurchase.PartyName = dtExcelSource.Rows[i]["SupplierName"].ToString(); oPurchase.PartyName = dtExcelSource.Rows[i]["Customer_name"].ToString();
oPurchase.Narration = ""; oPurchase.Narration = "";
oPurchase.VoucherMode = "Voucher"; oPurchase.VoucherMode = "Voucher";
//Party Ledger //Party Ledger
//"DocNO;DocDate;Customer_Name;Sale_TotalAmount;Sales14Amount;Sales9Amount;Sales_CGST14;Sales_SGST14;Sales_CGST9;Sales_SGST9"; //"DocNO;DocDate;Customer_Name;Sale_TotalAmount;Sales14Amount;Sales9Amount;Sales_CGST14;Sales_SGST14;Sales_CGST9;Sales_SGST9";
oLedgerDetails.Add(new TransactionLedgerDetailsModel
{
LedgerName = dtExcelSource.Rows[i]["Customer_name"].ToString(),
IsDeemedPositive = "yES",
IsPartyLedger = "YES",
LedgerAmount = "-" + double.Parse(dtExcelSource.Rows[i]["Sale_TotalAmount"].ToString()).ToString()
});
if (double.Parse(dtExcelSource.Rows[i]["Sales14Amount"].ToString()) > 0) if (double.Parse(dtExcelSource.Rows[i]["Sales14Amount"].ToString()) > 0)
{ {
@@ -1347,7 +1392,7 @@ namespace TallyDataTool
LedgerName = "Round off", LedgerName = "Round off",
IsDeemedPositive = "NO", IsDeemedPositive = "NO",
IsPartyLedger = "NO", IsPartyLedger = "NO",
LedgerAmount = (double.Parse(pDblRoundoff.ToString()).ToString()) LedgerAmount = Math.Abs(double.Parse(pDblRoundoff.ToString())).ToString()
}); });
} }
@@ -1376,7 +1421,7 @@ namespace TallyDataTool
{ {
pStrXMLResponse = oLibTallySync.TallyVoucherSyncBasic(pStrVoucherXML, pStrTallyPort); pStrXMLResponse = oLibTallySync.TallyVoucherSyncBasic(pStrVoucherXML, pStrTallyPort);
if (pStrXMLResponse.Contains("ERROR") == true && pStrXMLResponse.Contains("already exists!") == false) if (pStrXMLResponse.Contains("ERRORS>1") == true && pStrXMLResponse.Contains("already exists!") == false)
{ {
pSWTallySyncLogs.WriteLine(dtExcelSource.Rows[i]["docno"] + "-" + pStrXMLResponse); pSWTallySyncLogs.WriteLine(dtExcelSource.Rows[i]["docno"] + "-" + pStrXMLResponse);
@@ -1414,56 +1459,60 @@ namespace TallyDataTool
//DocNo;DocDate;BankAccount;CustomerAccount;Narration;DocAmount //DocNo;DocDate;BankAccount;CustomerAccount;Narration;DocAmount
if (dtExcelSource.Rows[i]["DocNo"].ToString() != "")
if (TransType == "KTM")
{ {
oPurchase.TransactionTypeName = "Receipt - KTM"; if (TransType == "KTM")
}
else
{
oPurchase.TransactionTypeName = "Receipt- Chetak";
}
oPurchase.TransactionNumber = dtExcelSource.Rows[i]["DocNo"].ToString();
oPurchase.TransactionDate = dtExcelSource.Rows[i]["DocDate"].ToString();
oPurchase.PartyName = dtExcelSource.Rows[i]["CustomerAccount"].ToString();
oPurchase.Narration = dtExcelSource.Rows[i]["Narration"].ToString();
oPurchase.VoucherMode = "Voucher";
//Party Ledger
oLedgerDetails.Add(new TransactionLedgerDetailsModel
{
LedgerName = dtExcelSource.Rows[i]["CustomerAccount"].ToString(),
IsDeemedPositive = "NO",
IsPartyLedger = "YES",
LedgerAmount = "" + dtExcelSource.Rows[i]["DocAmount"].ToString()
});
//
oLedgerDetails.Add(new TransactionLedgerDetailsModel
{
LedgerName = "Bank A/c",
IsDeemedPositive = "YES",
IsPartyLedger = "NO",
LedgerAmount = "-" + double.Parse(dtExcelSource.Rows[i]["DocAmount"].ToString()).ToString()
});
pStrVoucherXML = JsonConvert.SerializeObject(oPurchase);
if (pStrVoucherXML != "")
{
pStrXMLResponse = oLibTallySync.TallyVoucherSyncBasic(pStrVoucherXML, pStrTallyPort);
if (pStrXMLResponse.Contains("ERROR") == true && pStrXMLResponse.Contains("already exists!") == false)
{ {
pSWTallySyncLogs.WriteLine(dtExcelSource.Rows[i]["docno"] + "-" + pStrXMLResponse); oPurchase.TransactionTypeName = "Receipt - KTM";
}
else
{
oPurchase.TransactionTypeName = "Receipt- Chetak";
} }
oPurchase.TransactionNumber = dtExcelSource.Rows[i]["DocNo"].ToString();
oPurchase.TransactionDate = dtExcelSource.Rows[i]["DocDate"].ToString().Substring(0,10);
oPurchase.PartyName = dtExcelSource.Rows[i]["CustomerAccount"].ToString();
oPurchase.Narration = dtExcelSource.Rows[i]["Narration"].ToString();
oPurchase.VoucherMode = "Voucher";
//Party Ledger
oLedgerDetails.Add(new TransactionLedgerDetailsModel
{
LedgerName = dtExcelSource.Rows[i]["CustomerAccount"].ToString(),
IsDeemedPositive = "NO",
IsPartyLedger = "YES",
LedgerAmount = "" + dtExcelSource.Rows[i]["DocAmount"].ToString()
});
//
oLedgerDetails.Add(new TransactionLedgerDetailsModel
{
LedgerName = "Bank A/c",
IsDeemedPositive = "YES",
IsPartyLedger = "NO",
LedgerAmount = "-" + double.Parse(dtExcelSource.Rows[i]["DocAmount"].ToString()).ToString()
});
oPurchase.TransactionLedgerDetails = oLedgerDetails;
oPurchase.TransactionInventoryDetails = oInventoryDetails;
pStrVoucherXML = JsonConvert.SerializeObject(oPurchase);
if (pStrVoucherXML != "")
{
pStrXMLResponse = oLibTallySync.TallyVoucherSyncBasic(pStrVoucherXML, pStrTallyPort);
if (pStrXMLResponse.Contains("ERRORS>1") == true && pStrXMLResponse.Contains("already exists!") == false)
{
pSWTallySyncLogs.WriteLine(dtExcelSource.Rows[i]["docno"] + "-" + pStrXMLResponse);
}
}
} }
} }
} }
@@ -1480,7 +1529,7 @@ namespace TallyDataTool
decimal pDecTotalAmount = 0, decimal pDecTotalAmount = 0,
pDecTotalIGST28 = 0, pDecTotalIGST28 = 0,
pDecTotalIGST18 = 0, pDecTotalIGST18 = 0,
pDecTotalIGST5=0, pDecTotalIGST5 = 0,
pDecTotalPurchase18 = 0, pDecTotalPurchase18 = 0,
pDecTotalPurchase28 = 0, pDecTotalPurchase28 = 0,
pDecTotalPurchase5 = 0, pDecTotalPurchase5 = 0,
@@ -1505,7 +1554,7 @@ namespace TallyDataTool
{ {
if (pIntErrorStatus == 0) if (pIntErrorStatus == 0)
{ {
pDecTotalAmount = pDecTotalAmount + pDecTotalPurchase18 + pDecTotalPurchase28 + pDecTotalPurchase5+ pDecTotalIGST18 + pDecTotalIGST28 + pDecTotalIGST5 + pDecTotalDbMargin + pDecTotalFAMEAmt - (pDecTotalInBillDisc); pDecTotalAmount = pDecTotalAmount + pDecTotalPurchase18 + pDecTotalPurchase28 + pDecTotalPurchase5 + pDecTotalIGST18 + pDecTotalIGST28 + pDecTotalIGST5 + pDecTotalDbMargin + pDecTotalFAMEAmt - (pDecTotalInBillDisc);
pStrData = pStrInvNo; pStrData = pStrInvNo;
pStrData = pStrData + "|" + pStrInvDate; pStrData = pStrData + "|" + pStrInvDate;
pStrData = pStrData + "|" + pStrCustomerName; pStrData = pStrData + "|" + pStrCustomerName;
@@ -1575,7 +1624,7 @@ namespace TallyDataTool
if (pDecGSTPer == decimal.Parse("0.18")) if (pDecGSTPer == decimal.Parse("0.18"))
{ {
@@ -1683,11 +1732,19 @@ namespace TallyDataTool
pStrInvNo = dtExcelData.Rows[i]["Document Name"].ToString(); pStrInvNo = dtExcelData.Rows[i]["Document Name"].ToString();
pStrInvDate = dtExcelData.Rows[i]["Document Date"].ToString().Substring(0, 10); pStrInvDate = dtExcelData.Rows[i]["Document Date"].ToString().Substring(0, 10);
pStrCustomerName = dtExcelData.Rows[i]["Customer"].ToString(); pStrCustomerName = dtExcelData.Rows[i]["Customer Code"].ToString();
pStrData = dtExcelData.Rows[i]["Document Name"].ToString(); pStrData = dtExcelData.Rows[i]["Document Name"].ToString();
pStrData = pStrData + "|" + ""; // dtExcelData.Rows[i]["Product Code"].ToString(); if (dtExcelData.Columns.Contains("Model") == true)
{
pStrData = pStrData + "|" + dtExcelData.Rows[i]["Model"].ToString();
}
else
{
pStrData = pStrData + "|" + "MODEL TWO"; // dtExcelData.Rows[i]["Product Code"].ToString();
}
pStrData = pStrData + "|" + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["Qty"].ToString()) ? "0" : dtExcelData.Rows[i]["Qty"].ToString()); pStrData = pStrData + "|" + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["Qty"].ToString()) ? "0" : dtExcelData.Rows[i]["Qty"].ToString());
pStrData = pStrData + "|" + (Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["Net Amount"].ToString()) ? "0" : dtExcelData.Rows[i]["Net Amount"].ToString())); pStrData = pStrData + "|" + (Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["Net Amount"].ToString()) ? "0" : dtExcelData.Rows[i]["Net Amount"].ToString()));
pStrData = pStrData + "|" + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["Net Amount"].ToString()) ? "0" : dtExcelData.Rows[i]["Net Amount"].ToString()); pStrData = pStrData + "|" + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["Net Amount"].ToString()) ? "0" : dtExcelData.Rows[i]["Net Amount"].ToString());
@@ -1696,9 +1753,7 @@ namespace TallyDataTool
oLibDbCommon.AddRowToDataTable(dtSalesDetails, pStrData); oLibDbCommon.AddRowToDataTable(dtSalesDetails, pStrData);
double dblval = 0;
double.TryParse(dtExcelData.Rows[i]["CGST%"].ToString(), out dblval);
if (dtExcelData.Columns.Contains("FAME Subsidy") == true) if (dtExcelData.Columns.Contains("FAME Subsidy") == true)
{ {
pDecTotalFameAmount = pDecTotalFameAmount + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["FAME Subsidy"].ToString()) ? "0" : dtExcelData.Rows[i]["FAME Subsidy"].ToString()); pDecTotalFameAmount = pDecTotalFameAmount + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["FAME Subsidy"].ToString()) ? "0" : dtExcelData.Rows[i]["FAME Subsidy"].ToString());
@@ -1714,7 +1769,7 @@ namespace TallyDataTool
if (dtExcelData.Columns.Contains("CGST(14%)") == true) if (dtExcelData.Columns.Contains("CGST(14%)") == true)
{ {
pDecTotalCGST14 = pDecTotalCGST14 + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["CGST(14%)"].ToString()) ? "0" : dtExcelData.Rows[i]["CGST(14%)"].ToString()); pDecTotalCGST14 = pDecTotalCGST14 + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["CGST(14%)"].ToString()) ? "0" : dtExcelData.Rows[i]["CGST(14%)"].ToString());
pDecTotalSGST14 = pDecTotalSGST14 + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["SGST/UTGST"].ToString()) ? "0" : dtExcelData.Rows[i]["SGST/UTGST"].ToString()); pDecTotalSGST14 = pDecTotalSGST14 + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["SGST/ UTGST(14%)"].ToString()) ? "0" : dtExcelData.Rows[i]["SGST/ UTGST(14%)"].ToString());
} }
if (dtExcelData.Columns.Contains("CESS(3%)") == true) if (dtExcelData.Columns.Contains("CESS(3%)") == true)
@@ -1836,7 +1891,7 @@ namespace TallyDataTool
if (dtExcelData.Columns.Contains("CGST(9%)") == true) if (dtExcelData.Columns.Contains("CGST(9%)") == true)
{ {
pDecTotalCGST9 = pDecTotalCGST9 + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["CGST(9%)"].ToString()) ? "0" : dtExcelData.Rows[i]["CGST(2.5%)"].ToString()); pDecTotalCGST9 = pDecTotalCGST9 + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["CGST(9%)"].ToString()) ? "0" : dtExcelData.Rows[i]["CGST(9%)"].ToString());
pDecTotalSGST9 = pDecTotalSGST9 + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["SGST/ UTGST(9%)"].ToString()) ? "0" : dtExcelData.Rows[i]["SGST/ UTGST(9%)"].ToString()); pDecTotalSGST9 = pDecTotalSGST9 + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["SGST/ UTGST(9%)"].ToString()) ? "0" : dtExcelData.Rows[i]["SGST/ UTGST(9%)"].ToString());
} }
@@ -1946,25 +2001,25 @@ namespace TallyDataTool
if (dtExcelData.Columns.Contains("CGSTSaleAmount(14)") == true) if (dtExcelData.Columns.Contains("CGSTSaleAmount(14)") == true)
{ {
pDecTotalSales14 = pDecTotalSales14 + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["CGSTSaleAmount(14)"].ToString()) ? "0" : dtExcelData.Rows[i]["CGSTSaleAmount(14%)"].ToString()); pDecTotalSales14 = pDecTotalSales14 + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["CGSTSaleAmount(14)"].ToString()) ? "0" : dtExcelData.Rows[i]["CGSTSaleAmount(14)"].ToString());
} }
if (dtExcelData.Columns.Contains("CGSTSaleAmount(9)") == true) if (dtExcelData.Columns.Contains("CGSTSaleAmount(9)") == true)
{ {
pDecTotalSales9 = pDecTotalSales9 + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["CGSTSaleAmount(9)"].ToString()) ? "0" : dtExcelData.Rows[i]["CGSTSaleAmount(9%)"].ToString()); pDecTotalSales9 = pDecTotalSales9 + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["CGSTSaleAmount(9)"].ToString()) ? "0" : dtExcelData.Rows[i]["CGSTSaleAmount(9)"].ToString());
} }
if (dtExcelData.Columns.Contains("CGST(9)") == true) if (dtExcelData.Columns.Contains("CGST(9)") == true)
{ {
pDecTotalCGST9 = pDecTotalCGST9 + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["CGST(9)"].ToString()) ? "0" : dtExcelData.Rows[i]["CGST(2.5%)"].ToString()); pDecTotalCGST9 = pDecTotalCGST9 + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["CGST(9)"].ToString()) ? "0" : dtExcelData.Rows[i]["CGST(9)"].ToString());
pDecTotalSGST9 = pDecTotalSGST9 + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["SGST/ UTGST(9)"].ToString()) ? "0" : dtExcelData.Rows[i]["SGST/ UTGST(9%)"].ToString()); pDecTotalSGST9 = pDecTotalSGST9 + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["SGST/ UTGST(9)"].ToString()) ? "0" : dtExcelData.Rows[i]["SGST/ UTGST(9)"].ToString());
} }
if (dtExcelData.Columns.Contains("CGST(14)") == true) if (dtExcelData.Columns.Contains("CGST(14)") == true)
{ {
pDecTotalCGST14 = pDecTotalCGST14 + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["CGST(14)"].ToString()) ? "0" : dtExcelData.Rows[i]["CGST(14%)"].ToString()); pDecTotalCGST14 = pDecTotalCGST14 + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["CGST(14)"].ToString()) ? "0" : dtExcelData.Rows[i]["CGST(14)"].ToString());
pDecTotalSGST14 = pDecTotalSGST14 + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["SGST/ UTGST(14)"].ToString()) ? "0" : dtExcelData.Rows[i]["SGST/ UTGST(14%)"].ToString()); pDecTotalSGST14 = pDecTotalSGST14 + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["SGST/ UTGST(14)"].ToString()) ? "0" : dtExcelData.Rows[i]["SGST/ UTGST(14)"].ToString());
} }
@@ -1992,8 +2047,6 @@ namespace TallyDataTool
pStrData = pStrData + "|" + pDecTotalSGST14.ToString(); pStrData = pStrData + "|" + pDecTotalSGST14.ToString();
pStrData = pStrData + "|" + pDecTotalCGST9.ToString(); pStrData = pStrData + "|" + pDecTotalCGST9.ToString();
pStrData = pStrData + "|" + pDecTotalSGST9.ToString(); pStrData = pStrData + "|" + pDecTotalSGST9.ToString();
pStrData = pStrData + "|" + pDecTotalCess.ToString();
pStrData = pStrData + "|" + pDecTotalFameAmount.ToString();
oLibDbCommon.AddRowToDataTable(dtExcelSource, pStrData); oLibDbCommon.AddRowToDataTable(dtExcelSource, pStrData);
@@ -2014,8 +2067,6 @@ namespace TallyDataTool
pStrData = pStrData + "|" + pDecTotalSGST14.ToString(); pStrData = pStrData + "|" + pDecTotalSGST14.ToString();
pStrData = pStrData + "|" + pDecTotalCGST9.ToString(); pStrData = pStrData + "|" + pDecTotalCGST9.ToString();
pStrData = pStrData + "|" + pDecTotalSGST9.ToString(); pStrData = pStrData + "|" + pDecTotalSGST9.ToString();
pStrData = pStrData + "|" + pDecTotalCess.ToString();
pStrData = pStrData + "|" + pDecTotalFameAmount.ToString();
oLibDbCommon.AddRowToDataTable(dtExcelSource, pStrData); oLibDbCommon.AddRowToDataTable(dtExcelSource, pStrData);
@@ -2037,7 +2088,7 @@ namespace TallyDataTool
{ {
pStrInvNo = dtExcelData.Rows[i]["INVOICE"].ToString(); pStrInvNo = dtExcelData.Rows[i]["INVOICE"].ToString();
pStrInvDate = dtExcelData.Rows[i]["INVOCIE Date"].ToString().Substring(0, 10); pStrInvDate = dtExcelData.Rows[i]["INVOICE Date"].ToString().Substring(0, 10);
pStrCustomerName = dtExcelData.Rows[i]["Customer"].ToString(); pStrCustomerName = dtExcelData.Rows[i]["Customer"].ToString();
} }
@@ -2046,25 +2097,25 @@ namespace TallyDataTool
if (dtExcelData.Columns.Contains("CGSTSaleAmount(14)") == true) if (dtExcelData.Columns.Contains("CGSTSaleAmount(14)") == true)
{ {
pDecTotalSales14 = pDecTotalSales14 + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["CGSTSaleAmount(14)"].ToString()) ? "0" : dtExcelData.Rows[i]["CGSTSaleAmount(14%)"].ToString()); pDecTotalSales14 = pDecTotalSales14 + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["CGSTSaleAmount(14)"].ToString()) ? "0" : dtExcelData.Rows[i]["CGSTSaleAmount(14)"].ToString());
} }
if (dtExcelData.Columns.Contains("CGSTSaleAmount(9)") == true) if (dtExcelData.Columns.Contains("CGSTSaleAmount(9)") == true)
{ {
pDecTotalSales9 = pDecTotalSales9 + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["CGSTSaleAmount(9)"].ToString()) ? "0" : dtExcelData.Rows[i]["CGSTSaleAmount(9%)"].ToString()); pDecTotalSales9 = pDecTotalSales9 + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["CGSTSaleAmount(9)"].ToString()) ? "0" : dtExcelData.Rows[i]["CGSTSaleAmount(9)"].ToString());
} }
if (dtExcelData.Columns.Contains("CGST(9)") == true) if (dtExcelData.Columns.Contains("CGST(9)") == true)
{ {
pDecTotalCGST9 = pDecTotalCGST9 + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["CGST(9)"].ToString()) ? "0" : dtExcelData.Rows[i]["CGST(2.5%)"].ToString()); pDecTotalCGST9 = pDecTotalCGST9 + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["CGST(9)"].ToString()) ? "0" : dtExcelData.Rows[i]["CGST(9)"].ToString());
pDecTotalSGST9 = pDecTotalSGST9 + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["SGST/ UTGST(9)"].ToString()) ? "0" : dtExcelData.Rows[i]["SGST/ UTGST(9%)"].ToString()); pDecTotalSGST9 = pDecTotalSGST9 + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["SGST/ UTGST(9)"].ToString()) ? "0" : dtExcelData.Rows[i]["SGST/ UTGST(9)"].ToString());
} }
if (dtExcelData.Columns.Contains("CGST(14)") == true) if (dtExcelData.Columns.Contains("CGST(14)") == true)
{ {
pDecTotalCGST14 = pDecTotalCGST14 + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["CGST(14)"].ToString()) ? "0" : dtExcelData.Rows[i]["CGST(14%)"].ToString()); pDecTotalCGST14 = pDecTotalCGST14 + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["CGST(14)"].ToString()) ? "0" : dtExcelData.Rows[i]["CGST(14)"].ToString());
pDecTotalSGST14 = pDecTotalSGST14 + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["SGST/ UTGST(14)"].ToString()) ? "0" : dtExcelData.Rows[i]["SGST/ UTGST(14%)"].ToString()); pDecTotalSGST14 = pDecTotalSGST14 + Convert.ToDecimal(string.IsNullOrEmpty(dtExcelData.Rows[i]["SGST/ UTGST(14)"].ToString()) ? "0" : dtExcelData.Rows[i]["SGST/ UTGST(14)"].ToString());
} }
@@ -2089,22 +2140,24 @@ namespace TallyDataTool
PBTallySync.Value = i; PBTallySync.Value = i;
Application.DoEvents(); Application.DoEvents();
if (dtExcelData.Rows[i]["Document Amount"].ToString() != "")
if (decimal.Parse(dtExcelData.Rows[i]["Document Amount"].ToString()) == decimal.Parse("2000"))
{ {
pStrData = dtExcelData.Rows[i]["Document Name"].ToString(); if (decimal.Parse(dtExcelData.Rows[i]["Document Amount"].ToString()) == decimal.Parse("2000"))
pStrData = pStrData + "|" + dtExcelData.Rows[i]["Document Date"].ToString(); {
pStrData = pStrData + "|" + "Bank A/c"; pStrData = dtExcelData.Rows[i]["Document Name"].ToString();
pStrData = pStrData + "|" + dtExcelData.Rows[i]["Line Contact"].ToString(); pStrData = pStrData + "|" + dtExcelData.Rows[i]["Document Date"].ToString();
pStrData = pStrData + "|" + ""; pStrData = pStrData + "|" + "Bank A/c";
pStrData = pStrData + "|" + dtExcelData.Rows[i]["Document Amount"].ToString(); pStrData = pStrData + "|" + dtExcelData.Rows[i]["Line Contact"].ToString();
pStrData = pStrData + "|" + "";
pStrData = pStrData + "|" + dtExcelData.Rows[i]["Document Amount"].ToString();
}
oLibDbCommon.AddRowToDataTable(dtExcelSource, pStrData);
} }
oLibDbCommon.AddRowToDataTable(dtExcelSource, pStrData);
} }
} }
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.