Begin Tran Insert into dbo.TBASETVA (oid,idOTP,UpdStamp,UpdDate,UpdUser,Caption,montantBaseDebit,montantBaseDebit_CodeDevise,montantBaseDebit_Date,montantBaseDebit_TCConv,montantBaseDebit_TCValue,montantBaseDebit_RPConv,montantBaseDebit_RPValue,montantBaseEncais,montantBaseEncais_CodeDevise,montantBaseEncais_Date,montantBaseEncais_TCConv,montantBaseEncais_TCValue,montantBaseEncais_RPConv,montantBaseEncais_RPValue,montantBaseTVA,montantBaseTVA_CodeDevise,montantBaseTVA_Date,montantBaseTVA_TCConv,montantBaseTVA_TCValue,montantBaseTVA_RPConv,montantBaseTVA_RPValue,montantTaxSoumises,montantTaxSoumises_CodeDevise,montantTotalLignes,montantTotalLignes_CodeDevise,montantTVA,montantTVA_CodeDevise,montantTVA_Date,montantTVA_TCConv,montantTVA_TCValue,montantTVA_RPConv,montantTVA_RPValue,oidPieceTaxable,oidTVA,tauxTVA,tauxTVA_Decimales) values ('DAA5C2D0BF170008047C000151C2005F',1148,'00014DB1000000EC',GETDATE(),N'fsilue' ,NULL ,16350000.0000 ,N'XOF' ,Convert(DateTime,'2016-05-27 00:00:00',120) ,NULL ,16350000.0000 ,NULL ,16350000.0000 ,0.0000 ,N'XOF' ,Convert(DateTime,'2016-05-27 00:00:00',120) ,NULL ,0.0000 ,NULL ,0.0000 ,16350000.0000 ,N'XOF' ,Convert(DateTime,'2016-05-27 00:00:00',120) ,NULL ,16350000.0000 ,NULL ,16350000.0000 ,0.0000 ,N'XOF' ,16350000.0000 ,N'XOF' ,0.0000 ,N'XOF' ,Convert(DateTime,'2016-05-27 00:00:00',120) ,NULL ,0.0000 ,NULL ,0.0000 ,NULL ,'DAA5C2D0BF170008035E000016D10004' ,0.000000000000000000E+000 ,2 ) if @@error<>0 begin IF @@TRANCOUNT > 0 RollBack raiserror('(3):Erreur d''''insertion d''un objet BaseTVA (DAA5C2D0BF170008047C000151C2005F)',16,1) with seterror return end Insert into dbo.TDETAILANALYTIQUEGC (oid,idOTP,UpdStamp,UpdDate,UpdUser,Caption,codeSection,montant,montant_CodeDevise,montant_Date,montant_TCConv,montant_TCValue,montant_RPConv,montant_RPValue,oidPieceAnalytiqueGC,oidSectionAnalytique,posteBudgetaire,pourcentage,pourcentage_Decimales) values ('DAA5C2D0BF17000804DF000151C20062',1247,'00014DB1000000EF',GETDATE(),N'fsilue' ,NULL ,N'A11100CM010B01ZZZ' ,16350000.0000 ,N'XOF' ,Convert(DateTime,'2016-05-27 00:00:00',120) ,NULL ,16350000.0000 ,NULL ,16350000.0000 ,NULL ,'DAA5C2D0BF17000804BC000027200912' ,NULL ,1.000000000000000000E+002 ,4 ) if @@error<>0 begin IF @@TRANCOUNT > 0 RollBack raiserror('(3):Erreur d''''insertion d''un objet Détail analytique GC (DAA5C2D0BF17000804DF000151C20062)',16,1) with seterror return end Insert into dbo.TDETAILTAXABLE (oid,idOTP,UpdStamp,UpdDate,UpdUser,Caption,appliquerRemise,coefficientPoids,coefficientPoids_Decimales,coefficientQuantite,coefficientQuantite_Decimales,coefficientVolume,coefficientVolume_Decimales,designationProduit,estCommentaire,estImmobilisation,estMultiTaxe,exigibiliteTVA,groupe,montantBrut,montantBrut_CodeDevise,montantBrut_Date,montantBrut_TCConv,montantBrut_TCValue,montantBrut_RPConv,montantBrut_RPValue,montantNet,montantNet_CodeDevise,montantNet_Date,montantNet_TCConv,montantNet_TCValue,montantNet_RPConv,montantNet_RPValue,montantNetTTC,montantNetTTC_CodeDevise,montantNetTTC_Date,montantNetTTC_TCConv,montantNetTTC_TCValue,montantNetTTC_RPConv,montantNetTTC_RPValue,montantTTC,montantTTC_CodeDevise,montantTTC_Date,montantTTC_TCConv,montantTTC_TCValue,montantTTC_RPConv,montantTTC_RPValue,nonEditable,numero,oidAffaire,oidCategorieComptable,oidModeTaxe,oidModeTVA,oidProduitCommercial,origineQuantiteTarifee,poidsBrutTotal,poidsBrutTotal_Decimales,poidsBrutTotal_CodeUnit,poidsNetTotal,poidsNetTotal_Decimales,poidsNetTotal_CodeUnit,prixBrut,prixBrut_CodeDevise,prixFerme,prixNet,prixNet_CodeDevise,prixNetTTC,prixNetTTC_CodeDevise,prixTTC,prixTTC_CodeDevise,quantiteTarifee,quantiteTarifee_Decimales,quantiteTarifee_CodeUnit,tvaMarge,volumeTotal,volumeTotal_Decimales,volumeTotal_CodeUnit,ecartMontant,ecartQte,eligibleDES,etatRapproDDE,oidContratCommercialDetail,oidDeclarationDetailDES,oidPieceFacturation,quantite,quantite_Decimales,quantite_CodeUnit,quantite_CodeRefUnit,quantite_RefValue,refPieceLivraison,qteRelicat) values ('DAA5C2D0BF17000804EA000151C2005E',1258,'00014DB1000000F2',GETDATE(),N'fsilue' ,NULL ,1 ,1.000000000000000000E+002 ,4 ,1.000000000000000000E+002 ,4 ,1.000000000000000000E+002 ,4 ,N'LOCATION SILO/BLE MEUNERIE' ,0 ,0 ,0 ,0 ,0 ,16350000.0000 ,N'XOF' ,Convert(DateTime,'2016-05-27 00:00:00',120) ,NULL ,16350000.0000 ,NULL ,16350000.0000 ,16350000.0000 ,N'XOF' ,Convert(DateTime,'2016-05-27 00:00:00',120) ,NULL ,16350000.0000 ,NULL ,16350000.0000 ,0.0000 ,N'XOF' ,Convert(DateTime,'2016-06-01 00:00:00',120) ,NULL ,0.0000 ,NULL ,0.0000 ,0.0000 ,N'XOF' ,Convert(DateTime,'2016-06-01 00:00:00',120) ,NULL ,0.0000 ,NULL ,0.0000 ,0 ,1 ,NULL ,NULL ,'DAA5C2D0BF170008046E00003A6A0066' ,'DAA5C2D0BF170008047000001A720024' ,'DAA5C2D0BF17000804B700003AFF006A' ,0 ,0.000000000000000000E+000 ,2 ,N'KGS' ,0.000000000000000000E+000 ,2 ,N'KGS' ,16350000.0000 ,N'XOF' ,0 ,16350000.0000 ,N'XOF' ,0.0000 ,N'XOF' ,0.0000 ,N'XOF' ,1.000000000000000000E+000 ,0 ,N'DAA5C2D0BF170008035B000022C20004' ,0 ,0.000000000000000000E+000 ,3 ,N'LT' ,1 ,0 ,0 ,0 ,NULL ,NULL ,NULL ,1.000000000000000000E+000 ,0 ,N'DAA5C2D0BF170008035B000022C20004' ,N'DAA5C2D0BF170008035B000022C20004' ,1.000000000000000000E+000 ,NULL ,0.000000000000000000E+000 ) if @@error<>0 begin IF @@TRANCOUNT > 0 RollBack raiserror('(3):Erreur d''''insertion d''un objet Ligne de facture (DAA5C2D0BF17000804EA000151C2005E)',16,1) with seterror return end Insert into dbo.TECHEANCEGC (oid,idOTP,UpdStamp,UpdDate,UpdUser,Caption,dateEcheance,estAcompte,montant,montant_CodeDevise,montant_Date,montant_TCConv,montant_TCValue,montant_RPConv,montant_RPValue,oidModeReglement,oidPieceAdministrative) values ('DAA5C2D0BF1700080510000151C20060',1296,'00014DB1000000F1',GETDATE(),N'fsilue' ,NULL ,Convert(DateTime,'2016-06-30 00:00:00',120) ,0 ,16350000.0000 ,N'XOF' ,Convert(DateTime,'2016-05-27 00:00:00',120) ,NULL ,16350000.0000 ,NULL ,16350000.0000 ,'DAA5C2D0BF170008001E0000000B0002' ,NULL ) if @@error<>0 begin IF @@TRANCOUNT > 0 RollBack raiserror('(3):Erreur d''''insertion d''un objet Echeance GC (DAA5C2D0BF1700080510000151C20060)',16,1) with seterror return end Insert into dbo.TPIECEANALYTIQUEGC (oid,idOTP,UpdStamp,UpdDate,UpdUser,Caption,oidAxeAnalytique,oidCategorieComptaProduit,oidContratCommercialDetail,oidSupportAnalytique) values ('DAA5C2D0BF17000804E0000151C20061',1248,'00014DB1000000EE',GETDATE(),N'fsilue' ,N'RE' ,'DAA5C2D0BF17000804BA000016E000ED' ,'DAA5C2D0BF1700080490000111BB001D' ,'DAA5C2D0BF17000804EA000151C2005E' ,NULL ) if @@error<>0 begin IF @@TRANCOUNT > 0 RollBack raiserror('(3):Erreur d''''insertion d''un objet Pièce analytique GC (RE)',16,1) with seterror return end Insert into dbo.TPIECETAXABLE (oid,idOTP,UpdStamp,UpdDate,UpdUser,Caption,codeEDIMentionExoTVA,commentaire,comptabilise,coursDevise,coursDevise_CodeDevise,coursDevise_Date,coursDevise_TCConv,coursDevise_TCValue,coursDevise_RPConv,coursDevise_RPValue,coursNegocie,datePiece,dateTaxe,edite,engagement,estComplet,estReciproque,estTraiteReciproque,exigibiliteTVAPiece,exonereTaxe,exonereTVA,immobilisation,modificationRemisePied,noPiece,noPiece_CounterName,noTraitement,oidAffaire,oidDevise,oidEcheancement,oidOperateur,oidRegimeTVA,oidRoleContact,oidTicketEDI,oidTypePieceGC,origine,pieceJointe,referenceExterne,referencePiece,referenceSession,remisePied,remisePied_Decimales,totalHT,totalHT_CodeDevise,totalHT_Date,totalHT_TCConv,totalHT_TCValue,totalHT_RPConv,totalHT_RPValue,totalHTArticleEtKit,totalHTArticleEtKit_CodeDevise,totalHTFraisFact,totalHTFraisFact_CodeDevise,totalHTPrestation,totalHTPrestation_CodeDevise,totalTTC,totalTTC_CodeDevise,totalTTC_Date,totalTTC_TCConv,totalTTC_TCValue,totalTTC_RPConv,totalTTC_RPValue,typeFacturation,dateValidation,estRefuse,isEtatInitial,oiddernierValideur,oidEtatMetier,oidRegleValidation,oidEtablissementEmetteur,oidEtablissementReceveur,bonAPayer,estAvoir,estDefDetailFacture,estVente,montantTVA,montantTVA_CodeDevise,oidEtablissementAPayer,oidRoleTiersDO,oidRoleTiersFacture,oidRoleTiersRO,recalculTaxe,supprimee,TTCObtenir,TTCObtenir_CodeDevise,oidG_Circuit_Piece,chauffeur,dateEntree,dateSortie,heureEntree,heureSortie,ImmatriculationRemorck,ImmatriculationTrackteur,NaturePaiement,net,net_Decimales,oidOrigineContratVente,permis,pese1,pese1_Decimales,pese2,pese2_Decimales,PoidsTheorique,RefPaiement,ticket,vehicule,comptabilisable,enEcart,comptabilisableEngagement,oidNatureValidationDemandeur,oidNatureValidationDepense) values ('DAA5C2D0BF170008059C000151C2005B',1436,'00014DB1000000EA',GETDATE(),N'fsilue' ,NULL ,NULL ,NULL ,0 ,1.0000 ,N'XOF' ,Convert(DateTime,'2016-05-27 00:00:00',120) ,NULL ,1.0000 ,NULL ,1.0000 ,0 ,Convert(DateTime,'2016-05-27 00:00:00',120) ,Convert(DateTime,'1899-12-30 00:00:00',120) ,Convert(DateTime,'1899-12-30 00:00:00',120) ,0 ,0 ,0 ,0 ,2 ,0 ,0 ,0 ,0 ,N'FF/16/003381' ,N'FF' ,0 ,NULL ,'DAA5C2D0BF17000800030000000E04B5' ,'DAA5C2D0BF17000800180000E1EF0002' ,'DAA5C2D0BF170008028E00001772000A' ,'DAA5C2D0BF170008046600001A720027' ,'DAA5C2D0BF170008025C00012C8A022E' ,NULL ,'DAA5C2D0BF17000805060000172B0089' ,0 ,0 ,N'F.1660013444 MAI-2016' ,NULL ,NULL ,0.000000000000000000E+000 ,2 ,16350000.0000 ,N'XOF' ,Convert(DateTime,'2016-05-27 00:00:00',120) ,NULL ,16350000.0000 ,NULL ,16350000.0000 ,0.0000 ,N'XOF' ,0.0000 ,N'XOF' ,0.0000 ,N'XOF' ,16350000.0000 ,N'XOF' ,Convert(DateTime,'2016-05-27 00:00:00',120) ,NULL ,16350000.0000 ,NULL ,16350000.0000 ,0 ,Convert(DateTime,'1899-12-30 00:00:00',120) ,0 ,1 ,NULL ,NULL ,NULL ,'DAA5C2D0BF170008034E000017411AC9' ,'DAA5C2D0BF170008034E0000009E0028' ,0 ,0 ,0 ,0 ,0.0000 ,N'XOF' ,'DAA5C2D0BF170008034E000017411AC9' ,'DAA5C2D0BF17000802780000009E0014' ,'DAA5C2D0BF17000802D9000017411ACC' ,'DAA5C2D0BF17000802D9000017411ACC' ,1 ,0 ,16350000.0000 ,N'XOF' ,NULL ,NULL ,Convert(DateTime,'1899-12-30 00:00:00',120) ,Convert(DateTime,'1899-12-30 00:00:00',120) ,NULL ,NULL ,NULL ,NULL ,NULL ,0.000000000000000000E+000 ,0 ,NULL ,NULL ,0.000000000000000000E+000 ,0 ,0.000000000000000000E+000 ,0 ,0.000000000000000000E+000 ,NULL ,NULL ,NULL ,0 ,0 ,1 ,'DAA5C2D0BF17000806820000EC5F0004' ,NULL ) if @@error<>0 begin IF @@TRANCOUNT > 0 RollBack raiserror('(3):Erreur d''''insertion d''un objet Piece facturation achat (DAA5C2D0BF170008059C000151C2005B)',16,1) with seterror return end Update dbo.TBASETVA set oidPieceTaxable='DAA5C2D0BF170008059C000151C2005B' Where oid = 'DAA5C2D0BF170008047C000151C2005F' if @@error<>0 begin IF @@TRANCOUNT > 0 RollBack raiserror('(7):(Ins) Erreur de maj des références dans la classe BaseTVA (DAA5C2D0BF170008047C000151C2005F)',16,1) with seterror return end Update dbo.TDETAILANALYTIQUEGC set oidPieceAnalytiqueGC='DAA5C2D0BF17000804E0000151C20061' Where oid = 'DAA5C2D0BF17000804DF000151C20062' if @@error<>0 begin IF @@TRANCOUNT > 0 RollBack raiserror('(7):(Ins) Erreur de maj des références dans la classe Détail analytique GC (DAA5C2D0BF17000804DF000151C20062)',16,1) with seterror return end Update dbo.TDETAILTAXABLE set oidPieceFacturation='DAA5C2D0BF170008059C000151C2005B' Where oid = 'DAA5C2D0BF17000804EA000151C2005E' if @@error<>0 begin IF @@TRANCOUNT > 0 RollBack raiserror('(7):(Ins) Erreur de maj des références dans la classe Ligne de facture (FF/16/003381 - 27/05/2016 - ZBLEM_LOCATSILO - LOCATION SILO/BLE MEUNERIE)',16,1) with seterror return end Update dbo.TECHEANCEGC set oidPieceAdministrative='DAA5C2D0BF170008059C000151C2005B' Where oid = 'DAA5C2D0BF1700080510000151C20060' if @@error<>0 begin IF @@TRANCOUNT > 0 RollBack raiserror('(7):(Ins) Erreur de maj des références dans la classe Echeance GC (DAA5C2D0BF1700080510000151C20060)',16,1) with seterror return end