NAV OnlineInvoices

This commit is contained in:
2018-07-18 13:54:19 +02:00
parent 51be4568d2
commit 6ce0c4c9eb
15 changed files with 1107 additions and 147 deletions
@@ -0,0 +1,93 @@
namespace Nuvolar.Module.Controllers
{
partial class NAV_Online_VC
{
/// <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();
this.aNAV_queryInvoiceStatus = new DevExpress.ExpressApp.Actions.SimpleAction(this.components);
this.aNAV_manageInvoice = new DevExpress.ExpressApp.Actions.SimpleAction(this.components);
this.aNAV_queryTaxpayer = new DevExpress.ExpressApp.Actions.SimpleAction(this.components);
this.aNAV_queryInvoiceData = new DevExpress.ExpressApp.Actions.SimpleAction(this.components);
//
// aNAV_queryInvoiceStatus
//
this.aNAV_queryInvoiceStatus.Caption = "aNAV_queryInvoiceStatus";
this.aNAV_queryInvoiceStatus.ConfirmationMessage = null;
this.aNAV_queryInvoiceStatus.Id = "aNAV_queryInvoiceStatus";
this.aNAV_queryInvoiceStatus.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject;
this.aNAV_queryInvoiceStatus.TargetObjectType = typeof(Nuvolar.Module.InvoiceHeader);
this.aNAV_queryInvoiceStatus.ToolTip = null;
this.aNAV_queryInvoiceStatus.Execute += new DevExpress.ExpressApp.Actions.SimpleActionExecuteEventHandler(this.aNAV_queryInvoiceStatus_Execute);
//
// aNAV_manageInvoice
//
this.aNAV_manageInvoice.Caption = "aNAV_manageInvoice";
this.aNAV_manageInvoice.ConfirmationMessage = null;
this.aNAV_manageInvoice.Id = "aNAV_manageInvoice";
this.aNAV_manageInvoice.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject;
this.aNAV_manageInvoice.TargetObjectType = typeof(Nuvolar.Module.InvoiceHeader);
this.aNAV_manageInvoice.ToolTip = null;
this.aNAV_manageInvoice.Execute += new DevExpress.ExpressApp.Actions.SimpleActionExecuteEventHandler(this.aNAV_manageInvoice_Execute);
//
// aNAV_queryTaxpayer
//
this.aNAV_queryTaxpayer.Caption = "aNAV_queryTaxpayer";
this.aNAV_queryTaxpayer.ConfirmationMessage = null;
this.aNAV_queryTaxpayer.Id = "aNAV_queryTaxpayer";
this.aNAV_queryTaxpayer.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject;
this.aNAV_queryTaxpayer.TargetObjectType = typeof(Nuvolar.Module.Customers);
this.aNAV_queryTaxpayer.ToolTip = null;
this.aNAV_queryTaxpayer.Execute += new DevExpress.ExpressApp.Actions.SimpleActionExecuteEventHandler(this.aNAV_queryTaxpayer_Execute);
//
// aNAV_queryInvoiceData
//
this.aNAV_queryInvoiceData.Caption = "aNAV_queryInvoiceData";
this.aNAV_queryInvoiceData.ConfirmationMessage = null;
this.aNAV_queryInvoiceData.Id = "aNAV_queryInvoiceData";
this.aNAV_queryInvoiceData.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject;
this.aNAV_queryInvoiceData.TargetObjectType = typeof(Nuvolar.Module.InvoiceHeader);
this.aNAV_queryInvoiceData.ToolTip = null;
this.aNAV_queryInvoiceData.Execute += new DevExpress.ExpressApp.Actions.SimpleActionExecuteEventHandler(this.aNAV_queryInvoiceData_Execute);
//
// NAV_Online_VC
//
this.Actions.Add(this.aNAV_queryInvoiceStatus);
this.Actions.Add(this.aNAV_manageInvoice);
this.Actions.Add(this.aNAV_queryTaxpayer);
this.Actions.Add(this.aNAV_queryInvoiceData);
}
#endregion
private DevExpress.ExpressApp.Actions.SimpleAction aNAV_queryInvoiceStatus;
private DevExpress.ExpressApp.Actions.SimpleAction aNAV_manageInvoice;
private DevExpress.ExpressApp.Actions.SimpleAction aNAV_queryTaxpayer;
private DevExpress.ExpressApp.Actions.SimpleAction aNAV_queryInvoiceData;
}
}
@@ -0,0 +1,259 @@
using DevExpress.Data.Filtering;
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Actions;
using DevExpress.ExpressApp.Xpo;
using Newtonsoft.Json;
using Nuvolar.Module.StaticClass;
namespace Nuvolar.Module.Controllers
{
public partial class NAV_Online_VC : ViewController
{
public NAV_Online_VC()
{
InitializeComponent();
// Target required Views (via the TargetXXX properties) and create their Actions.
}
protected override void OnActivated()
{
base.OnActivated();
// Perform various tasks depending on the target View.
}
protected override void OnViewControlsCreated()
{
base.OnViewControlsCreated();
// Access and customize the target View control.
}
protected override void OnDeactivated()
{
// Unsubscribe from previously subscribed events and release other references and resources.
base.OnDeactivated();
}
/// <summary>
/// Adószám ellenőrzése a kiválasztott ügyfelek alapján
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void aNAV_queryTaxpayer_Execute(object sender, SimpleActionExecuteEventArgs e)
{
XPObjectSpace _ocur = View.ObjectSpace as XPObjectSpace;
Customers _Customers = View.SelectedObjects[0] as Customers;
CustomersFrom _CustomersFrom = _ocur.FindObject<CustomersFrom>(CriteriaOperator.Parse("IsDefault=True"));
var _postData = new
{
customersfrom = _CustomersFrom.Oid.ToString(),
taxPayer = _Customers.VATNumber.Substring(0, 8),
softwareId = "123456789123456789",
softwareName = "3C ERP System",
softwareOperation = "ONLINE_SERVICE",
softwareMainVersion = "17.2.3",
softwareDevName = "3C Távközlési Kft.",
softwareDevContact = "http:\\3ctelecom.hu",
softwareDevCountryCode = "HU",
softwareDevTaxNumber = "10644209-2-43"
};
RestAPI.ExecuteRootePOST("onlineinvoice/querytaxpayer", true, JsonConvert.SerializeObject(_postData));
var _StatusCode = RestAPI.StatusCode;
var _StatusDescription = RestAPI.StatusMessage;
if (_StatusCode == 200)
{
dynamic _ResultJSON = JsonConvert.DeserializeObject(_StatusDescription);
if (_ResultJSON.status.ToString() == "OK")
{
if (_ResultJSON.taxpayerValidity["0"].ToString() == "false")
{
_ocur.Session.ExecuteNonQuery(string.Format("UPDATE Customers set NAV_valid = 0,NAV_queryDate=NOW() WHERE Oid = '{0}'",
_Customers.Oid.ToString()));
}
if (_ResultJSON.taxpayerValidity["0"].ToString() == "true")
{
_ocur.Session.ExecuteNonQuery(string.Format("UPDATE Customers set NAV_valid = 1,NAV_queryDate=NOW() WHERE Oid = '{0}'",
_Customers.Oid.ToString()));
}
Application.ShowViewStrategy.ShowMessage("Adószám ellenőrzés megtörtént !", InformationType.Success, 2000, InformationPosition.Bottom);
}
if (_ResultJSON.status.ToString() == "ERROR")
{
string _ERROR = "Adószám ellenőrzés nem történt meg !";
_ERROR += " [" + _ResultJSON.xml.result.message.ToString() + "]";
Application.ShowViewStrategy.ShowMessage(_ERROR, InformationType.Error, 5000, InformationPosition.Bottom);
}
}
else
{
string _ERROR = "Adószám ellenőrzés nem történt meg !";
_ERROR += " [" + _StatusDescription.ToString() + "]";
Application.ShowViewStrategy.ShowMessage(_ERROR, InformationType.Error, 5000, InformationPosition.Bottom);
}
}
private void aNAV_manageInvoice_Execute(object sender, SimpleActionExecuteEventArgs e)
{
XPObjectSpace _ocur = View.ObjectSpace as XPObjectSpace;
InvoiceHeader _InvoiceHeader = View.SelectedObjects[0] as InvoiceHeader;
string _operation = "CREATE";
if (_InvoiceHeader.IsStorno)
{
_operation = "STORNO";
}
var _postData = new
{
documentnumber = _InvoiceHeader.DocumentNumber,
customersfrom = _InvoiceHeader.CustomersFrom.Oid.ToString(),
operation = _operation,
technicalAnnulment = false,
softwareId = "123456789123456789",
softwareName = "3C ERP System",
softwareOperation = "ONLINE_SERVICE",
softwareMainVersion = "17.2.3",
softwareDevName = "3C Távközlési Kft.",
softwareDevContact = "http:\\3ctelecom.hu",
softwareDevCountryCode = "HU",
softwareDevTaxNumber = "10644209-2-43"
};
RestAPI.ExecuteRootePOST("onlineinvoice/manageinvoice", true, JsonConvert.SerializeObject(_postData));
var _StatusCode = RestAPI.StatusCode;
var _StatusDescription = RestAPI.StatusMessage;
if (_StatusCode == 200)
{
dynamic _ResultJSON = JsonConvert.DeserializeObject(_StatusDescription);
if (_ResultJSON.status.ToString() == "OK")
{
_ocur.Session.ExecuteNonQuery(string.Format("UPDATE InvoiceHeader set NAV_transactionID='{0}' WHERE Oid = '{1}'", _ResultJSON.transactionId["0"].ToString(), _InvoiceHeader.Oid.ToString()));
Application.ShowViewStrategy.ShowMessage("A számla beküldése megtörtént !", InformationType.Success, 2000, InformationPosition.Bottom);
}
if (_ResultJSON.status.ToString() == "ERROR")
{
string _ERROR = "A számla beküldése nem történt meg !";
_ERROR += " [" + _ResultJSON.xml.result.message.ToString() + "]";
Application.ShowViewStrategy.ShowMessage(_ERROR, InformationType.Error, 5000, InformationPosition.Bottom);
}
}
else
{
string _ERROR = "A számla beküldése nem történt meg !";
_ERROR += " [" + _StatusDescription + "]";
Application.ShowViewStrategy.ShowMessage(_ERROR, InformationType.Error, 5000, InformationPosition.Bottom);
}
(View as ListView).CollectionSource.Reload();
}
private void aNAV_queryInvoiceStatus_Execute(object sender, SimpleActionExecuteEventArgs e)
{
XPObjectSpace _ocur = View.ObjectSpace as XPObjectSpace;
InvoiceHeader _InvoiceHeader = View.SelectedObjects[0] as InvoiceHeader;
var _postData = new
{
documentnumber = _InvoiceHeader.DocumentNumber,
customersfrom = _InvoiceHeader.CustomersFrom.Oid.ToString(),
transactionId = _InvoiceHeader.NAV_transactionId,
softwareId = "123456789123456789",
softwareName = "3C ERP System",
softwareOperation = "ONLINE_SERVICE",
softwareMainVersion = "17.2.3",
softwareDevName = "3C Távközlési Kft.",
softwareDevContact = "http:\\3ctelecom.hu",
softwareDevCountryCode = "HU",
softwareDevTaxNumber = "10644209-2-43"
};
RestAPI.ExecuteRootePOST("onlineinvoice/queryinvoicestatus", true, JsonConvert.SerializeObject(_postData));
var _StatusCode = RestAPI.StatusCode;
var _StatusDescription = RestAPI.StatusMessage;
if (_StatusCode == 200)
{
dynamic _ResultJSON = JsonConvert.DeserializeObject(_StatusDescription);
if (_ResultJSON.status.ToString() == "OK")
{
_ocur.Session.ExecuteNonQuery(string.Format("UPDATE InvoiceHeader set NAV_InvoiceStatus='{0}',NAV_queryDate=NOW() WHERE Oid = '{1}'",
_ResultJSON.processingResults.processingResult.invoiceStatus.ToString(), _InvoiceHeader.Oid.ToString()));
Application.ShowViewStrategy.ShowMessage("A számla státusz lekérdezése megtörtént !", InformationType.Success, 2000, InformationPosition.Bottom);
}
if (_ResultJSON.status.ToString() == "ERROR")
{
}
}
else
{
string _ERROR = "A számla státusz ellenőrzés nem történt meg !";
_ERROR += " [" + _StatusDescription + "]";
Application.ShowViewStrategy.ShowMessage(_ERROR, InformationType.Error, 5000, InformationPosition.Bottom);
}
}
private void aNAV_queryInvoiceData_Execute(object sender, SimpleActionExecuteEventArgs e)
{
InvoiceHeader _InvoiceHeader = View.SelectedObjects[0] as InvoiceHeader;
var _postData = new
{
invoiceNumber = _InvoiceHeader.DocumentNumber,
customersfrom = _InvoiceHeader.CustomersFrom.Oid.ToString(),
softwareId = "123456789123456789",
softwareName = "3C ERP System",
softwareOperation = "ONLINE_SERVICE",
softwareMainVersion = "17.2.3",
softwareDevName = "3C Távközlési Kft.",
softwareDevContact = "http:\\3ctelecom.hu",
softwareDevCountryCode = "HU",
softwareDevTaxNumber = "10644209-2-43"
};
RestAPI.ExecuteRootePOST("onlineinvoice/queryinvoicedata", true, JsonConvert.SerializeObject(_postData));
var _StatusCode = RestAPI.StatusCode;
var _StatusDescription = RestAPI.StatusMessage;
if (_StatusCode == 200)
{
dynamic _ResultJSON = JsonConvert.DeserializeObject(_StatusDescription);
if (_ResultJSON.status.ToString() == "OK")
{
if (_ResultJSON.queryResults.availablePage.ToString() == "0")
{
string _ERROR = "A számla adat ellenőrzés megtörtént ! Nincs elérhető adat!";
Application.ShowViewStrategy.ShowMessage(_ERROR, InformationType.Warning, 5000, InformationPosition.Bottom);
}
if (_ResultJSON.queryResults.availablePage.ToString() != "0")
{
string _ERROR = "A számla adat ellenőrzés megtörtént !";
Application.ShowViewStrategy.ShowMessage(_ERROR, InformationType.Success, 5000, InformationPosition.Bottom);
}
}
if (_ResultJSON.status.ToString() == "ERROR")
{
string _ERROR = "A számla adat ellenőrzés nem történt meg !";
_ERROR += " [" + _ResultJSON.technicalValidationMessages.message.ToString() + "]";
Application.ShowViewStrategy.ShowMessage(_ERROR, InformationType.Error, 5000, InformationPosition.Bottom);
}
}
else
{
string _ERROR = "A számla státusz ellenőrzés nem történt meg !";
_ERROR += " [" + _StatusDescription + "]";
Application.ShowViewStrategy.ShowMessage(_ERROR, InformationType.Error, 5000, InformationPosition.Bottom);
}
}
}
}
+29
View File
@@ -0,0 +1,29 @@
using DevExpress.Persistent.Base;
using DevExpress.Persistent.BaseImpl.PermissionPolicy;
using DevExpress.Xpo;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Nuvolar.Module.Laravel
{
[DefaultClassOptions, Persistent("Users")]
public class Users : XPLiteObject
{
public Users(Session session)
: base(session)
{
}
public override void AfterConstruction()
{
base.AfterConstruction();
}
[Key(true), Persistent("id")] public int id;
[Persistent("name")] public string name;
[Persistent("email")] public string email;
[Persistent("api_token")] public string api_token;
[Persistent("permissionpolicyuser"), NoForeignKey] public PermissionPolicyUser PermissionPolicyUser;
[NonPersistent, VisibleInListView(false), VisibleInLookupListView(false)] public string row_password;
}
}
@@ -67,6 +67,15 @@
<Items> <Items>
<Item Id="FinancialTransactions"> <Item Id="FinancialTransactions">
<Items> <Items>
<Item Id="@ID_AccountTransactions">
<Items>
<Item Id="@Invoices">
<Items>
<Item Id="@InvoiceHeader_ListView_NAV" Caption="NAV jelentés köteles számlák" />
</Items>
</Item>
</Items>
</Item>
<Item Id="PartnerAccountHandling"> <Item Id="PartnerAccountHandling">
<Items> <Items>
<Item Id="PCIGroupAdvance_ListView" Caption="Partner pontozási infó (előleg)" /> <Item Id="PCIGroupAdvance_ListView" Caption="Partner pontozási infó (előleg)" />
@@ -83,6 +92,18 @@
</Items> </Items>
</NavigationItems> </NavigationItems>
<Views> <Views>
<DetailView Id="CustomersFrom_DetailView">
<Layout>
<LayoutGroup Id="Main">
<LayoutGroup Id="SimpleEditors">
<LayoutGroup Id="Autod257e2eb-d1ce-4fce-9922-dea39f6d87ed" Caption="Autod257e2eb-d1ce-4fce-9922-dea39f6d87ed(3)" />
</LayoutGroup>
<TabbedGroup Id="Tabs">
<LayoutGroup Id="Item2" Caption="NAV adatok" />
</TabbedGroup>
</LayoutGroup>
</Layout>
</DetailView>
<DetailView Id="CustomersOrder_DetailView"> <DetailView Id="CustomersOrder_DetailView">
<Layout> <Layout>
<LayoutGroup Id="Main"> <LayoutGroup Id="Main">
@@ -95,6 +116,7 @@
</LayoutGroup> </LayoutGroup>
</Layout> </Layout>
</DetailView> </DetailView>
<ListView Id="InvoiceHeader_ListView_NAV" Caption="NAV jel. szlák" />
<DetailView Id="NAVInvoiceReport_DetailView"> <DetailView Id="NAVInvoiceReport_DetailView">
<Items> <Items>
<ActionContainerViewItem Id="@NAVReport" Caption="@NAVReport(13)" /> <ActionContainerViewItem Id="@NAVReport" Caption="@NAVReport(13)" />
@@ -7,6 +7,7 @@
<Action Id="aDeliveryNoteOutPrint_Divided" ImageName="MenuBar_Print" TargetObjectsCriteria="[DividedOriginal] In (2L, 1L)" /> <Action Id="aDeliveryNoteOutPrint_Divided" ImageName="MenuBar_Print" TargetObjectsCriteria="[DividedOriginal] In (2L, 1L)" />
<Action Id="aMoveOrderIn" ImageName="replace2" /> <Action Id="aMoveOrderIn" ImageName="replace2" />
<Action Id="aMoveOrderInBack" ImageName="selection_replace" TargetObjectsCriteria="[OrderInHeader.IsEditable] = True And [QTT_Invoiced] = 0.0 And [QTT_DeliveryNoted] &gt; 0.0 And [QTT_DeliveryNoted] = [QTT_Storaged] And [DividedOriginal] = 1L" /> <Action Id="aMoveOrderInBack" ImageName="selection_replace" TargetObjectsCriteria="[OrderInHeader.IsEditable] = True And [QTT_Invoiced] = 0.0 And [QTT_DeliveryNoted] &gt; 0.0 And [QTT_DeliveryNoted] = [QTT_Storaged] And [DividedOriginal] = 1L" />
<Action Id="aNAV_queryTaxpayer" Caption="NAV adószám ellenőrzés" TargetObjectsCriteria="Not IsNullOrEmpty([VATNumber])" />
<Action Id="aOpenWindowsExplorer" ImageName="console" /> <Action Id="aOpenWindowsExplorer" ImageName="console" />
<Action Id="aOrderInStorageOut" ImageName="document_out" /> <Action Id="aOrderInStorageOut" ImageName="document_out" />
<Action Id="aPrint_DeliveryNoteOutHeader" ImageName="Action_Printing_Print" TargetObjectsCriteria="[DeliveryNoteOutHeader] Is Not Null" /> <Action Id="aPrint_DeliveryNoteOutHeader" ImageName="Action_Printing_Print" TargetObjectsCriteria="[DeliveryNoteOutHeader] Is Not Null" />
@@ -59,6 +60,17 @@
<Items> <Items>
<Item Id="FinancialTransactions"> <Item Id="FinancialTransactions">
<Items> <Items>
<Item Id="@ID_AccountTransactions">
<Items>
<Item Id="@Invoices">
<Items>
<Item Id="@InvoiceHeader_ListView_NAV" ViewId="InvoiceHeader_ListView_NAV" Index="1" IsNewNode="True" />
<Item Id="@InvoiceRows_ListView" Index="2" />
<Item Id="@Factoring" Index="3" />
</Items>
</Item>
</Items>
</Item>
<Item Id="PartnerAccountHandling"> <Item Id="PartnerAccountHandling">
<Items> <Items>
<Item Id="PCIGroup_ListView" Index="0" /> <Item Id="PCIGroup_ListView" Index="0" />
@@ -106,6 +118,49 @@
<ColumnInfo Id="Completed" Index="4" Width="49" /> <ColumnInfo Id="Completed" Index="4" Width="49" />
</Columns> </Columns>
</ListView> </ListView>
<DetailView Id="CustomersFrom_DetailView">
<Layout>
<LayoutGroup Id="Main">
<LayoutGroup Id="SimpleEditors" RelativeSize="26.825842696629213">
<LayoutGroup Id="Autod257e2eb-d1ce-4fce-9922-dea39f6d87ed" RelativeSize="70.157068062827221">
<LayoutGroup Id="Customers_col1" RelativeSize="47.508591065292094">
<LayoutItem Id="CustomerNumber" RelativeSize="23.880597014925375" />
<LayoutItem Id="Name" RelativeSize="17.910447761194028" />
<LayoutItem Id="FullName" RelativeSize="17.910447761194028" />
<LayoutItem Id="CustomersNG" RelativeSize="17.910447761194028" />
<LayoutItem Id="Email" RelativeSize="22.388059701492537" />
</LayoutGroup>
<LayoutGroup Id="Customers_col2" RelativeSize="52.491408934707906">
<LayoutItem Id="IsDefault" RelativeSize="23.880597014925375" />
<LayoutItem Id="VATNumber" RelativeSize="17.910447761194028" />
<LayoutItem Id="VATNumberEU" RelativeSize="17.910447761194028" />
<LayoutItem Id="WebSite" RelativeSize="17.910447761194028" />
<LayoutItem Id="CompanyRegistrationNumber" RelativeSize="22.388059701492537" />
</LayoutGroup>
</LayoutGroup>
<LayoutGroup Id="Party" RelativeSize="29.842931937172775">
<LayoutItem Id="Address1" RelativeSize="47.368421052631582" />
<LayoutItem Id="Address2" RelativeSize="52.631578947368418" />
<LayoutItem Id="Description" Removed="True" />
</LayoutGroup>
</LayoutGroup>
<TabbedGroup Id="Tabs" RelativeSize="73.174157303370791">
<LayoutGroup Id="Customers_BusinessDirectory" Index="5" RelativeSize="100">
<LayoutItem Id="Customers_BusinessDirectory" RelativeSize="100" />
</LayoutGroup>
<LayoutGroup Id="OfferOutRows" Index="6" RelativeSize="100">
<LayoutItem Id="OfferOutRows" RelativeSize="100" />
</LayoutGroup>
<LayoutGroup Id="Item2" ShowCaption="True" CaptionLocation="Top" Direction="Vertical" Index="7" RelativeSize="100" IsNewNode="True">
<LayoutItem Id="NAV_login" ViewItem="NAV_login" Index="0" RelativeSize="6.6945606694560666" IsNewNode="True" />
<LayoutItem Id="NAV_password" ViewItem="NAV_password" Index="1" RelativeSize="5.02092050209205" IsNewNode="True" />
<LayoutItem Id="NAV_exchangeKey" ViewItem="NAV_exchangeKey" Index="2" RelativeSize="5.02092050209205" IsNewNode="True" />
<LayoutItem Id="NAV_xmlSignkey" ViewItem="NAV_xmlSignkey" Index="3" RelativeSize="83.263598326359826" IsNewNode="True" />
</LayoutGroup>
</TabbedGroup>
</LayoutGroup>
</Layout>
</DetailView>
<DetailView Id="CustomersOrder_DetailView"> <DetailView Id="CustomersOrder_DetailView">
<Layout> <Layout>
<LayoutGroup Id="Main"> <LayoutGroup Id="Main">
@@ -164,6 +219,71 @@
<ColumnInfo Id="DocumentPath" PropertyName="DocumentPath" Index="6" InLineEdit="True" InLineEditAutoCommit="True" IsNewNode="True" /> <ColumnInfo Id="DocumentPath" PropertyName="DocumentPath" Index="6" InLineEdit="True" InLineEditAutoCommit="True" IsNewNode="True" />
</Columns> </Columns>
</ListView> </ListView>
<ListView Id="InvoiceHeader_ListView_NAV" ClassName="Nuvolar.Module.InvoiceHeader" IsGroupPanelVisible="True" AutoExpandAllGroups="True" Criteria="[IsEditable] = False And [IsProforma] = False And ([TotalVATHUF] &gt;= 100000.0 OR [TotalVATHUF] &lt;= -100000.0) And Not IsNullOrEmpty([DocumentNumber])" AllowDelete="False" AllowLink="False" AllowNew="False" IsNewNode="True">
<Columns IsNewNode="True">
<ColumnInfo Id="AssetsHandling_GLMixed" PropertyName="AssetsHandling_GLMixed" Width="70" Index="-1" IsNewNode="True" />
<ColumnInfo Id="AssetsHandling_Note" PropertyName="AssetsHandling_Note" Width="70" Index="-1" IsNewNode="True" />
<ColumnInfo Id="AssetsHandlingStatus" PropertyName="AssetsHandlingStatus" Width="70" Index="-1" IsNewNode="True" />
<ColumnInfo Id="BankInformation" PropertyName="BankInformation" Index="-1" Width="150" IsNewNode="True" />
<ColumnInfo Id="Contact_string" PropertyName="Contact_string" Width="70" Index="-1" IsNewNode="True" />
<ColumnInfo Id="CustomersRefNumber_string" PropertyName="CustomersRefNumber_string" Width="70" Index="-1" IsNewNode="True" />
<ColumnInfo Id="DateExecutionMonth" PropertyName="DateExecutionMonth" Width="70" Index="-1" IsNewNode="True" />
<ColumnInfo Id="DateExecutionQuarter" PropertyName="DateExecutionQuarter" Width="70" Index="-1" IsNewNode="True" />
<ColumnInfo Id="DateExecutionWeek" PropertyName="DateExecutionWeek" Width="70" Index="-1" IsNewNode="True" />
<ColumnInfo Id="DateExecutionYear" PropertyName="DateExecutionYear" Width="70" Index="-1" IsNewNode="True" />
<ColumnInfo Id="DatePaymentMode" PropertyName="DatePaymentMode" Width="70" Index="-1" IsNewNode="True" />
<ColumnInfo Id="DescriptionHeader" PropertyName="DescriptionHeader" Width="70" Index="-1" IsNewNode="True" />
<ColumnInfo Id="DocumentNumberProforma" PropertyName="DocumentNumberProforma" Index="-1" Width="80" IsNewNode="True" />
<ColumnInfo Id="Factoring_PDF_Signed" PropertyName="Factoring_PDF_Signed" Width="124" Index="-1" IsNewNode="True" />
<ColumnInfo Id="Factoring_Send" PropertyName="Factoring_Send" Width="97" Index="-1" IsNewNode="True" />
<ColumnInfo Id="Factoring_Send_Date" PropertyName="Factoring_Send_Date" Width="127" Index="-1" IsNewNode="True" />
<ColumnInfo Id="Factoring_Send_Number" PropertyName="Factoring_Send_Number" Width="136" Index="-1" IsNewNode="True" />
<ColumnInfo Id="InvoiceFactoringBank" PropertyName="InvoiceFactoringBank" Width="129" Index="-1" IsNewNode="True" />
<ColumnInfo Id="InvoiceFactoringParameter" PropertyName="InvoiceFactoringParameter" Width="146" Index="-1" IsNewNode="True" />
<ColumnInfo Id="InvoiceFactoringRows" PropertyName="InvoiceFactoringRows" Width="122" Index="-1" IsNewNode="True" />
<ColumnInfo Id="InvoicePeriod" PropertyName="InvoicePeriod" Index="-1" Width="100" IsNewNode="True" />
<ColumnInfo Id="InvoiceType" PropertyName="InvoiceType" Index="-1" Width="100" IsNewNode="True" />
<ColumnInfo Id="IsAssetsHandling" PropertyName="IsAssetsHandling" Width="50" Index="-1" IsNewNode="True" />
<ColumnInfo Id="IsBookEntry" PropertyName="IsBookEntry" Index="-1" Width="70" IsNewNode="True" />
<ColumnInfo Id="IsCorrigendum" PropertyName="IsCorrigendum" Index="-1" Width="50" IsNewNode="True" />
<ColumnInfo Id="IsCreditNote" PropertyName="IsCreditNote" Width="50" Index="-1" IsNewNode="True" />
<ColumnInfo Id="IsFactoring" PropertyName="IsFactoring" Width="70" Index="-1" IsNewNode="True" />
<ColumnInfo Id="IsLateCharge" PropertyName="IsLateCharge" Width="50" Index="-1" IsNewNode="True" />
<ColumnInfo Id="IsStorno" PropertyName="IsStorno" Index="-1" Width="50" IsNewNode="True" />
<ColumnInfo Id="IsVATClosed" PropertyName="IsVATClosed" Width="50" Index="-1" IsNewNode="True" />
<ColumnInfo Id="LateChargesBalanceHUF" PropertyName="LateChargesBalanceHUF" Width="50" Index="-1" IsNewNode="True" />
<ColumnInfo Id="NotNeedFinancial" PropertyName="NotNeedFinancial" Width="50" Index="-1" IsNewNode="True" />
<ColumnInfo Id="Oid" PropertyName="Oid" Width="70" Index="-1" IsNewNode="True" />
<ColumnInfo Id="PCIGroup" PropertyName="PCIGroup" Width="66" Index="-1" IsNewNode="True" />
<ColumnInfo Id="PDF_Copy" PropertyName="PDF_Copy" Index="-1" Width="70" IsNewNode="True" />
<ColumnInfo Id="PDF_Original" PropertyName="PDF_Original" Index="-1" Width="70" IsNewNode="True" />
<ColumnInfo Id="PrintCopy" PropertyName="PrintCopy" Index="-1" Width="70" IsNewNode="True" />
<ColumnInfo Id="ReadyforBookEntry" PropertyName="ReadyforBookEntry" Index="-1" Width="80" IsNewNode="True" />
<ColumnInfo Id="row_Products" PropertyName="row_Products" Width="70" Index="-1" IsNewNode="True" />
<ColumnInfo Id="row_Services" PropertyName="row_Services" Width="70" Index="-1" IsNewNode="True" />
<ColumnInfo Id="TotalAdvancedBruttoDEV" PropertyName="TotalAdvancedBruttoDEV" Width="187" Index="-1" IsNewNode="True" />
<ColumnInfo Id="TotalAdvancedBruttoHUF" PropertyName="TotalAdvancedBruttoHUF" Width="188" Index="-1" IsNewNode="True" />
<ColumnInfo Id="TotalAdvancedWill" PropertyName="TotalAdvancedWill" Width="151" Index="-1" IsNewNode="True" />
<ColumnInfo Id="TotalNettoDEV" PropertyName="TotalNettoDEV" Width="115" Index="-1" IsNewNode="True" />
<ColumnInfo Id="TotalVATDEV" PropertyName="TotalVATDEV" Width="119" Index="-1" IsNewNode="True" />
<ColumnInfo Id="UserCreated" PropertyName="UserCreated" Width="70" Index="-1" IsNewNode="True" />
<ColumnInfo Id="VATAvowalType" PropertyName="VATAvowalType" Width="70" Index="-1" IsNewNode="True" />
<ColumnInfo Id="Customers" PropertyName="Customers" Index="0" Width="101" GroupIndex="-1" IsNewNode="True" />
<ColumnInfo Id="CustomersFrom" PropertyName="CustomersFrom" Index="1" Width="125" GroupIndex="0" SortOrder="Ascending" IsNewNode="True" />
<ColumnInfo Id="DocumentNumber" PropertyName="DocumentNumber" Index="2" Width="101" IsNewNode="True" />
<ColumnInfo Id="CurrencyName" PropertyName="CurrencyName" Index="3" Width="87" SortOrder="Ascending" GroupIndex="1" IsNewNode="True" />
<ColumnInfo Id="DateCreated" PropertyName="DateCreated" Index="4" Width="94" IsNewNode="True" />
<ColumnInfo Id="DateExecution" PropertyName="DateExecution" Index="5" Width="104" IsNewNode="True" />
<ColumnInfo Id="DatePayment" PropertyName="DatePayment" Index="6" Width="99" IsNewNode="True" />
<ColumnInfo Id="TotalNettoHUF" PropertyName="TotalNettoHUF" Width="116" Index="7" IsNewNode="True" />
<ColumnInfo Id="TotalVATHUF" PropertyName="TotalVATHUF" Width="124" Index="8" IsNewNode="True" />
<ColumnInfo Id="TotalBruttoHUF" PropertyName="TotalBruttoHUF" Index="9" Width="114" IsNewNode="True" />
<ColumnInfo Id="TotalBruttoDEV" PropertyName="TotalBruttoDEV" Index="10" Width="113" IsNewNode="True" />
<ColumnInfo Id="NAV_transactionId" PropertyName="NAV_transactionId" Width="110" Index="11" IsNewNode="True" />
<ColumnInfo Id="NAV_InvoiceStatus" PropertyName="NAV_InvoiceStatus" Width="112" Index="12" IsNewNode="True" />
<ColumnInfo Id="NAV_queryDate" PropertyName="NAV_queryDate" Width="97" Index="13" IsNewNode="True" />
</Columns>
</ListView>
<DetailView Id="NAVInvoiceReport_DetailView"> <DetailView Id="NAVInvoiceReport_DetailView">
<Items> <Items>
<ActionContainerViewItem Id="@NAVReport" ActionContainer="@NAVReport" IsNewNode="True" /> <ActionContainerViewItem Id="@NAVReport" ActionContainer="@NAVReport" IsNewNode="True" />
@@ -190,15 +190,20 @@
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
</Reference> </Reference>
<Reference Include="DevExpress.XtraReports.v17.2.Extensions, Version=17.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" /> <Reference Include="DevExpress.XtraReports.v17.2.Extensions, Version=17.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.VisualBasic" /> <Reference Include="Microsoft.VisualBasic" />
<Reference Include="MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL"> <Reference Include="MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
<HintPath>..\packages\MySql.Data.6.9.9\lib\net40\MySql.Data.dll</HintPath> <HintPath>..\packages\MySql.Data.6.9.9\lib\net40\MySql.Data.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.8.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System"> <Reference Include="System">
<Name>System</Name> <Name>System</Name>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="System.configuration" />
<Reference Include="System.Core"> <Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework> <RequiredTargetFramework>3.5</RequiredTargetFramework>
<Private>False</Private> <Private>False</Private>
@@ -270,6 +275,12 @@
<Compile Include="Controllers\NavInvoiceReportVC.Designer.cs"> <Compile Include="Controllers\NavInvoiceReportVC.Designer.cs">
<DependentUpon>NavInvoiceReportVC.cs</DependentUpon> <DependentUpon>NavInvoiceReportVC.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Controllers\NAV_Online_VC.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Controllers\NAV_Online_VC.Designer.cs">
<DependentUpon>NAV_Online_VC.cs</DependentUpon>
</Compile>
<Compile Include="Controllers\nopCommerce\nopC_VC.cs"> <Compile Include="Controllers\nopCommerce\nopC_VC.cs">
<SubType>Component</SubType> <SubType>Component</SubType>
</Compile> </Compile>
@@ -313,6 +324,7 @@
<Compile Include="Gantt\GanttTaskDependencies.cs" /> <Compile Include="Gantt\GanttTaskDependencies.cs" />
<Compile Include="Helpers\BusinessDocumentHelper.cs" /> <Compile Include="Helpers\BusinessDocumentHelper.cs" />
<Compile Include="Helpers\Laravel\StorageTransactions.cs" /> <Compile Include="Helpers\Laravel\StorageTransactions.cs" />
<Compile Include="Laravel\Users.cs" />
<Compile Include="Module.cs"> <Compile Include="Module.cs">
<SubType>Component</SubType> <SubType>Component</SubType>
</Compile> </Compile>
@@ -327,6 +339,7 @@
<Compile Include="ReportV2\Report_Invoice.Designer.cs"> <Compile Include="ReportV2\Report_Invoice.Designer.cs">
<DependentUpon>Report_Invoice.cs</DependentUpon> <DependentUpon>Report_Invoice.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="StaticClass\RestAPI.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="BusinessObjects\Business\BusinessTransactions\Orders\OrderIn\OrderIn_VC.resx"> <EmbeddedResource Include="BusinessObjects\Business\BusinessTransactions\Orders\OrderIn\OrderIn_VC.resx">
@@ -0,0 +1,234 @@
using DevExpress.Data.Filtering;
using DevExpress.ExpressApp.Xpo;
using DevExpress.Persistent.Base;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
namespace Nuvolar.Module.StaticClass
{
/// <summary>
/// Laravel RestAPI kezelő osztály
/// </summary>
public static class RestAPI
{
private static string _UriBase;
private static Dictionary<string, string> _LoginInfo;
private static int _StatusCode;
private static string _StatusMessage;
private static string _ResponseMessage;
private static string _API_Token;
private static string _GeocodeAPIKey;
public static int StatusCode
{
get { return _StatusCode; }
}
public static string StatusMessage
{
get { return _StatusMessage; }
}
public static string ResponseMessage
{
get { return _ResponseMessage; }
}
public static void Init(XPObjectSpace _onew)
{
_ResponseMessage = "";
_UriBase = ConfigurationManager.AppSettings["Uri"];
_GeocodeAPIKey = ConfigurationManager.AppSettings["GeocodeAPIKey"];
Laravel.Users _Users = _onew.FindObject<Nuvolar.Module.Laravel.Users>(CriteriaOperator.Parse("email='sysadmin@emango.com'"));
if (_Users != null)
{
if (String.IsNullOrEmpty(_Users.api_token))
{
_LoginInfo = new Dictionary<string, string> { { "email", "sysadmin@emango.com" },
{ "password", "SysAdmin" }};
var json = ExecuteRootePOST("login", false, JsonConvert.SerializeObject(_LoginInfo));
if (_StatusCode == 200)
{
var dd = JsonConvert.DeserializeObject(json);
var dict = JObject.Parse(json).SelectToken("data").ToObject<Dictionary<string, string>>();
_API_Token = dict["api_token"];
}
}
else
{
_API_Token = _Users.api_token;
}
}
}
public static string ExecuteRootePOST(string _RooteString, bool _NeedAuthentication, string _postData)
{
_StatusCode = 500;
_StatusMessage = "Not respond";
string json = "";
Tracing.Tracer.LogText(_UriBase + _RooteString);
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
{
WebResponse _WebResponse = _WebRequest.GetResponse();
_StatusCode = (int)((HttpWebResponse)_WebResponse).StatusCode;
_StatusMessage = ((HttpWebResponse)_WebResponse).StatusDescription;
var _responseStream = _WebResponse.GetResponseStream();
if (_responseStream == null) return json;
var _StreamReader = new StreamReader(_responseStream, Encoding.Default);
json = _StreamReader.ReadToEnd();
try
{
_StatusMessage = JsonConvert.DeserializeObject(json).ToString();
}
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;
}
}
return json;
}
public static string ExecuteRooteGET(string _RooteString, bool _NeedAuthentication)
{
string json = "";
Tracing.Tracer.LogText(_UriBase + _RooteString);
var _Uri = new Uri(_UriBase + _RooteString, UriKind.Absolute);
var _WebRequest = WebRequest.Create(_Uri);
_WebRequest.Method = "GET";
HttpWebRequest _HttpWebRequest = (HttpWebRequest)_WebRequest;
if (_NeedAuthentication)
{
_HttpWebRequest.PreAuthenticate = true;
_HttpWebRequest.Headers.Add("Authorization", "Bearer " + _API_Token);
_HttpWebRequest.Headers.Add("cdb", GeneralFunction.GLOBAL_SQLDatabase);
}
_HttpWebRequest.Accept = "application/json";
_HttpWebRequest.ContentType = "application/json";
try
{
WebResponse _WebResponse = _WebRequest.GetResponse();
_StatusCode = (int)((HttpWebResponse)_WebResponse).StatusCode;
Stream _responseStream = _WebResponse.GetResponseStream();
if (_responseStream == null) return json;
StreamReader _StreamReader = new StreamReader(_responseStream, Encoding.Default);
json = _StreamReader.ReadToEnd();
_responseStream.Close();
_WebResponse.Close();
}
catch (WebException ex)
{
if (ex.Status == WebExceptionStatus.ProtocolError)
{
var _WebResponse = (HttpWebResponse)ex.Response;
_StatusCode = (int)_WebResponse.StatusCode;
}
}
return json;
}
public static string ExecuteGOOGLEMAPSGET(string _RouteString)
{
string json = "";
Tracing.Tracer.LogText(_UriBase + _RouteString);
var _Uri = new Uri("https://maps.googleapis.com/maps/api/geocode/json?address=" + _RouteString + "&key=" + _GeocodeAPIKey, UriKind.Absolute);
var _WebRequest = WebRequest.Create(_Uri);
_WebRequest.Method = "GET";
HttpWebRequest _HttpWebRequest = (HttpWebRequest)_WebRequest;
_HttpWebRequest.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8";
_HttpWebRequest.ContentType = "application/json";
_HttpWebRequest.Headers.Add("accept-language", "hu-HU,hu;q=0.9,en-US;q=0.8,en;q=0.7,pt;q=0.6");
try
{
WebResponse _WebResponse = _WebRequest.GetResponse();
_StatusCode = (int)((HttpWebResponse)_WebResponse).StatusCode;
Stream _responseStream = _WebResponse.GetResponseStream();
if (_responseStream == null) return json;
StreamReader _StreamReader = new StreamReader(_responseStream, Encoding.Default);
json = _StreamReader.ReadToEnd();
_responseStream.Close();
_WebResponse.Close();
}
catch (WebException ex)
{
if (ex.Status == WebExceptionStatus.ProtocolError)
{
var _WebResponse = (HttpWebResponse)ex.Response;
_StatusCode = (int)_WebResponse.StatusCode;
}
}
return json;
}
}
}
+1
View File
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="MySql.Data" version="6.9.9" targetFramework="net40" /> <package id="MySql.Data" version="6.9.9" targetFramework="net40" />
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net40" />
</packages> </packages>
@@ -91,7 +91,7 @@ Public Class ProductsGant_VC
End Sub End Sub
Private Sub GenerateData(_ProductsGant As ProductsGant, _onew As Xpo.XPObjectSpace) Private Sub GenerateData(_ProductsGant As ProductsGant, _onew As Xpo.XPObjectSpace)
Dim _FBS As Integer = 0
Dim _SQL As String Dim _SQL As String
@@ -106,151 +106,179 @@ Public Class ProductsGant_VC
Dim _SelectedData As SelectedData = _onew.Session.ExecuteQuery(_SQL) Dim _SelectedData As SelectedData = _onew.Session.ExecuteQuery(_SQL)
'Try Try
_WaitFormClass.Initwork(1, 1, _SelectedData.ResultSet(0).Rows.Length) _WaitFormClass.Initwork(1, 1, _SelectedData.ResultSet(0).Rows.Length)
For Each row As SelectStatementResultRow In _SelectedData.ResultSet(0).Rows For Each row As SelectStatementResultRow In _SelectedData.ResultSet(0).Rows
_WaitFormClass.DoWork() _WaitFormClass.DoWork()
If row.Values(0) IsNot Nothing Then If row.Values(0) IsNot Nothing Then
Dim _ProductsGantRows As ProductsGantRows = Dim _ProductsGantRows As ProductsGantRows =
_onew.FindObject(Of ProductsGantRows)(CriteriaOperator.Parse("Products.Oid = ? AND Customers.Oid= ? AND ProductsGant.Oid= ?", row.Values(1), row.Values(0), _ProductsGant.Oid)) _onew.FindObject(Of ProductsGantRows)(CriteriaOperator.Parse("Products.Oid = ? AND Customers.Oid= ? AND ProductsGant.Oid= ?", row.Values(1), row.Values(0), _ProductsGant.Oid))
If _ProductsGantRows Is Nothing Then If _ProductsGantRows Is Nothing Then
_SQL = "insert ProductsGantRows (Oid,ProductsGant,Customers,Products,CalculatedRotation,ManualRotation,CalculatedRotationW52,QTT_Minimum,QTT_Critical)" _SQL = "insert ProductsGantRows (Oid,ProductsGant,Customers,Products,CalculatedRotation,ManualRotation,CalculatedRotationW52,QTT_Minimum,QTT_Critical)"
_SQL += " select " _SQL += " select "
_SQL += " UUID(), " _SQL += " UUID(), "
_SQL += "'" & _ProductsGant.Oid.ToString() & "'," _SQL += "'" & _ProductsGant.Oid.ToString() & "',"
_SQL += "'" & row.Values(0) & "'," _SQL += "'" & row.Values(0) & "',"
_SQL += "'" & row.Values(1) & "'," _SQL += "'" & row.Values(1) & "',"
_SQL += Double.Parse(row.Values(2)).ToString("F", CultureInfo.InvariantCulture) & "," _SQL += Double.Parse(row.Values(2)).ToString("F", CultureInfo.InvariantCulture) & ","
_SQL += "0," _SQL += "0,"
_SQL += Double.Parse(row.Values(3)).ToString("F", CultureInfo.InvariantCulture) & "," _SQL += Double.Parse(row.Values(3)).ToString("F", CultureInfo.InvariantCulture) & ","
_SQL += "0,0" _SQL += "0,0"
_onew.Session.ExecuteNonQuery(_SQL) _onew.Session.ExecuteNonQuery(_SQL)
Else Else
_SQL = " update ProductsGantRows set CalculatedRotation = " & Double.Parse(row.Values(2)).ToString("F", CultureInfo.InvariantCulture) & "," _SQL = " update ProductsGantRows set CalculatedRotation = " & Double.Parse(row.Values(2)).ToString("F", CultureInfo.InvariantCulture) & ","
_SQL += " CalculatedRotationW52 = " & Double.Parse(row.Values(3)).ToString("F", CultureInfo.InvariantCulture) _SQL += " CalculatedRotationW52 = " & Double.Parse(row.Values(3)).ToString("F", CultureInfo.InvariantCulture)
_SQL += " where Oid='" & _ProductsGantRows.Oid.ToString & "'" _SQL += " where Oid='" & _ProductsGantRows.Oid.ToString & "'"
_onew.Session.ExecuteNonQuery(_SQL) _onew.Session.ExecuteNonQuery(_SQL)
End If
If _ProductsGantRows IsNot Nothing Then
Dim _Item As Long = _GanttControl.Items.get_FindItem(_ProductsGantRows.Oid.ToString, 0)
'Most le kéne generálni a GANTROWSBAR elemeket is .....
_SQL = " select t1.QTT,t1.DateExecution"
_SQL += " from productsgantcustomersreport t1"
_SQL += " where t1.Products='" & row.Values(1) & "'"
_SQL += " AND t1.Customers='" & row.Values(0) & "'"
_SQL += " AND t1.GCRecord is null"
_SQL += " order by t1.DateExecution DESC"
Dim _SelectedData2 As SelectedData = _onew.Session.ExecuteQuery(_SQL)
For Each row2 As SelectStatementResultRow In _SelectedData2.ResultSet(0).Rows
Dim _AD As Double = 1
If Double.Parse(row.Values(2)) <> 0 Then
_AD = row2.Values(0) * 7 / Double.Parse(row.Values(2))
End If
If _ProductsGantRows IsNot Nothing Then
If _ProductsGantRows.ManualRotation > 0 Then
_AD = row2.Values(0) * 7 / _ProductsGantRows.ManualRotation
End If
End If
Dim _Key As String = Guid.NewGuid.ToString
_GanttControl.Items.AddBar(CInt(_Item), "Reported", row2.Values(1), DateTime.Parse(row2.Values(1)).AddDays(_AD), _Key, row2.Values(0))
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize, False)
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMove, False)
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanStartLink, False)
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanBeLinked, False)
_GanttControl.Items.set_BarHAlignCaption(CInt(_Item), _Key, AlignmentEnum.LeftAlignment)
If _ProductsGantRows.QTT_Minimum > 0 Then
Dim _DateTo As DateTime = DateTime.Parse(row2.Values(1)).AddDays(_AD)
Dim _AD2 As Double = 1
If Double.Parse(row.Values(2)) <> 0 Then
_AD2 = _ProductsGantRows.QTT_Minimum * 7 / Double.Parse(row.Values(2))
End If
If _ProductsGantRows IsNot Nothing Then
If _ProductsGantRows.ManualRotation > 0 Then
_AD2 = _ProductsGantRows.QTT_Minimum * 7 / _ProductsGantRows.ManualRotation
End If
End If
Dim _DateFrom As DateTime = _DateTo.AddDays(_AD2 * -1)
Dim _Key2 As String = Guid.NewGuid.ToString
_GanttControl.Items.AddBar(CInt(_Item), "Critical", _DateFrom, _DateTo, _Key2, _ProductsGantRows.QTT_Minimum)
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize, False)
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMove, False)
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanStartLink, False)
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanBeLinked, False)
_GanttControl.Items.set_BarHAlignCaption(CInt(_Item), _Key, AlignmentEnum.LeftAlignment)
_FBS += 1
End If
Exit For
Next
_SQL = " select sum(t1.QTT),DATE_FORMAT(t2.DateExecution,'%Y-%m-%d')"
_SQL += " from OrderInRows t1 join OrderInHeader t2 on t1.OrderInHeader=t2.Oid"
_SQL += " where t1.Products='" & row.Values(1) & "' AND t1.QTT > t1.QTT_Invoiced "
_SQL += " AND t2.Customers='" & row.Values(0) & "'"
_SQL += " AND t1.GCRecord is null and t2.GCRecord is null"
_SQL += " GROUP BY DATE_FORMAT(t2.DateExecution,'%Y-%m-%d')"
_SQL += " order by DATE_FORMAT(t2.DateExecution,'%Y-%m-%d') DESC"
_SelectedData2 = _onew.Session.ExecuteQuery(_SQL)
For Each row2 As SelectStatementResultRow In _SelectedData2.ResultSet(0).Rows
Dim _AD As Double = 1
If Double.Parse(row.Values(2)) <> 0 Then
_AD = row2.Values(0) * 7 / Double.Parse(row.Values(2))
End If
If _ProductsGantRows IsNot Nothing Then
If _ProductsGantRows.ManualRotation > 0 Then
_AD = row2.Values(0) * 7 / _ProductsGantRows.ManualRotation
End If
End If
Dim _Key As String = Guid.NewGuid.ToString
_GanttControl.Items.AddBar(CInt(_Item), "Ordered", row2.Values(1), DateTime.Parse(row2.Values(1)).AddDays(_AD), _Key, row2.Values(0))
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize, False)
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMove, False)
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanStartLink, False)
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanBeLinked, False)
_GanttControl.Items.set_BarHAlignCaption(CInt(_Item), _Key, AlignmentEnum.LeftAlignment)
Next
_SQL = " select sum(t1.QTT),DATE_FORMAT(t2.DateExecution,'%Y-%m-%d')"
_SQL += " from InvoiceRows t1 join InvoiceHeader t2 on t1.InvoiceHeader=t2.Oid"
_SQL += " left join OrderInRows t3 on t1.OrderInRows=t3.Oid"
_SQL += " where t3.Products='" & row.Values(1) & "'"
_SQL += " AND t2.Customers='" & row.Values(0) & "'"
_SQL += " AND t1.GCRecord is null and t2.GCRecord is null AND t2.IsEditable=0"
_SQL += " GROUP BY DATE_FORMAT(t2.DateExecution,'%Y-%m-%d')"
_SQL += " order by DATE_FORMAT(t2.DateExecution,'%Y-%m-%d') DESC"
_SelectedData2 = _onew.Session.ExecuteQuery(_SQL)
For Each row2 As SelectStatementResultRow In _SelectedData2.ResultSet(0).Rows
Dim _AD As Double = 1
If Double.Parse(row.Values(2)) <> 0 Then
_AD = row2.Values(0) * 7 / Double.Parse(row.Values(2))
End If
If _ProductsGantRows IsNot Nothing Then
If _ProductsGantRows.ManualRotation > 0 Then
_AD = row2.Values(0) * 7 / _ProductsGantRows.ManualRotation
End If
End If
Dim _Key As String = Guid.NewGuid.ToString
_GanttControl.Items.AddBar(CInt(_Item), "Accounted", row2.Values(1), DateTime.Parse(row2.Values(1)).AddDays(_AD), _Key, row2.Values(0))
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize, False)
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMove, False)
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanStartLink, False)
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanBeLinked, False)
_GanttControl.Items.set_BarHAlignCaption(CInt(_Item), _Key, AlignmentEnum.LeftAlignment)
Next
End If
End If End If
'IDEIGLENES !!!
'If _FBS > 5 Then Exit For
Next row
Catch ex As Exception
Throw New Exception(ex.Message)
Finally
If _ProductsGantRows IsNot Nothing Then _WaitFormClass.FinalWork()
Dim _Item As Long = _GanttControl.Items.get_FindItem(_ProductsGantRows.Oid.ToString, 0) End Try
'Most le kéne generálni a GANTROWSBAR elemeket is .....
_SQL = " select t1.QTT,t1.DateExecution"
_SQL += " from productsgantcustomersreport t1"
_SQL += " where t1.Products='" & row.Values(1) & "'"
_SQL += " AND t1.Customers='" & row.Values(0) & "'"
_SQL += " AND t1.GCRecord is null"
_SQL += " order by t1.DateExecution DESC"
Dim _SelectedData2 As SelectedData = _onew.Session.ExecuteQuery(_SQL)
For Each row2 As SelectStatementResultRow In _SelectedData2.ResultSet(0).Rows
Dim _AD As Double = 1
If Double.Parse(row.Values(2)) <> 0 Then
_AD = row2.Values(0) * 7 / Double.Parse(row.Values(2))
End If
If _ProductsGantRows IsNot Nothing Then
If _ProductsGantRows.ManualRotation > 0 Then
_AD = row2.Values(0) * 7 / _ProductsGantRows.ManualRotation
End If
End If
Dim _Key As String = Guid.NewGuid.ToString
_GanttControl.Items.AddBar(CInt(_Item), "Reported", row2.Values(1), DateTime.Parse(row2.Values(1)).AddDays(_AD), _Key, row2.Values(0))
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize, False)
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMove, False)
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanStartLink, False)
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanBeLinked, False)
_GanttControl.Items.set_BarHAlignCaption(CInt(_Item), _Key, AlignmentEnum.LeftAlignment)
Exit For
Next
_SQL = " select sum(t1.QTT),DATE_FORMAT(t2.DateExecution,'%Y-%m-%d')"
_SQL += " from OrderInRows t1 join OrderInHeader t2 on t1.OrderInHeader=t2.Oid"
_SQL += " where t1.Products='" & row.Values(1) & "' AND t1.QTT > t1.QTT_Invoiced "
_SQL += " AND t2.Customers='" & row.Values(0) & "'"
_SQL += " AND t1.GCRecord is null and t2.GCRecord is null"
_SQL += " GROUP BY DATE_FORMAT(t2.DateExecution,'%Y-%m-%d')"
_SQL += " order by DATE_FORMAT(t2.DateExecution,'%Y-%m-%d') DESC"
_SelectedData2 = _onew.Session.ExecuteQuery(_SQL)
For Each row2 As SelectStatementResultRow In _SelectedData2.ResultSet(0).Rows
Dim _AD As Double = 1
If Double.Parse(row.Values(2)) <> 0 Then
_AD = row2.Values(0) * 7 / Double.Parse(row.Values(2))
End If
If _ProductsGantRows IsNot Nothing Then
If _ProductsGantRows.ManualRotation > 0 Then
_AD = row2.Values(0) * 7 / _ProductsGantRows.ManualRotation
End If
End If
Dim _Key As String = Guid.NewGuid.ToString
_GanttControl.Items.AddBar(CInt(_Item), "Ordered", row2.Values(1), DateTime.Parse(row2.Values(1)).AddDays(_AD), _Key, row2.Values(0))
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize, False)
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMove, False)
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanStartLink, False)
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanBeLinked, False)
_GanttControl.Items.set_BarHAlignCaption(CInt(_Item), _Key, AlignmentEnum.LeftAlignment)
Next
_SQL = " select sum(t1.QTT),DATE_FORMAT(t2.DateExecution,'%Y-%m-%d')"
_SQL += " from InvoiceRows t1 join InvoiceHeader t2 on t1.InvoiceHeader=t2.Oid"
_SQL += " left join OrderInRows t3 on t1.OrderInRows=t3.Oid"
_SQL += " where t3.Products='" & row.Values(1) & "'"
_SQL += " AND t2.Customers='" & row.Values(0) & "'"
_SQL += " AND t1.GCRecord is null and t2.GCRecord is null AND t2.IsEditable=0"
_SQL += " GROUP BY DATE_FORMAT(t2.DateExecution,'%Y-%m-%d')"
_SQL += " order by DATE_FORMAT(t2.DateExecution,'%Y-%m-%d') DESC"
_SelectedData2 = _onew.Session.ExecuteQuery(_SQL)
For Each row2 As SelectStatementResultRow In _SelectedData2.ResultSet(0).Rows
Dim _AD As Double = 1
If Double.Parse(row.Values(2)) <> 0 Then
_AD = row2.Values(0) * 7 / Double.Parse(row.Values(2))
End If
If _ProductsGantRows IsNot Nothing Then
If _ProductsGantRows.ManualRotation > 0 Then
_AD = row2.Values(0) * 7 / _ProductsGantRows.ManualRotation
End If
End If
Dim _Key As String = Guid.NewGuid.ToString
_GanttControl.Items.AddBar(CInt(_Item), "Accounted", row2.Values(1), DateTime.Parse(row2.Values(1)).AddDays(_AD), _Key, row2.Values(0))
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize, False)
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMove, False)
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanStartLink, False)
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanBeLinked, False)
_GanttControl.Items.set_BarHAlignCaption(CInt(_Item), _Key, AlignmentEnum.LeftAlignment)
Next
End If
End If
Next row
'Catch ex As Exception
' Throw New Exception(ex.Message)
'Finally
_WaitFormClass.FinalWork()
'End Try
@@ -366,7 +394,7 @@ Public Class ProductsGant_VC
.HistogramPattern = PatternEnum.exPatternBox + PatternEnum.exPatternDot + PatternEnum.exPatternShadow .HistogramPattern = PatternEnum.exPatternBox + PatternEnum.exPatternDot + PatternEnum.exPatternShadow
.HistogramColor = Drawing.Color.Yellow .HistogramColor = Drawing.Color.Yellow
.OverlaidType = OverlaidBarsTypeEnum.exOverlaidBarsStack .OverlaidType = OverlaidBarsTypeEnum.exOverlaidBarsStack
.OverlaidGroup = "Reported,Ordered,Accounted" .OverlaidGroup = "Reported,Ordered,Accounted,Critical"
End With End With
With .Copy("Task", "Ordered") With .Copy("Task", "Ordered")
.Color = Drawing.Color.Black .Color = Drawing.Color.Black
@@ -378,7 +406,7 @@ Public Class ProductsGant_VC
.HistogramPattern = PatternEnum.exPatternBox + PatternEnum.exPatternDot + PatternEnum.exPatternShadow .HistogramPattern = PatternEnum.exPatternBox + PatternEnum.exPatternDot + PatternEnum.exPatternShadow
.HistogramColor = Drawing.Color.Pink .HistogramColor = Drawing.Color.Pink
.OverlaidType = OverlaidBarsTypeEnum.exOverlaidBarsStack .OverlaidType = OverlaidBarsTypeEnum.exOverlaidBarsStack
.OverlaidGroup = "Reported,Ordered,Accounted" .OverlaidGroup = "Reported,Ordered,Accounted,Critical"
End With End With
With .Copy("Summary", "Reported") With .Copy("Summary", "Reported")
.Color = Drawing.Color.DarkGray .Color = Drawing.Color.DarkGray
@@ -393,7 +421,22 @@ Public Class ProductsGant_VC
.HistogramPattern = PatternEnum.exPatternBox + PatternEnum.exPatternDot + PatternEnum.exPatternShadow + PatternEnum.exPatternEmpty .HistogramPattern = PatternEnum.exPatternBox + PatternEnum.exPatternDot + PatternEnum.exPatternShadow + PatternEnum.exPatternEmpty
.HistogramColor = Drawing.Color.Green .HistogramColor = Drawing.Color.Green
.OverlaidType = OverlaidBarsTypeEnum.exOverlaidBarsStack .OverlaidType = OverlaidBarsTypeEnum.exOverlaidBarsStack
.OverlaidGroup = "Reported,Ordered,Accounted" .OverlaidGroup = "Reported,Ordered,Accounted,Critical"
End With
With .Copy("Summary", "Critical")
.Color = Drawing.Color.DarkGray
.Shape = ShapeBarEnum.exShapeSolid
.StartShape = ShapeCornerEnum.exShapeIconUp3
.EndShape = ShapeCornerEnum.exShapeIconDown3
.HistogramRulerLinesColor = Drawing.Color.Black
.StartColor = Drawing.Color.Blue
.EndColor = Drawing.Color.Blue
.Pattern = PatternEnum.exPatternBox + PatternEnum.exPatternDot + PatternEnum.exPatternShadow + PatternEnum.exPatternEmpty
.Height = 18
.HistogramPattern = PatternEnum.exPatternBox + PatternEnum.exPatternDot + PatternEnum.exPatternShadow + PatternEnum.exPatternEmpty
.HistogramColor = Drawing.Color.Green
.OverlaidType = OverlaidBarsTypeEnum.exOverlaidBarsStack
.OverlaidGroup = "Reported,Ordered,Accounted,Critical"
End With End With
With .Copy("Milestone", "OrderArrive") With .Copy("Milestone", "OrderArrive")
.StartShape = ShapeCornerEnum.exShapeIconVBar .StartShape = ShapeCornerEnum.exShapeIconVBar
@@ -406,6 +449,7 @@ Public Class ProductsGant_VC
.HistogramPattern = PatternEnum.exRectangularCurve + PatternEnum.exPatternDot + PatternEnum.exPatternShadow .HistogramPattern = PatternEnum.exRectangularCurve + PatternEnum.exPatternDot + PatternEnum.exPatternShadow
.HistogramColor = Drawing.Color.Red .HistogramColor = Drawing.Color.Red
.OverlaidType = OverlaidBarsTypeEnum.exOverlaidBarsStack .OverlaidType = OverlaidBarsTypeEnum.exOverlaidBarsStack
.OverlaidGroup = "Reported,Ordered,Accounted,Critical"
End With End With
End With End With
@@ -151,6 +151,11 @@ Public Class InvoiceHeader
Private _InvoiceFactoringParameter As InvoiceFactoringParameter ' Faktorálási paraméter !!! Private _InvoiceFactoringParameter As InvoiceFactoringParameter ' Faktorálási paraméter !!!
Private _InvoiceFactoringBank As InvoiceFactoringBank 'Bankba küldési csomag ! Private _InvoiceFactoringBank As InvoiceFactoringBank 'Bankba küldési csomag !
'NAV onlineszámla feladása
Private _NAV_transactionId As String
Private _NAV_InvoiceStatus As String
Private _NAV_queryDate As DateTime
'-- Nonpersistent objektumok a számla sor rögzítéséhez '-- Nonpersistent objektumok a számla sor rögzítéséhez
Private _row_CustomsTariffs As CustomsTariffs 'ITJ, SZJ, Vámtarifaszám stb. Private _row_CustomsTariffs As CustomsTariffs 'ITJ, SZJ, Vámtarifaszám stb.
Private _row_ShortName As String 'Megnevezés Private _row_ShortName As String 'Megnevezés
@@ -1095,6 +1100,45 @@ Public Class InvoiceHeader
SetPropertyValue("InvoiceFactoringBank", _InvoiceFactoringBank, value) SetPropertyValue("InvoiceFactoringBank", _InvoiceFactoringBank, value)
End Set End Set
End Property End Property
'NAV onlineszámla miatt
''' <summary>
''' NAV tranzakció azonosító Onlineszámla miatt
''' </summary>
''' <returns></returns>
Property NAV_transactionId As String
Get
Return _NAV_transactionId
End Get
Set(value As String)
SetPropertyValue("NAV_transactionId", _NAV_transactionId, value)
End Set
End Property
''' <summary>
''' NAV számla állapota Online számla miatt
''' </summary>
''' <returns></returns>
<Size(255)>
Property NAV_InvoiceStatus As String
Get
Return _NAV_InvoiceStatus
End Get
Set(value As String)
SetPropertyValue("NAV_InvoiceStatus", _NAV_InvoiceStatus, value)
End Set
End Property
''' <summary>
''' NAV lekérdezés dátuma Onlineszámla miatt
''' </summary>
''' <returns></returns>
Property NAV_queryDate As Date
Get
Return _NAV_queryDate
End Get
Set(value As Date)
SetPropertyValue("NAV_queryDate", _NAV_queryDate, value)
End Set
End Property
'-- Nonpersistent property-k a számla sor rögzítéséhez '-- Nonpersistent property-k a számla sor rögzítéséhez
<NonPersistent()> <NonPersistent()>
<VisibleInListView(False)> <VisibleInListView(False)>
@@ -84,6 +84,9 @@ Public Class ProductsGant
Get Get
Dim _CC As String = " ProductsGant.Oid = '" & Me.Oid.ToString() & "'" Dim _CC As String = " ProductsGant.Oid = '" & Me.Oid.ToString() & "'"
'IDEIGLENES
'_CC += " AND Products.Oid ='81ed2085-6bf7-4c77-9906-d7165d0cbb8b'"
If String.IsNullOrEmpty(Criteria) = False Then If String.IsNullOrEmpty(Criteria) = False Then
_CC += " AND " & CriteriaOperator.Parse(Criteria).ToString() _CC += " AND " & CriteriaOperator.Parse(Criteria).ToString()
End If End If
@@ -93,6 +93,10 @@ Public Class Customers
Private _GreenCardNumber As String 'Mezőgazdasági zöldkönyv száma Private _GreenCardNumber As String 'Mezőgazdasági zöldkönyv száma
Private _BiologicalControlContractNumber As String 'Növényvédelmi szerződés száma Private _BiologicalControlContractNumber As String 'Növényvédelmi szerződés száma
Private _NAV_queryTaxpayer As String
Private _NAV_valid As Boolean
Private _NAV_queryDate As DateTime
Public Sub New(ByVal session As Session) Public Sub New(ByVal session As Session)
MyBase.New(session) MyBase.New(session)
End Sub End Sub
@@ -577,7 +581,42 @@ Public Class Customers
SetPropertyValue("BiologicalControlContractNumber", _BiologicalControlContractNumber, value) SetPropertyValue("BiologicalControlContractNumber", _BiologicalControlContractNumber, value)
End Set End Set
End Property End Property
''' <summary>
''' NAV adószám ellenőrzés
''' </summary>
''' <returns></returns>
Property NAV_queryTaxpayer As String
Get
Return _NAV_queryTaxpayer
End Get
Set(value As String)
SetPropertyValue("NAV_queryTaxpayer", _NAV_queryTaxpayer, value)
End Set
End Property
''' <summary>
''' NAV adószám rendben van ?
''' </summary>
''' <returns></returns>
Property NAV_valid As Boolean
Get
Return _NAV_valid
End Get
Set(value As Boolean)
SetPropertyValue("NAV_valid", _NAV_valid, value)
End Set
End Property
''' <summary>
''' NAV adószámlekérdezés utolsó dátuma
''' </summary>
''' <returns></returns>
Property NAV_queryDate As DateTime
Get
Return _NAV_queryDate
End Get
Set(value As DateTime)
SetPropertyValue("NAV_queryDate", _NAV_queryDate, value)
End Set
End Property
<VisibleInDetailView(False)> <VisibleInDetailView(False)>
<VisibleInListView(False)> <VisibleInListView(False)>
<VisibleInLookupListView(False)> <VisibleInLookupListView(False)>
@@ -31,6 +31,11 @@ Public Class CustomersFrom '-- Ezek azok a cégek akik használják a programot
Private _RabbitMQServerPassword As String Private _RabbitMQServerPassword As String
Private _RabbitMQBodyEncryptCode As String Private _RabbitMQBodyEncryptCode As String
Private _NAV_login As String
Private _NAV_xmlSignkey As String
Private _NAV_password As String
Private _NAV_exchangeKey As String
Public Overrides Sub AfterConstruction() Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction() MyBase.AfterConstruction()
IsDefault = False IsDefault = False
@@ -116,7 +121,54 @@ Public Class CustomersFrom '-- Ezek azok a cégek akik használják a programot
SetPropertyValue("RabbitMQBodyEncryptCode", _RabbitMQBodyEncryptCode, value) SetPropertyValue("RabbitMQBodyEncryptCode", _RabbitMQBodyEncryptCode, value)
End Set End Set
End Property End Property
''' <summary>
''' NAV felhasználó az Online számlához
''' </summary>
''' <returns></returns>
Property NAV_login As String
Get
Return _NAV_login
End Get
Set(value As String)
SetPropertyValue("NAV_login", _NAV_login, value)
End Set
End Property
''' <summary>
''' NAV aláírókulcs az Online számlához
''' </summary>
''' <returns></returns>
Property NAV_xmlSignkey As String
Get
Return _NAV_xmlSignkey
End Get
Set(value As String)
SetPropertyValue("NAV_xmlSignkey", _NAV_xmlSignkey, value)
End Set
End Property
''' <summary>
''' NAV jelszó az Online számlához
''' </summary>
''' <returns></returns>
Property NAV_password As String
Get
Return _NAV_password
End Get
Set(value As String)
SetPropertyValue("NAV_password", _NAV_password, value)
End Set
End Property
''' <summary>
''' NAV cserekulcs az Online számlához
''' </summary>
''' <returns></returns>
Property NAV_exchangeKey As String
Get
Return _NAV_exchangeKey
End Get
Set(value As String)
SetPropertyValue("NAV_exchangeKey", _NAV_exchangeKey, value)
End Set
End Property
ReadOnly Property DefaultCustomerBankAccounts As CustomerBankAccounts ReadOnly Property DefaultCustomerBankAccounts As CustomerBankAccounts
Get Get
Dim _CustomerBankAccounts As CustomerBankAccounts = Nothing Dim _CustomerBankAccounts As CustomerBankAccounts = Nothing
+7
View File
@@ -3,6 +3,9 @@ Imports DevExpress.ExpressApp
Imports DevExpress.ExpressApp.Security Imports DevExpress.ExpressApp.Security
Imports Nuvolar.Module Imports Nuvolar.Module
Imports Nuvolar.Module.Win Imports Nuvolar.Module.Win
Imports Nuvolar.Module.StaticClass
Imports DevExpress.ExpressApp.Xpo
Partial Public Class NuvolarWindowsFormsApplication Partial Public Class NuvolarWindowsFormsApplication
Inherits WinApplication Inherits WinApplication
Implements IApplicationFactory Implements IApplicationFactory
@@ -108,6 +111,10 @@ Partial Public Class NuvolarWindowsFormsApplication
GLOBAL_WINFormCaption = String.Format("Nuvolar Framework version: {0} [{1}]", Application.ProductVersion, anm.Version) GLOBAL_WINFormCaption = String.Format("Nuvolar Framework version: {0} [{1}]", Application.ProductVersion, anm.Version)
GLOBAL_WINFormCaption += String.Format(", ({0}) Server: {1}, Database: {2}", _plattform, UCase(_ChangeLogon.SQLServer), UCase(_ChangeLogon.DBConnection)) GLOBAL_WINFormCaption += String.Format(", ({0}) Server: {1}, Database: {2}", _plattform, UCase(_ChangeLogon.SQLServer), UCase(_ChangeLogon.DBConnection))
GLOBAL_ApplicationStartupPath = Application.StartupPath & "\" GLOBAL_ApplicationStartupPath = Application.StartupPath & "\"
Dim _ocur As IObjectSpace = CreateObjectSpace()
RestAPI.Init(TryCast(_ocur, XPObjectSpace))
End Sub End Sub
Protected Overrides Function OnLogonFailed(ByVal logonParameters As Object, ByVal e As Exception) As Boolean Protected Overrides Function OnLogonFailed(ByVal logonParameters As Object, ByVal e As Exception) As Boolean
If WinChangeDatabaseHelper.SkipLogonDialog Then If WinChangeDatabaseHelper.SkipLogonDialog Then
+1 -1
View File
@@ -9,7 +9,7 @@
<add key="EnableDiagnosticActions" value="False" /> <add key="EnableDiagnosticActions" value="False" />
<add key="Languages" value="en;hu" /> <add key="Languages" value="en;hu" />
<add key="ClientSettingsProvider.ServiceUri" value="" /> <add key="ClientSettingsProvider.ServiceUri" value="" />
<add key="Uri" value="http://nuvolar.com:86/api/" /> <add key="Uri" value="http://momonline.com:88/api/" />
<add key="GeocodeAPIKey" value="AIzaSyD4RgVEapyYNlAgjemLgtbpOEVC2p2yXY4" /> <add key="GeocodeAPIKey" value="AIzaSyD4RgVEapyYNlAgjemLgtbpOEVC2p2yXY4" />
<add key="BingMapsKey" value="AkuhLMqiOJ6mqhY8zVPQCLMNFPEP0b4neaExb_eolTgT4Q0hF3098zXBJHMQa1WI" /> <add key="BingMapsKey" value="AkuhLMqiOJ6mqhY8zVPQCLMNFPEP0b4neaExb_eolTgT4Q0hF3098zXBJHMQa1WI" />
</appSettings> </appSettings>