Fix: Save new model when changed on interventions
This commit is contained in:
parent
0b1272c0e7
commit
d718aa347e
@ -15,6 +15,7 @@ For users:
|
|||||||
- New: Can clone a commercial proposal.
|
- New: Can clone a commercial proposal.
|
||||||
- New: Major enhancement of project module.
|
- New: Major enhancement of project module.
|
||||||
- New: Added product label in invoice exports fields.
|
- New: Added product label in invoice exports fields.
|
||||||
|
- Fix: Save new model when changed on interventions.
|
||||||
- Fix: Failed to go on the future view of bank transaction if there is no
|
- Fix: Failed to go on the future view of bank transaction if there is no
|
||||||
future bank transaction already wrote.
|
future bank transaction already wrote.
|
||||||
- Fix: Bad ref in supplier list.
|
- Fix: Bad ref in supplier list.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -171,6 +171,11 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post
|
|||||||
$fichinter->fetch($_GET['id']);
|
$fichinter->fetch($_GET['id']);
|
||||||
$fichinter->fetch_lines();
|
$fichinter->fetch_lines();
|
||||||
|
|
||||||
|
if ($_REQUEST['model'])
|
||||||
|
{
|
||||||
|
$fichinter->setDocModel($user, $_REQUEST['model']);
|
||||||
|
}
|
||||||
|
|
||||||
$outputlangs = $langs;
|
$outputlangs = $langs;
|
||||||
if (! empty($_REQUEST['lang_id']))
|
if (! empty($_REQUEST['lang_id']))
|
||||||
{
|
{
|
||||||
@ -650,7 +655,7 @@ elseif ($_GET["id"] > 0)
|
|||||||
/*
|
/*
|
||||||
* Lignes d'intervention
|
* Lignes d'intervention
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$sql = 'SELECT ft.rowid, ft.description, ft.fk_fichinter, ft.duree, ft.rang';
|
$sql = 'SELECT ft.rowid, ft.description, ft.fk_fichinter, ft.duree, ft.rang';
|
||||||
$sql.= ', '.$db->pdate('ft.date').' as date_intervention';
|
$sql.= ', '.$db->pdate('ft.date').' as date_intervention';
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'fichinterdet as ft';
|
$sql.= ' FROM '.MAIN_DB_PREFIX.'fichinterdet as ft';
|
||||||
@ -665,7 +670,7 @@ elseif ($_GET["id"] > 0)
|
|||||||
if ($num)
|
if ($num)
|
||||||
{
|
{
|
||||||
print '<br><table class="noborder" width="100%">';
|
print '<br><table class="noborder" width="100%">';
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans('Description').'</td>';
|
print '<td>'.$langs->trans('Description').'</td>';
|
||||||
print '<td align="center">'.$langs->trans('Date').'</td>';
|
print '<td align="center">'.$langs->trans('Date').'</td>';
|
||||||
@ -796,31 +801,31 @@ elseif ($_GET["id"] > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Ajouter une ligne
|
* Ajouter une ligne
|
||||||
*/
|
*/
|
||||||
if ($fichinter->statut == 0 && $user->rights->ficheinter->creer && $_GET["action"] <> 'editline')
|
if ($fichinter->statut == 0 && $user->rights->ficheinter->creer && $_GET["action"] <> 'editline')
|
||||||
{
|
{
|
||||||
if (! $num) print '<br><table class="noborder" width="100%">';
|
if (! $num) print '<br><table class="noborder" width="100%">';
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print '<a name="add"></a>'; // ancre
|
print '<a name="add"></a>'; // ancre
|
||||||
print $langs->trans('Description').'</td>';
|
print $langs->trans('Description').'</td>';
|
||||||
print '<td align="center">'.$langs->trans('Date').'</td>';
|
print '<td align="center">'.$langs->trans('Date').'</td>';
|
||||||
print '<td align="right">'.$langs->trans('Duration').'</td>';
|
print '<td align="right">'.$langs->trans('Duration').'</td>';
|
||||||
|
|
||||||
print '<td colspan="4"> </td>';
|
print '<td colspan="4"> </td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// Ajout ligne d'intervention
|
// Ajout ligne d'intervention
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$fichinter->id.'#add" name="addinter" method="post">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$fichinter->id.'#add" name="addinter" method="post">';
|
||||||
print '<input type="hidden" name="fichinterid" value="'.$fichinter->id.'">';
|
print '<input type="hidden" name="fichinterid" value="'.$fichinter->id.'">';
|
||||||
print '<input type="hidden" name="action" value="addligne">';
|
print '<input type="hidden" name="action" value="addligne">';
|
||||||
|
|
||||||
$var=false;
|
$var=false;
|
||||||
|
|
||||||
print '<tr '.$bc[$var].">\n";
|
print '<tr '.$bc[$var].">\n";
|
||||||
print '<td>';
|
print '<td>';
|
||||||
// <20>diteur wysiwyg
|
// <20>diteur wysiwyg
|
||||||
@ -835,27 +840,27 @@ elseif ($_GET["id"] > 0)
|
|||||||
print '<textarea class="flat" cols="70" name="np_desc" rows="'.ROWS_2.'"></textarea>';
|
print '<textarea class="flat" cols="70" name="np_desc" rows="'.ROWS_2.'"></textarea>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Date intervention
|
// Date intervention
|
||||||
print '<td align="center" nowrap="nowrap">';
|
print '<td align="center" nowrap="nowrap">';
|
||||||
$timearray=dol_getdate(mktime());
|
$timearray=dol_getdate(mktime());
|
||||||
$timewithnohour=dolibarr_mktime(0,0,0,$timearray['mon'],$timearray['mday'],$timearray['year']);
|
$timewithnohour=dolibarr_mktime(0,0,0,$timearray['mon'],$timearray['mday'],$timearray['year']);
|
||||||
$html->select_date($timewithnohour,'di',1,1,0,"addinter");
|
$html->select_date($timewithnohour,'di',1,1,0,"addinter");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Duration
|
// Duration
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
$html->select_duree('duration');
|
$html->select_duree('duration');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td align="center" valign="middle" colspan="4"><input type="submit" class="button" value="'.$langs->trans('Add').'" name="addligne"></td>';
|
print '<td align="center" valign="middle" colspan="4"><input type="submit" class="button" value="'.$langs->trans('Add').'" name="addligne"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
if (! $num) print '</table>';
|
if (! $num) print '</table>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($num) print '</table>';
|
if ($num) print '</table>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -892,7 +897,7 @@ elseif ($_GET["id"] > 0)
|
|||||||
}
|
}
|
||||||
print '>'.$langs->trans("Valid").'</a>';
|
print '>'.$langs->trans("Valid").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Modify
|
// Modify
|
||||||
if ($fichinter->statut == 1 && $user->rights->ficheinter->creer)
|
if ($fichinter->statut == 1 && $user->rights->ficheinter->creer)
|
||||||
{
|
{
|
||||||
@ -908,7 +913,7 @@ elseif ($_GET["id"] > 0)
|
|||||||
}
|
}
|
||||||
print '>'.$langs->trans("Modify").'</a>';
|
print '>'.$langs->trans("Modify").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete
|
// Delete
|
||||||
if (($fichinter->statut == 0 && $user->rights->ficheinter->creer) || $user->rights->ficheinter->supprimer)
|
if (($fichinter->statut == 0 && $user->rights->ficheinter->creer) || $user->rights->ficheinter->supprimer)
|
||||||
{
|
{
|
||||||
@ -944,7 +949,7 @@ elseif ($_GET["id"] > 0)
|
|||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
$somethingshown=$formfile->show_documents('ficheinter',$filename,$filedir,$urlsource,$genallowed,$delallowed,$ficheinter->modelpdf);
|
$somethingshown=$formfile->show_documents('ficheinter',$filename,$filedir,$urlsource,$genallowed,$delallowed,$fichinter->modelpdf);
|
||||||
|
|
||||||
print "</td><td>";
|
print "</td><td>";
|
||||||
print " </td>";
|
print " </td>";
|
||||||
|
|||||||
@ -20,6 +20,7 @@ ConfirmModifyIntervention=Are you sure you want to modify this intervention ?
|
|||||||
ConfirmDeleteInterventionLine=Are you sure you want to delete this intervention line ?
|
ConfirmDeleteInterventionLine=Are you sure you want to delete this intervention line ?
|
||||||
NameAndSignatureOfInternalContact=Name and signature of intervening :
|
NameAndSignatureOfInternalContact=Name and signature of intervening :
|
||||||
NameAndSignatureOfExternalContact=Name and signature of customer :
|
NameAndSignatureOfExternalContact=Name and signature of customer :
|
||||||
|
DocumentModelStandard=Standard document model for interventions
|
||||||
##### Types de contacts #####
|
##### Types de contacts #####
|
||||||
TypeContact_fichinter_internal_INTERREPFOLL=Representative following-up intervention
|
TypeContact_fichinter_internal_INTERREPFOLL=Representative following-up intervention
|
||||||
TypeContact_fichinter_internal_INTERVENING=Intervening
|
TypeContact_fichinter_internal_INTERVENING=Intervening
|
||||||
|
|||||||
@ -32,6 +32,7 @@ InterLineId=Id ligne d
|
|||||||
InterLineDate=Date ligne
|
InterLineDate=Date ligne
|
||||||
InterLineDuration=Durée ligne
|
InterLineDuration=Durée ligne
|
||||||
InterLineDesc=Description ligne
|
InterLineDesc=Description ligne
|
||||||
|
DocumentModelStandard=Modèle de fiche intervention standard
|
||||||
##### Types de contacts #####
|
##### Types de contacts #####
|
||||||
TypeContact_fichinter_internal_INTERREPFOLL=Responsable suivi de l'intervention
|
TypeContact_fichinter_internal_INTERREPFOLL=Responsable suivi de l'intervention
|
||||||
TypeContact_fichinter_internal_INTERVENING=Intervenant
|
TypeContact_fichinter_internal_INTERVENING=Intervenant
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user