Beta Release 2.1.0.4-1
Sales Parts,Sales Serrice, Sales Vehile
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+91
-38
@@ -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");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -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,7 +1459,8 @@ namespace TallyDataTool
|
|||||||
|
|
||||||
|
|
||||||
//DocNo;DocDate;BankAccount;CustomerAccount;Narration;DocAmount
|
//DocNo;DocDate;BankAccount;CustomerAccount;Narration;DocAmount
|
||||||
|
if (dtExcelSource.Rows[i]["DocNo"].ToString() != "")
|
||||||
|
{
|
||||||
if (TransType == "KTM")
|
if (TransType == "KTM")
|
||||||
{
|
{
|
||||||
oPurchase.TransactionTypeName = "Receipt - KTM";
|
oPurchase.TransactionTypeName = "Receipt - KTM";
|
||||||
@@ -1425,7 +1471,7 @@ 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().Substring(0,10);
|
||||||
oPurchase.PartyName = dtExcelSource.Rows[i]["CustomerAccount"].ToString();
|
oPurchase.PartyName = dtExcelSource.Rows[i]["CustomerAccount"].ToString();
|
||||||
oPurchase.Narration = dtExcelSource.Rows[i]["Narration"].ToString();
|
oPurchase.Narration = dtExcelSource.Rows[i]["Narration"].ToString();
|
||||||
oPurchase.VoucherMode = "Voucher";
|
oPurchase.VoucherMode = "Voucher";
|
||||||
@@ -1451,6 +1497,8 @@ namespace TallyDataTool
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
oPurchase.TransactionLedgerDetails = oLedgerDetails;
|
||||||
|
oPurchase.TransactionInventoryDetails = oInventoryDetails;
|
||||||
|
|
||||||
pStrVoucherXML = JsonConvert.SerializeObject(oPurchase);
|
pStrVoucherXML = JsonConvert.SerializeObject(oPurchase);
|
||||||
|
|
||||||
@@ -1458,7 +1506,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);
|
||||||
|
|
||||||
@@ -1467,6 +1515,7 @@ namespace TallyDataTool
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void procImportExcelPartsPurchaseToDataTableGST()
|
private void procImportExcelPartsPurchaseToDataTableGST()
|
||||||
{
|
{
|
||||||
@@ -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,8 +1753,6 @@ 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)
|
||||||
{
|
{
|
||||||
@@ -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,7 +2140,8 @@ 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"))
|
if (decimal.Parse(dtExcelData.Rows[i]["Document Amount"].ToString()) == decimal.Parse("2000"))
|
||||||
{
|
{
|
||||||
pStrData = dtExcelData.Rows[i]["Document Name"].ToString();
|
pStrData = dtExcelData.Rows[i]["Document Name"].ToString();
|
||||||
@@ -2106,6 +2158,7 @@ namespace TallyDataTool
|
|||||||
|
|
||||||
oLibDbCommon.AddRowToDataTable(dtExcelSource, pStrData);
|
oLibDbCommon.AddRowToDataTable(dtExcelSource, pStrData);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user