InstantFeedBackView

This commit is contained in:
2020-09-10 16:30:26 +02:00
parent 42147da6b7
commit 525cf78939
5 changed files with 94 additions and 75 deletions
@@ -1527,7 +1527,7 @@ namespace Nuvolar.Module.BusinessObjects.Migration
if (_SqlConnection.State == ConnectionState.Open)
{
_SQL = string.Format(" select count(*) FROM InvoiceHeader t1 WHERE DateExecution>='{0}' AND t1.DateExecution <='{1}'",
_SQL = string.Format(" select count(*) FROM InvoiceHeader t1 WHERE DateExecution>='{0}' AND t1.DateExecution <='{1}' AND t1.GCRecord IS NULL AND t1.IsEditable<>1 AND ISNULL(t1.DocumentNumber,'')<>''",
_MigrationParameters.DateFrom.Date.ToString("yyyy-MM-dd"), _MigrationParameters.DateTo.Date.ToString("yyyy-MM-dd"));
using (SqlCommand _SqlCommand = new SqlCommand(_SQL, _SqlConnection))
{
@@ -1536,7 +1536,7 @@ namespace Nuvolar.Module.BusinessObjects.Migration
if (_Count != null)
{
_SQL = string.Format(" select t1.Oid FROM InvoiceHeader t1 WHERE DateExecution>='{0}' AND t1.DateExecution <='{1}'",
_SQL = string.Format(" select t1.Oid FROM InvoiceHeader t1 WHERE DateExecution>='{0}' AND t1.DateExecution <='{1}' AND t1.GCRecord IS NULL AND t1.IsEditable<>1 AND ISNULL(t1.DocumentNumber,'')<>''",
_MigrationParameters.DateFrom.Date.ToString("yyyy-MM-dd"), _MigrationParameters.DateTo.Date.ToString("yyyy-MM-dd"));
using (SqlCommand _SqlCommand = new SqlCommand(_SQL, _SqlConnection))
@@ -2047,7 +2047,7 @@ namespace Nuvolar.Module.BusinessObjects.Migration
if (_SqlConnection.State == ConnectionState.Open)
{
_SQL = string.Format(" select count(*) FROM GLHeader t1 join GLAccounts t2 on t1.Oid = t2.Oid WHERE t1.DateExecution>='{0}' AND t1.DateExecution <='{1}'",
_SQL = string.Format(" select count(*) FROM GLHeader t1 join GLAccounts t2 on t1.Oid = t2.Oid WHERE t1.DateExecution>='{0}' AND t1.DateExecution <='{1}' AND t1.GCRecord IS NULL AND t1.IsEditable=False AND ISNULL(t1.DocumentNumber,'')<>''",
_MigrationParameters.DateFrom.Date.ToString("yyyy-MM-dd"), _MigrationParameters.DateTo.Date.ToString("yyyy-MM-dd"));
using (SqlCommand _SqlCommand = new SqlCommand(_SQL, _SqlConnection))
{
@@ -2057,7 +2057,7 @@ namespace Nuvolar.Module.BusinessObjects.Migration
if (_Count != null)
{
_SQL = string.Format(" SELECT t1.Oid FROM GLHeader t1 join GLAccounts t2 on t1.Oid = t2.Oid " +
" WHERE t1.DateExecution>='{0}' AND t1.DateExecution <='{1}' AND t1.GCRecord IS NULL AND t1.IsEditable=False",
" WHERE t1.DateExecution>='{0}' AND t1.DateExecution <='{1}' AND t1.GCRecord IS NULL AND t1.IsEditable=False AND ISNULL(t1.DocumentNumber,'')<>''",
_MigrationParameters.DateFrom.Date.ToString("yyyy-MM-dd"), _MigrationParameters.DateTo.Date.ToString("yyyy-MM-dd"));
using (SqlCommand _SqlCommand = new SqlCommand(_SQL, _SqlConnection))
@@ -2193,7 +2193,7 @@ namespace Nuvolar.Module.BusinessObjects.Migration
" t1.Controlling=t7.Controlling AND t7.AccountYear=Year(t4.DateExecution)" +
" WHERE t1.InvoiceHeader ='{0}' AND t1.GCRecord IS NULL AND t7.GCRecord IS NULL AND t5.GCRecord IS NULL" +
" GROUP BY t1.Controlling,t3.Name,t1.VAT", _InvoiceHeader_OID);
" GROUP BY t1.Controlling,t3.Name,t1.VAT", _GLHeader_OID);
using (SqlCommand _SqlCommand = new SqlCommand(_SQL, _SqlConnection))
{
using (SqlDataReader _SqlDataReader = _SqlCommand.ExecuteReader())
@@ -2207,7 +2207,7 @@ namespace Nuvolar.Module.BusinessObjects.Migration
{
_GLRows = new GLRows(_uow);
_GLRows.GLHeader = _GLAccounts;
_GLRows.NoteRows = "ÉRTÉKESÍTÉS NETTÓ";
_GLRows.NoteRows = "BESZERZÉS NETTÓ";
_GLRows.DebitChartOfAccounts = _uow.GetObjectByKey<ChartOfAccounts>(_SqlDataReader["ChartOfAccountsT"]);
_GLRows.CreditChartOfAccounts = _uow.GetObjectByKey<ChartOfAccounts>(_SqlDataReader["ChartOfAccountsK"]);
_GLRows.AmountHUF = (double)_SqlDataReader["SumPriceHUF"];
@@ -2246,7 +2246,7 @@ namespace Nuvolar.Module.BusinessObjects.Migration
" t2.Customers=t3.Oid LEFT JOIN CustomersGLParametersYear t4 ON" +
" Year(t2.DateExecution) = t4.AccountYear AND t4.CustomersGLParameters = t3.CustomersGLParameters LEFT JOIN VATYear t5 on" +
" Year(t2.DateExecution) = t5.AccountYear AND t1.VAT=t5.VAT" +
" WHERE t2.Oid = '{0}' AND t1.GCRecord IS NULL", _InvoiceHeader_OID);
" WHERE t2.Oid = '{0}' AND t1.GCRecord IS NULL", _GLHeader_OID);
using (SqlCommand _SqlCommand = new SqlCommand(_SQL, _SqlConnection))
{
using (SqlDataReader _SqlDataReader = _SqlCommand.ExecuteReader())
@@ -2264,7 +2264,7 @@ namespace Nuvolar.Module.BusinessObjects.Migration
_GLRows = new GLRows(_uow);
_GLRows.GLHeader = _GLAccounts;
_GLRows.NoteRows = "ÉRTÉKESÍTÉS ÁFA";
_GLRows.NoteRows = "BESZERZÉS ÁFA";
_GLRows.DebitChartOfAccounts = _uow.GetObjectByKey<ChartOfAccounts>(_SqlDataReader["ChartOfAccountsT"]);
_GLRows.CreditChartOfAccounts = _uow.GetObjectByKey<ChartOfAccounts>(_SqlDataReader["ChartOfAccountsK"]);
_GLRows.AmountHUF = (double)_SqlDataReader["AmountVATHUF"];