Hehehehe
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
using DevExpress.Data.Filtering;
|
using System;
|
||||||
|
using DevExpress.Data.Filtering;
|
||||||
using DevExpress.ExpressApp;
|
using DevExpress.ExpressApp;
|
||||||
using DevExpress.ExpressApp.Actions;
|
using DevExpress.ExpressApp.Actions;
|
||||||
using DevExpress.ExpressApp.Xpo;
|
using DevExpress.ExpressApp.Xpo;
|
||||||
@@ -17,8 +18,16 @@ namespace Nuvolar.Module.Controllers
|
|||||||
protected override void OnActivated()
|
protected override void OnActivated()
|
||||||
{
|
{
|
||||||
base.OnActivated();
|
base.OnActivated();
|
||||||
// Perform various tasks depending on the target View.
|
Frame.GetController<InvoiceVC>().FireNAVmanageInvoiceFinalWork += FireNAVmanageInvoiceFinalWork;
|
||||||
|
Frame.GetController<OrderInVC>().FireNAVmanageInvoiceFinalWork += FireNAVmanageInvoiceFinalWork;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void FireNAVmanageInvoiceFinalWork(InvoiceHeader _InvoiceHeader)
|
||||||
|
{
|
||||||
|
XPObjectSpace _ocur = View.ObjectSpace as XPObjectSpace;
|
||||||
|
this.NAV_manageInvoice(_InvoiceHeader, _ocur);
|
||||||
|
}
|
||||||
|
|
||||||
protected override void OnViewControlsCreated()
|
protected override void OnViewControlsCreated()
|
||||||
{
|
{
|
||||||
base.OnViewControlsCreated();
|
base.OnViewControlsCreated();
|
||||||
@@ -26,7 +35,7 @@ namespace Nuvolar.Module.Controllers
|
|||||||
}
|
}
|
||||||
protected override void OnDeactivated()
|
protected override void OnDeactivated()
|
||||||
{
|
{
|
||||||
// Unsubscribe from previously subscribed events and release other references and resources.
|
Frame.GetController<InvoiceVC>().FireNAVmanageInvoiceFinalWork -= FireNAVmanageInvoiceFinalWork;
|
||||||
base.OnDeactivated();
|
base.OnDeactivated();
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -96,6 +105,11 @@ namespace Nuvolar.Module.Controllers
|
|||||||
{
|
{
|
||||||
XPObjectSpace _ocur = View.ObjectSpace as XPObjectSpace;
|
XPObjectSpace _ocur = View.ObjectSpace as XPObjectSpace;
|
||||||
InvoiceHeader _InvoiceHeader = View.SelectedObjects[0] as InvoiceHeader;
|
InvoiceHeader _InvoiceHeader = View.SelectedObjects[0] as InvoiceHeader;
|
||||||
|
this.NAV_manageInvoice(_InvoiceHeader,_ocur);
|
||||||
|
(View as ListView).CollectionSource.Reload();
|
||||||
|
}
|
||||||
|
private void NAV_manageInvoice(InvoiceHeader _InvoiceHeader,XPObjectSpace _ocur)
|
||||||
|
{
|
||||||
string _operation = "CREATE";
|
string _operation = "CREATE";
|
||||||
|
|
||||||
if (_InvoiceHeader.IsStorno)
|
if (_InvoiceHeader.IsStorno)
|
||||||
@@ -147,7 +161,7 @@ namespace Nuvolar.Module.Controllers
|
|||||||
Application.ShowViewStrategy.ShowMessage(_ERROR, InformationType.Error, 5000, InformationPosition.Bottom);
|
Application.ShowViewStrategy.ShowMessage(_ERROR, InformationType.Error, 5000, InformationPosition.Bottom);
|
||||||
}
|
}
|
||||||
|
|
||||||
(View as ListView).CollectionSource.Reload();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void aNAV_queryInvoiceStatus_Execute(object sender, SimpleActionExecuteEventArgs e)
|
private void aNAV_queryInvoiceStatus_Execute(object sender, SimpleActionExecuteEventArgs e)
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ namespace Nuvolar.Module.StaticClass
|
|||||||
_ResponseMessage = "";
|
_ResponseMessage = "";
|
||||||
_UriBase = ConfigurationManager.AppSettings["Uri"];
|
_UriBase = ConfigurationManager.AppSettings["Uri"];
|
||||||
_GeocodeAPIKey = ConfigurationManager.AppSettings["GeocodeAPIKey"];
|
_GeocodeAPIKey = ConfigurationManager.AppSettings["GeocodeAPIKey"];
|
||||||
Laravel.Users _Users = _onew.FindObject<Nuvolar.Module.Laravel.Users>(CriteriaOperator.Parse("email='sysadmin@emango.com'"));
|
Laravel.Users _Users = _onew.FindObject<Laravel.Users>(CriteriaOperator.Parse("email='sysadmin@emango.com'"));
|
||||||
if (_Users != null)
|
if (_Users != null)
|
||||||
{
|
{
|
||||||
if (String.IsNullOrEmpty(_Users.api_token))
|
if (String.IsNullOrEmpty(_Users.api_token))
|
||||||
@@ -61,82 +61,106 @@ namespace Nuvolar.Module.StaticClass
|
|||||||
var dd = JsonConvert.DeserializeObject(json);
|
var dd = JsonConvert.DeserializeObject(json);
|
||||||
var dict = JObject.Parse(json).SelectToken("data").ToObject<Dictionary<string, string>>();
|
var dict = JObject.Parse(json).SelectToken("data").ToObject<Dictionary<string, string>>();
|
||||||
_API_Token = dict["api_token"];
|
_API_Token = dict["api_token"];
|
||||||
|
|
||||||
|
Tracing.Tracer.LogText(string.Format("API Token requested : {0}", _API_Token.ToString()));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Tracing.Tracer.LogText("API Token request fail!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_API_Token = _Users.api_token;
|
_API_Token = _Users.api_token;
|
||||||
|
Tracing.Tracer.LogText(string.Format("API Token found : {0}", _API_Token.ToString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Tracing.Tracer.LogText("Laravel user not found!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public static string ExecuteRootePOST(string _RooteString, bool _NeedAuthentication, string _postData)
|
public static string ExecuteRootePOST(string _RooteString, bool _NeedAuthentication, string _postData)
|
||||||
{
|
{
|
||||||
_StatusCode = 500;
|
_StatusCode = 500;
|
||||||
_StatusMessage = "Not respond";
|
_StatusMessage = "Not respond ...";
|
||||||
string json = "";
|
string json = "";
|
||||||
|
|
||||||
|
|
||||||
Tracing.Tracer.LogText(_UriBase + _RooteString);
|
Tracing.Tracer.LogText(_UriBase + _RooteString);
|
||||||
|
Tracing.Tracer.LogText(_postData);
|
||||||
var _Uri = new Uri(_UriBase + _RooteString, UriKind.Absolute);
|
|
||||||
var _WebRequest = WebRequest.Create(_Uri);
|
|
||||||
HttpWebRequest _HttpWebRequest = (HttpWebRequest)_WebRequest;
|
|
||||||
|
|
||||||
_HttpWebRequest.Method = "POST";
|
|
||||||
byte[] byteArray = Encoding.UTF8.GetBytes(_postData);
|
|
||||||
|
|
||||||
|
|
||||||
if (_NeedAuthentication)
|
|
||||||
{
|
|
||||||
_HttpWebRequest.PreAuthenticate = true;
|
|
||||||
_HttpWebRequest.Headers.Add("Authorization", "Bearer " + _API_Token);
|
|
||||||
_HttpWebRequest.Headers.Add("cdb", GeneralFunction.GLOBAL_SQLDatabase);
|
|
||||||
}
|
|
||||||
|
|
||||||
_HttpWebRequest.ContentType = "application/json";
|
|
||||||
_HttpWebRequest.Accept = "application/json";
|
|
||||||
_HttpWebRequest.ContentLength = byteArray.Length;
|
|
||||||
Stream _dataStream = _HttpWebRequest.GetRequestStream();
|
|
||||||
_dataStream.Write(byteArray, 0, byteArray.Length);
|
|
||||||
_dataStream.Close();
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
WebResponse _WebResponse = _WebRequest.GetResponse();
|
var _Uri = new Uri(_UriBase + _RooteString, UriKind.Absolute);
|
||||||
_StatusCode = (int)((HttpWebResponse)_WebResponse).StatusCode;
|
var _WebRequest = WebRequest.Create(_Uri);
|
||||||
_StatusMessage = ((HttpWebResponse)_WebResponse).StatusDescription;
|
HttpWebRequest _HttpWebRequest = (HttpWebRequest)_WebRequest;
|
||||||
var _responseStream = _WebResponse.GetResponseStream();
|
|
||||||
if (_responseStream == null) return json;
|
|
||||||
|
|
||||||
var _StreamReader = new StreamReader(_responseStream, Encoding.Default);
|
_HttpWebRequest.Method = "POST";
|
||||||
json = _StreamReader.ReadToEnd();
|
byte[] byteArray = Encoding.UTF8.GetBytes(_postData);
|
||||||
|
|
||||||
|
|
||||||
|
if (_NeedAuthentication)
|
||||||
|
{
|
||||||
|
_HttpWebRequest.PreAuthenticate = true;
|
||||||
|
_HttpWebRequest.Headers.Add("Authorization", "Bearer " + _API_Token);
|
||||||
|
_HttpWebRequest.Headers.Add("cdb", GeneralFunction.GLOBAL_SQLDatabase);
|
||||||
|
}
|
||||||
|
|
||||||
|
_HttpWebRequest.ContentType = "application/json";
|
||||||
|
_HttpWebRequest.Accept = "application/json";
|
||||||
|
_HttpWebRequest.ContentLength = byteArray.Length;
|
||||||
|
Stream _dataStream = _HttpWebRequest.GetRequestStream();
|
||||||
|
_dataStream.Write(byteArray, 0, byteArray.Length);
|
||||||
|
_dataStream.Close();
|
||||||
|
|
||||||
|
Tracing.Tracer.LogText("Web request initialized !");
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_StatusMessage = JsonConvert.DeserializeObject(json).ToString();
|
WebResponse _WebResponse = _WebRequest.GetResponse();
|
||||||
}
|
_StatusCode = (int)((HttpWebResponse)_WebResponse).StatusCode;
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
_responseStream.Close();
|
|
||||||
_WebResponse.Close();
|
|
||||||
}
|
|
||||||
catch (WebException ex)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (ex.Status == WebExceptionStatus.ProtocolError)
|
|
||||||
{
|
|
||||||
var _WebResponse = (HttpWebResponse)ex.Response;
|
|
||||||
_StatusCode = (int)_WebResponse.StatusCode;
|
|
||||||
_StatusMessage = ((HttpWebResponse)_WebResponse).StatusDescription;
|
_StatusMessage = ((HttpWebResponse)_WebResponse).StatusDescription;
|
||||||
|
var _responseStream = _WebResponse.GetResponseStream();
|
||||||
|
if (_responseStream != null)
|
||||||
|
{
|
||||||
|
var _StreamReader = new StreamReader(_responseStream, Encoding.Default);
|
||||||
|
json = _StreamReader.ReadToEnd();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
_StatusMessage = JsonConvert.DeserializeObject(json).ToString();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Tracing.Tracer.LogText(ex.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
_responseStream.Close();
|
||||||
|
_WebResponse.Close();
|
||||||
|
}
|
||||||
|
catch (WebException ex)
|
||||||
|
{
|
||||||
|
Tracing.Tracer.LogText(ex.Message);
|
||||||
|
|
||||||
|
if (ex.Status == WebExceptionStatus.ProtocolError)
|
||||||
|
{
|
||||||
|
var _WebResponse = (HttpWebResponse)ex.Response;
|
||||||
|
_StatusCode = (int)_WebResponse.StatusCode;
|
||||||
|
_StatusMessage = ((HttpWebResponse)_WebResponse).StatusDescription;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Tracing.Tracer.LogText(ex.Message);
|
||||||
|
}
|
||||||
return json;
|
return json;
|
||||||
|
|
||||||
}
|
}
|
||||||
public static string ExecuteRooteGET(string _RooteString, bool _NeedAuthentication)
|
public static string ExecuteRooteGET(string _RooteString, bool _NeedAuthentication)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
namespace Nuvolar.Module.Win.CSharp.Controllers
|
|
||||||
{
|
|
||||||
partial class NAV_Online_WC
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Required designer variable.
|
|
||||||
/// </summary>
|
|
||||||
private System.ComponentModel.IContainer components = null;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Clean up any resources being used.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
|
||||||
protected override void Dispose(bool disposing)
|
|
||||||
{
|
|
||||||
if (disposing && (components != null))
|
|
||||||
{
|
|
||||||
components.Dispose();
|
|
||||||
}
|
|
||||||
base.Dispose(disposing);
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Component Designer generated code
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Required method for Designer support - do not modify
|
|
||||||
/// the contents of this method with the code editor.
|
|
||||||
/// </summary>
|
|
||||||
private void InitializeComponent()
|
|
||||||
{
|
|
||||||
this.components = new System.ComponentModel.Container();
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,99 +0,0 @@
|
|||||||
using System;
|
|
||||||
using DevExpress.ExpressApp;
|
|
||||||
using DevExpress.ExpressApp.Xpo;
|
|
||||||
using MySql.Data.MySqlClient;
|
|
||||||
|
|
||||||
namespace Nuvolar.Module.Win.CSharp.Controllers
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// NAV Online számla ellenőrző rendszer ...
|
|
||||||
/// </summary>
|
|
||||||
public partial class NAV_Online_WC : WindowController
|
|
||||||
{
|
|
||||||
private System.Windows.Forms.Timer _NAV_Timer;
|
|
||||||
private int invokeCount;
|
|
||||||
private bool _OnTick;
|
|
||||||
|
|
||||||
public NAV_Online_WC()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
|
|
||||||
}
|
|
||||||
protected override void OnActivated()
|
|
||||||
{
|
|
||||||
base.OnActivated();
|
|
||||||
invokeCount = 0;
|
|
||||||
_OnTick = false;
|
|
||||||
_NAV_Timer = new System.Windows.Forms.Timer();
|
|
||||||
_NAV_Timer.Interval = 15000;
|
|
||||||
_NAV_Timer.Start();
|
|
||||||
_NAV_Timer.Tick += NAV_Timer_Tick;
|
|
||||||
}
|
|
||||||
/// <summary>
|
|
||||||
/// Időzített NAV Online számla feladás
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sender"></param>
|
|
||||||
/// <param name="e"></param>
|
|
||||||
private void NAV_Timer_Tick(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
if (_OnTick == false)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
_OnTick = true;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
MySqlConnection _MySqlConnection = new MySqlConnection(GeneralFunction.GLOBAL_ConnectionString.Replace("XpoProvider=MySql;",""));
|
|
||||||
_MySqlConnection.Open();
|
|
||||||
MySqlCommand _MySqlCommand = new MySqlCommand(" SELECT DocumentNumber " +
|
|
||||||
" FROM InvoiceHeader " +
|
|
||||||
" WHERE IsEditable=0 AND " +
|
|
||||||
" ABS(TotalVATHUF) >= 100000 AND " +
|
|
||||||
" IFNULL(DocumentNumber,'') !='' AND " +
|
|
||||||
" IsProforma=0 AND " +
|
|
||||||
" NAV_InvoiceStatus <> 'DONE' AND" +
|
|
||||||
" DateCreated >= '2018-07-01' ",
|
|
||||||
_MySqlConnection);
|
|
||||||
MySqlDataReader _MySqlDataReader = _MySqlCommand.ExecuteReader();
|
|
||||||
|
|
||||||
if (_MySqlDataReader.HasRows)
|
|
||||||
{
|
|
||||||
//string _message = string.Format("{0} NAV online számla ellenőrzés ... {1,2}.", DateTime.Now.ToString("h:mm:ss.fff"), (++invokeCount).ToString());
|
|
||||||
string _message = "NAV online számla feladás ...";
|
|
||||||
Application.ShowViewStrategy.ShowMessage(_message, InformationType.Info, 1000, InformationPosition.Bottom);
|
|
||||||
|
|
||||||
while (_MySqlDataReader.Read())
|
|
||||||
{
|
|
||||||
//NAV időzített feladás ...
|
|
||||||
string _DocumentNumber = _MySqlDataReader["DocumentNumber"] as string;
|
|
||||||
//HA VAN
|
|
||||||
XPObjectSpace _onew = Application.CreateObjectSpace() as XPObjectSpace;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_MySqlConnection.Close();
|
|
||||||
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Application.ShowViewStrategy.ShowMessage(ex.Message, InformationType.Error, 5000, InformationPosition.Bottom);
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
_OnTick = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnDeactivated()
|
|
||||||
{
|
|
||||||
// Unsubscribe from previously subscribed events and release other references and resources.
|
|
||||||
base.OnDeactivated();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -178,12 +178,6 @@
|
|||||||
<Compile Include="Controllers\NavigationItemVCC.Designer.cs">
|
<Compile Include="Controllers\NavigationItemVCC.Designer.cs">
|
||||||
<DependentUpon>NavigationItemVCC.cs</DependentUpon>
|
<DependentUpon>NavigationItemVCC.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Controllers\NAV\NAV_Online_WC.cs">
|
|
||||||
<SubType>Component</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Controllers\NAV\NAV_Online_WC.Designer.cs">
|
|
||||||
<DependentUpon>NAV_Online_WC.cs</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Controllers\NewCustomersFromVC.cs">
|
<Compile Include="Controllers\NewCustomersFromVC.cs">
|
||||||
<SubType>Component</SubType>
|
<SubType>Component</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ Public Class InvoiceVC
|
|||||||
Public Event InitWork(ByVal _Minimum As Long, ByVal _Step As Long, ByVal _Maximum As Long)
|
Public Event InitWork(ByVal _Minimum As Long, ByVal _Step As Long, ByVal _Maximum As Long)
|
||||||
Public Event DoWork()
|
Public Event DoWork()
|
||||||
Public Event FinalWork()
|
Public Event FinalWork()
|
||||||
|
Public Event FireNAVmanageInvoiceFinalWork(ByVal _InvoiceHeader As InvoiceHeader)
|
||||||
|
|
||||||
Public Sub New()
|
Public Sub New()
|
||||||
MyBase.New()
|
MyBase.New()
|
||||||
@@ -740,16 +741,10 @@ Public Class InvoiceVC
|
|||||||
_p_InvoiceHeader.RecalculateInvoice(_p_InvoiceHeader, _ocur)
|
_p_InvoiceHeader.RecalculateInvoice(_p_InvoiceHeader, _ocur)
|
||||||
_ocur.CommitChanges()
|
_ocur.CommitChanges()
|
||||||
|
|
||||||
If _p_InvoiceHeader.TotalVATHUF >= 100000 And
|
If _p_InvoiceHeader.DateCreated >= #2018-07-01# And _p_InvoiceHeader.IsEditable = False And String.IsNullOrEmpty(_p_InvoiceHeader.DocumentNumber) = False And _p_InvoiceHeader.IsProforma = False Then
|
||||||
_p_InvoiceHeader.DateCreated >= #2018-07-01# And
|
If Math.Abs(_p_InvoiceHeader.TotalVATHUF) >= 100000 Then
|
||||||
_p_InvoiceHeader.NAV_InvoiceStatus <> "DONE" And
|
RaiseEvent FireNAVmanageInvoiceFinalWork(_p_InvoiceHeader)
|
||||||
_p_InvoiceHeader.IsEditable = False And
|
End If
|
||||||
_p_InvoiceHeader.IsProforma = False And
|
|
||||||
String.IsNullOrEmpty(_p_InvoiceHeader.DocumentNumber) = False Then
|
|
||||||
'Számla NAV feladása
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+50
-1
@@ -22,7 +22,7 @@ Public Class OrderInVC
|
|||||||
Protected _selection As New ArrayList
|
Protected _selection As New ArrayList
|
||||||
Protected _noselect As Boolean = False
|
Protected _noselect As Boolean = False
|
||||||
Private _getAlertFromOrderIn As String
|
Private _getAlertFromOrderIn As String
|
||||||
|
Public Event FireNAVmanageInvoiceFinalWork(ByVal _InvoiceHeader As InvoiceHeader)
|
||||||
Public Sub New()
|
Public Sub New()
|
||||||
MyBase.New()
|
MyBase.New()
|
||||||
InitializeComponent()
|
InitializeComponent()
|
||||||
@@ -2792,6 +2792,11 @@ CheckError:
|
|||||||
_InvoiceHeader.RecalculateInvoice(_InvoiceHeader, _onew)
|
_InvoiceHeader.RecalculateInvoice(_InvoiceHeader, _onew)
|
||||||
_onew.CommitChanges()
|
_onew.CommitChanges()
|
||||||
|
|
||||||
|
If _InvoiceHeader.DateCreated >= #2018-07-01# And _InvoiceHeader.IsEditable = False And String.IsNullOrEmpty(_InvoiceHeader.DocumentNumber) = False And _InvoiceHeader.IsProforma = False Then
|
||||||
|
If Math.Abs(_InvoiceHeader.TotalVATHUF) >= 100000 Then
|
||||||
|
RaiseEvent FireNAVmanageInvoiceFinalWork(_InvoiceHeader)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If _ORI_Invoice_Popup.IsLiquidAssets AndAlso _ORI_Invoice_Popup.PaymentOption.PayMode = ePayMode.InCash And _ORI_Invoice_Popup.IsFinalInvoice Then
|
If _ORI_Invoice_Popup.IsLiquidAssets AndAlso _ORI_Invoice_Popup.PaymentOption.PayMode = ePayMode.InCash And _ORI_Invoice_Popup.IsFinalInvoice Then
|
||||||
CreateGLCassa(_InvoiceHeader, _onew, _ORI_Invoice_Popup)
|
CreateGLCassa(_InvoiceHeader, _onew, _ORI_Invoice_Popup)
|
||||||
@@ -3097,6 +3102,12 @@ CheckError:
|
|||||||
_InvoiceHeader.RecalculateInvoice(_InvoiceHeader, _ocur)
|
_InvoiceHeader.RecalculateInvoice(_InvoiceHeader, _ocur)
|
||||||
_ocur.CommitChanges()
|
_ocur.CommitChanges()
|
||||||
|
|
||||||
|
If _InvoiceHeader.DateCreated >= #2018-07-01# And _InvoiceHeader.IsEditable = False And String.IsNullOrEmpty(_InvoiceHeader.DocumentNumber) = False And _InvoiceHeader.IsProforma = False Then
|
||||||
|
If Math.Abs(_InvoiceHeader.TotalVATHUF) >= 100000 Then
|
||||||
|
RaiseEvent FireNAVmanageInvoiceFinalWork(_InvoiceHeader)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
Exit Sub
|
Exit Sub
|
||||||
CheckError:
|
CheckError:
|
||||||
If Err.Number = 91 Then Resume Next
|
If Err.Number = 91 Then Resume Next
|
||||||
@@ -3562,6 +3573,13 @@ CheckError:
|
|||||||
_onew.CommitChanges()
|
_onew.CommitChanges()
|
||||||
_InvoiceHeader.RecalculateInvoice(_InvoiceHeader, _onew)
|
_InvoiceHeader.RecalculateInvoice(_InvoiceHeader, _onew)
|
||||||
_onew.CommitChanges()
|
_onew.CommitChanges()
|
||||||
|
|
||||||
|
If _InvoiceHeader.DateCreated >= #2018-07-01# And _InvoiceHeader.IsEditable = False And String.IsNullOrEmpty(_InvoiceHeader.DocumentNumber) = False And _InvoiceHeader.IsProforma = False Then
|
||||||
|
If Math.Abs(_InvoiceHeader.TotalVATHUF) >= 100000 Then
|
||||||
|
RaiseEvent FireNAVmanageInvoiceFinalWork(_InvoiceHeader)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
Frame.GetController(Of RefreshController).RefreshAction.DoExecute()
|
Frame.GetController(Of RefreshController).RefreshAction.DoExecute()
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
|
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
|
||||||
@@ -3831,6 +3849,12 @@ CheckError:
|
|||||||
_InvoiceHeader.RecalculateInvoice(_InvoiceHeader, _onew)
|
_InvoiceHeader.RecalculateInvoice(_InvoiceHeader, _onew)
|
||||||
_onew.CommitChanges()
|
_onew.CommitChanges()
|
||||||
|
|
||||||
|
If _InvoiceHeader.DateCreated >= #2018-07-01# And _InvoiceHeader.IsEditable = False And String.IsNullOrEmpty(_InvoiceHeader.DocumentNumber) = False And _InvoiceHeader.IsProforma = False Then
|
||||||
|
If Math.Abs(_InvoiceHeader.TotalVATHUF) >= 100000 Then
|
||||||
|
RaiseEvent FireNAVmanageInvoiceFinalWork(_InvoiceHeader)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
'Készpénz esetén pénztári bizonylat is !!!
|
'Készpénz esetén pénztári bizonylat is !!!
|
||||||
If _ORI_Invoice_Popup.IsLiquidAssets AndAlso _ORI_Invoice_Popup.PaymentOption.PayMode = ePayMode.InCash And _ORI_Invoice_Popup.IsFinalInvoice Then
|
If _ORI_Invoice_Popup.IsLiquidAssets AndAlso _ORI_Invoice_Popup.PaymentOption.PayMode = ePayMode.InCash And _ORI_Invoice_Popup.IsFinalInvoice Then
|
||||||
CreateGLCassa(_InvoiceHeader, _onew, _ORI_Invoice_Popup)
|
CreateGLCassa(_InvoiceHeader, _onew, _ORI_Invoice_Popup)
|
||||||
@@ -3912,6 +3936,13 @@ CheckError:
|
|||||||
For Each _InvoiceHeader As InvoiceHeader In _InvoiceHeaderNew_Collection
|
For Each _InvoiceHeader As InvoiceHeader In _InvoiceHeaderNew_Collection
|
||||||
_InvoiceHeader.RecalculateInvoice(_InvoiceHeader, _onew)
|
_InvoiceHeader.RecalculateInvoice(_InvoiceHeader, _onew)
|
||||||
_onew.CommitChanges()
|
_onew.CommitChanges()
|
||||||
|
|
||||||
|
If _InvoiceHeader.DateCreated >= #2018-07-01# And _InvoiceHeader.IsEditable = False And String.IsNullOrEmpty(_InvoiceHeader.DocumentNumber) = False And _InvoiceHeader.IsProforma = False Then
|
||||||
|
If Math.Abs(_InvoiceHeader.TotalVATHUF) >= 100000 Then
|
||||||
|
RaiseEvent FireNAVmanageInvoiceFinalWork(_InvoiceHeader)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
Frame.GetController(Of RefreshController).RefreshAction.DoExecute()
|
Frame.GetController(Of RefreshController).RefreshAction.DoExecute()
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
@@ -4014,6 +4045,12 @@ CheckError:
|
|||||||
_InvoiceHeader.RecalculateInvoice(_InvoiceHeader, _onew)
|
_InvoiceHeader.RecalculateInvoice(_InvoiceHeader, _onew)
|
||||||
_onew.CommitChanges()
|
_onew.CommitChanges()
|
||||||
|
|
||||||
|
If _InvoiceHeader.DateCreated >= #2018-07-01# And _InvoiceHeader.IsEditable = False And String.IsNullOrEmpty(_InvoiceHeader.DocumentNumber) = False And _InvoiceHeader.IsProforma = False Then
|
||||||
|
If Math.Abs(_InvoiceHeader.TotalVATHUF) >= 100000 Then
|
||||||
|
RaiseEvent FireNAVmanageInvoiceFinalWork(_InvoiceHeader)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
Dim _uow_pci As New UnitOfWork(_onew.Session.DataLayer)
|
Dim _uow_pci As New UnitOfWork(_onew.Session.DataLayer)
|
||||||
GLFunctions.ReconfigurePCI(_uow_pci, _InvoiceHeader.CustomersFrom, _InvoiceHeader.Customers, 0, _InvoiceHeader.ConnectInfo)
|
GLFunctions.ReconfigurePCI(_uow_pci, _InvoiceHeader.CustomersFrom, _InvoiceHeader.Customers, 0, _InvoiceHeader.ConnectInfo)
|
||||||
|
|
||||||
@@ -4215,6 +4252,12 @@ CheckError:
|
|||||||
_InvoiceHeader.RecalculateInvoice(_InvoiceHeader, _ocur)
|
_InvoiceHeader.RecalculateInvoice(_InvoiceHeader, _ocur)
|
||||||
_ocur.CommitChanges()
|
_ocur.CommitChanges()
|
||||||
|
|
||||||
|
If _InvoiceHeader.DateCreated >= #2018-07-01# And _InvoiceHeader.IsEditable = False And String.IsNullOrEmpty(_InvoiceHeader.DocumentNumber) = False And _InvoiceHeader.IsProforma = False Then
|
||||||
|
If Math.Abs(_InvoiceHeader.TotalVATHUF) >= 100000 Then
|
||||||
|
RaiseEvent FireNAVmanageInvoiceFinalWork(_InvoiceHeader)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
Dim _uow_pci As New UnitOfWork(_ocur.Session.DataLayer)
|
Dim _uow_pci As New UnitOfWork(_ocur.Session.DataLayer)
|
||||||
GLFunctions.ReconfigurePCI(_uow_pci, _InvoiceHeader.CustomersFrom, _InvoiceHeader.Customers, 0, _InvoiceHeader.ConnectInfo)
|
GLFunctions.ReconfigurePCI(_uow_pci, _InvoiceHeader.CustomersFrom, _InvoiceHeader.Customers, 0, _InvoiceHeader.ConnectInfo)
|
||||||
|
|
||||||
@@ -4620,6 +4663,12 @@ CheckError:
|
|||||||
|
|
||||||
_ocur.Session.ExecuteNonQuery(_SQL)
|
_ocur.Session.ExecuteNonQuery(_SQL)
|
||||||
|
|
||||||
|
If _InvoiceHeader.DateCreated >= #2018-07-01# And _InvoiceHeader.IsEditable = False And String.IsNullOrEmpty(_InvoiceHeader.DocumentNumber) = False And _InvoiceHeader.IsProforma = False Then
|
||||||
|
If Math.Abs(_InvoiceHeader.TotalVATHUF) >= 100000 Then
|
||||||
|
RaiseEvent FireNAVmanageInvoiceFinalWork(_InvoiceHeader)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If TryCast(e.PopupWindow.View.SelectedObjects(0), ORI_Invoice_Popup).IsFinalInvoice Then
|
If TryCast(e.PopupWindow.View.SelectedObjects(0), ORI_Invoice_Popup).IsFinalInvoice Then
|
||||||
Dim _uow_pci As New UnitOfWork(_ocur.Session.DataLayer)
|
Dim _uow_pci As New UnitOfWork(_ocur.Session.DataLayer)
|
||||||
GLFunctions.ReconfigurePCI(_uow_pci, _InvoiceHeader.CustomersFrom, _InvoiceHeader.Customers, 0, _InvoiceHeader.ConnectInfo)
|
GLFunctions.ReconfigurePCI(_uow_pci, _InvoiceHeader.CustomersFrom, _InvoiceHeader.Customers, 0, _InvoiceHeader.ConnectInfo)
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
<system.diagnostics>
|
<system.diagnostics>
|
||||||
<switches>
|
<switches>
|
||||||
<!-- Use the one of predefined values: 0-Off, 1-Errors, 2-Warnings, 3-Info, 4-Verbose. The default value is 3. -->
|
<!-- Use the one of predefined values: 0-Off, 1-Errors, 2-Warnings, 3-Info, 4-Verbose. The default value is 3. -->
|
||||||
<add name="eXpressAppFramework" value="0" />
|
<add name="eXpressAppFramework" value="3" />
|
||||||
<!--<add name="XPO" value="4" />-->
|
<!--<add name="XPO" value="4" />-->
|
||||||
<add name="AllowDebugXtraReportScripts" value="False" />
|
<add name="AllowDebugXtraReportScripts" value="False" />
|
||||||
</switches>
|
</switches>
|
||||||
|
|||||||
Reference in New Issue
Block a user