|
|
@@ -441,7 +441,7 @@ def main():
|
|
|
if not interv.dtmDureeIntervention or interv.dtmDureeIntervention == date_zero:
|
|
|
errors.append(prefix + "Durée d'intervention nulle")
|
|
|
|
|
|
- # *** 6- Interruption pour corection manuelle des données (si nécessaire)
|
|
|
+ # *** 6- Interruption si erreurs
|
|
|
if errors:
|
|
|
logging.error("<!> Des erreurs ont été détectées dans les données à importer. <!>")
|
|
|
for msg in errors:
|
|
|
@@ -541,12 +541,13 @@ def main():
|
|
|
tarif.dblTauxTVA = taux_tva
|
|
|
tarif.dblPrixTVA = tarif.dblPrixTotal * (0.01 * tarif.dblTauxTVA)
|
|
|
tarif.strStatut = 'A facturer'
|
|
|
+ tarif.strCreateur = 'scriptauto'
|
|
|
|
|
|
sql = Sql.format(""" INSERT INTO tbl_Tarification ( DblAffaireId, strRapportId, strArticleId, dblQuantite, strUnite, dtmDebut, dtmFin, bytPeriode,
|
|
|
- dblPrixUnitaire, dblPrixTotal, dblTauxTVA, dblPrixTVA, strStatut )
|
|
|
+ dblPrixUnitaire, dblPrixTotal, dblTauxTVA, dblPrixTVA, strStatut, strCreateur )
|
|
|
VALUES ({tarif.DblAffaireId}, {tarif.strRapportId:text}, {tarif.strArticleId:text}, {tarif.dblQuantite}, {tarif.strUnite:text}, {tarif.dtmDebut:date},
|
|
|
{tarif.dtmFin:date}, {tarif.bytPeriode}, {tarif.dblPrixUnitaire}, {tarif.dblPrixTotal},
|
|
|
- {tarif.dblTauxTVA}, {tarif.dblPrixTVA}, {tarif.strStatut:text})
|
|
|
+ {tarif.dblTauxTVA}, {tarif.dblPrixTVA}, {tarif.strStatut:text}, {tarif.strCreateur:text})
|
|
|
""", tarif=tarif)
|
|
|
analytique_db.execute(sql)
|
|
|
|