Patch level : 12.0 no patch

Files correlati     :
Commento            :

Major
Aggiunta gestione di più ordini da importare nello stesso xml
This commit is contained in:
Alessandro Bonazzi 2021-02-05 18:10:52 +01:00
parent 2ef449d9cd
commit 014a99411e

View File

@ -209,15 +209,19 @@ bool TFlexform_xml_ordini::create_doc()
if (import_doc())
{
TLog_report * log = _log;
const TXmlItem * first = FindFirstChild("ORDINE_IMPEGNO");
//const TXmlItem * first = FindFirstChild("ORDINE_IMPEGNO");
int n = 0;
for (TXmlItem * ord = GetChild(n); ord != nullptr; ord = GetChild(++n))
{
long id_ordine;
if (first != nullptr)
if (ord->GetTag() == "ORDINE_IMPEGNO")
{
if (first->GetAttr("TipoOperazione") != "Insert")
if (ord->GetAttr("TipoOperazione") != "Insert")
XML_ERROR(TR("il Tipo Operazione deve essere Insert."));
const TXmlItem * ordine = first->FindFirstChild("OR_ORDINIT");
const TXmlItem * ordine = ord->FindFirstChild("OR_ORDINIT");
if (ordine != nullptr)
{
@ -273,5 +277,6 @@ bool TFlexform_xml_ordini::create_doc()
else
XML_NOT_FOUND("ORDINE_IMPEGNO");
}
}
return ok;
}