1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
| // Création d'une variable XML
xmlCustomer est un xmlDocument
xmlUnNoeud est un xmlNoeud
xmlCustomer..Encodage = "ISO-8859-1"
xmlUnNoeud..Nom = "ImportExpMPlus"
nNamespace est un xmlNamespace
nNamespace..Nom = "xsi"
nNamespace..URI = "http://www.w3.org/2001/XMLSchema-instancel"
Ajoute(xmlUnNoeud..NamespaceDéclaré, nNamespace)
nNamespace..Nom = "xsd"
nNamespace..URI = "http://www.w3.org/2001/XMLSchema"
Ajoute(xmlUnNoeud..NamespaceDéclaré, nNamespace)
Ajoute(xmlCustomer, xmlUnNoeud)
xmlUnNoeud..Nom = "Customers"
Ajoute(xmlCustomer.ImportExpMPlus, xmlUnNoeud)
nbrLigne est un entier = TABLE_Clients..Occurrence
POUR i = 1 A nbrLigne
// ----Création d'une nouveau Customer
xmlUnNoeud..Nom = "Customer"
Ajoute(xmlCustomer.ImportExpMPlus.Customers, xmlUnNoeud)
// Création des éléments de la facture
xmlCustomer.ImportExpMPlus.Customers.Customer[i].Prime = TABLE_Clients[i].COL_Prime
xmlCustomer.ImportExpMPlus.Customers.Customer[i].Afta = TABLE_Clients[i].COL_Alfa
xmlCustomer.ImportExpMPlus.Customers.Customer[i].Name = TABLE_Clients[i].COL_Name
xmlCustomer.ImportExpMPlus.Customers.Customer[i].Country = TABLE_Clients[i].COL_Country
xmlCustomer.ImportExpMPlus.Customers.Customer[i].HouseNumber = TABLE_Clients[i].COL_HouseNumber
xmlCustomer.ImportExpMPlus.Customers.Customer[i].Street = TABLE_Clients[i].COL_Street
xmlCustomer.ImportExpMPlus.Customers.Customer[i].ZipCode = TABLE_Clients[i].COL_ZipCode
xmlCustomer.ImportExpMPlus.Customers.Customer[i].City = TABLE_Clients[i].COL_City
xmlCustomer.ImportExpMPlus.Customers.Customer[i].Language = TABLE_Clients[i].COL_Language
xmlCustomer.ImportExpMPlus.Customers.Customer[i].CurrencyCode = TABLE_Clients[i].COL_CurrencyCode
xmlCustomer.ImportExpMPlus.Customers.Customer[i].VATCode = TABLE_Clients[i].COL_VATCode
xmlCustomer.ImportExpMPlus.Customers.Customer[i].VATStatus = TABLE_Clients[i].COL_VATStatus
xmlCustomer.ImportExpMPlus.Customers.Customer[i].VATNumber = TABLE_Clients[i].COL_VATNumber
xmlCustomer.ImportExpMPlus.Customers.Customer[i].Rappel = TABLE_Clients[i].COL_Rappel
xmlCustomer.ImportExpMPlus.Customers.Customer[i].Dom = TABLE_Clients[i].COL_Dom
xmlCustomer.ImportExpMPlus.Customers.Customer[i].AccountSale = TABLE_Clients[i].COL_AccountSale
xmlCustomer.ImportExpMPlus.Customers.Customer[i].IntrastatTransport = TABLE_Clients[i].COL_IntrastatTransport
xmlCustomer.ImportExpMPlus.Customers.Customer[i].Limit = TABLE_Clients[i].COL_Limit
xmlCustomer.ImportExpMPlus.ImportExpMPlus.Customers.Customer[i].Due = TABLE_Clients[i].COL_Due
xmlCustomer.ImportExpMPlus.Customers.Customer[i].DueDays = TABLE_Clients[i].COL_DueDays
xmlCustomer.ImportExpMPlus.Customers.Customer[i].Ventil = TABLE_Clients[i].COL_Ventil
xmlCustomer.ImportExpMPlus.Customers.Customer[i].IntrastatDelivery = TABLE_Clients[i].COL_IntrastatDelivery
xmlCustomer.ImportExpMPlus.Customers.Customer[i].DISCOUNTPERC = TABLE_Clients[i].COL_DISCOUNTPERC
xmlCustomer.ImportExpMPlus.Customers.Customer[i].DelivDate = TABLE_Clients[i].COL_DelivDate
xmlCustomer.ImportExpMPlus.Customers.Customer[i].Status = TABLE_Clients[i].COL_Status
JAUGE_JaugeLCD++
FIN
XMLSauve(xmlCustomer, LIB_NomRepClient + ...
"\xmlCustomer" + SAI_PeriodeMois + SAI_PériodeAnnee + ".xml", XMLDocumentDéfaut)
SI ErreurDétectée = Vrai ALORS
ErreurConstruit("Une erreur s'est produite pendant la sauvegarde : %1", ...
ErreurInfo(errComplet))
FIN
SAI_Message = "Nombre de client exporté " + JAUGE_JaugeLCD + " sur " + NbrClient |