Fix: Affichage colonnes si module projet dsactiv
This commit is contained in:
parent
3d821cf8b5
commit
6545f1cbcd
@ -267,6 +267,9 @@ if ($_GET['action'] == 'create' && $user->rights->commande->creer)
|
||||
$soc = new Societe($db);
|
||||
$soc->fetch($obj->idp);
|
||||
|
||||
$nbrow=4;
|
||||
if ($conf->projet->enabled) $nbrow++;
|
||||
|
||||
print '<form action="fiche.php" method="post">';
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
print '<input type="hidden" name="soc_id" value="'.$soc->id.'">' ."\n";
|
||||
@ -275,18 +278,18 @@ if ($_GET['action'] == 'create' && $user->rights->commande->creer)
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Reference
|
||||
print '<tr><td>'.$langs->trans('Ref').'</td><td>Provisoire</td>';
|
||||
print '<td>'.$langs->trans('Comments').'</td></tr>';
|
||||
|
||||
$nbrow=4;
|
||||
if ($conf->projet->enabled) $nbrow++;
|
||||
|
||||
print '<tr><td>'.$langs->trans('Customer').'</td><td>'.$soc->nom_url.'</td>';
|
||||
// Reference client
|
||||
print '<tr><td>'.$langs->trans('RefCustomer').'</td><td>';
|
||||
print '<input type="text" name="ref_client" value=""></td>';
|
||||
print '<td rowspan="'.$nbrow.'" valign="top"><textarea name="note" wrap="soft" cols="50" rows="4"></textarea></td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('RefCdeClient').'</td><td>';
|
||||
print '<input type="text" name="ref_client" value=""></td>';
|
||||
// Client
|
||||
print '<tr><td>'.$langs->trans('Customer').'</td><td>'.$soc->nom_url.'</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Date').'</td><td>';
|
||||
@ -500,13 +503,16 @@ else
|
||||
*/
|
||||
if ($_GET['action'] == 'annuler')
|
||||
{
|
||||
$html->form_confirm('fiche.php?id='.$id, $langs->trans('Cancel'), $langs->trans('ConfirmCancel'), 'confirm_cancel');
|
||||
$html->form_confirm('fiche.php?id='.$id, $langs->trans('Cancel'), $langs->trans('ConfirmCancelOrder'), 'confirm_cancel');
|
||||
print '<br />';
|
||||
}
|
||||
|
||||
/*
|
||||
* Commande
|
||||
*/
|
||||
$nbrow=8;
|
||||
if ($conf->projet->enabled) $nbrow++;
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Ref
|
||||
@ -522,19 +528,10 @@ else
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Société
|
||||
print '<tr><td>'.$langs->trans('Customer').'</td>';
|
||||
print '<td colspan="3">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$soc->id.'">'.$soc->nom.'</a></td>';
|
||||
print '</tr>';
|
||||
|
||||
$nbrow=7;
|
||||
if ($conf->projet->enabled) $nbrow++;
|
||||
|
||||
// Ref commande client
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td nowrap>';
|
||||
print $langs->trans('RefCdeClient').'</td><td align="left">';
|
||||
print $langs->trans('RefCustomer').'</td><td align="left">';
|
||||
print '</td>';
|
||||
if ($_GET['action'] != 'refcdeclient') print '<td align="right"><a href="'.$_SERVER['PHP_SELF'].'?action=refcdeclient&id='.$commande->id.'">'.img_edit($langs->trans('Edit')).'</a></td>';
|
||||
print '</tr></table>';
|
||||
@ -568,6 +565,12 @@ else
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Société
|
||||
print '<tr><td>'.$langs->trans('Customer').'</td>';
|
||||
print '<td colspan="2">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$soc->id.'">'.$soc->nom.'</a></td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Status').'</td>';
|
||||
print '<td colspan="2">'.$commande->statuts[$commande->statut].'</td>';
|
||||
print '</tr>';
|
||||
@ -597,10 +600,6 @@ else
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr><td height="10"> </td><td colspan="2"> </td></tr>';
|
||||
}
|
||||
|
||||
// Lignes de 3 colonnes
|
||||
|
||||
|
||||
@ -119,54 +119,58 @@ if ($_GET["id"] > 0)
|
||||
/*
|
||||
* Commande
|
||||
*/
|
||||
|
||||
$nbrow=8;
|
||||
if ($conf->projet->enabled) $nbrow++;
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Reference
|
||||
print '<tr><td width="15%">'.$langs->trans("Ref")."</td>";
|
||||
print '<td colspan="2">'.$commande->ref.'</td>';
|
||||
print '<td width="50%">'.$langs->trans("Source").' : ' . $commande->sources[$commande->source] ;
|
||||
if ($commande->source == 0)
|
||||
{
|
||||
/* Propale */
|
||||
// Propale
|
||||
$propal = new Propal($db);
|
||||
$propal->fetch($commande->propale_id);
|
||||
print ' -> <a href="'.DOL_URL_ROOT.'/comm/propal.php?propalid='.$propal->id.'">'.$propal->ref.'</a>';
|
||||
}
|
||||
print "</td></tr>";
|
||||
|
||||
// Ref cde client
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td nowrap>';
|
||||
print $langs->trans('RefCustomer').'</td><td align="left">';
|
||||
print '</td>';
|
||||
print '</tr></table>';
|
||||
print '</td>';
|
||||
print '<td colspan="2">';
|
||||
print $commande->ref_client;
|
||||
print '</td>';
|
||||
print '<td rowspan="'.$nbrow.'" valign="top">'.$langs->trans('Note').' :<br>';
|
||||
if ($commande->brouillon == 1 && $user->rights->commande->creer)
|
||||
{
|
||||
print '<form action="fiche.php?id='.$id.'" method="post">';
|
||||
print '<input type="hidden" name="action" value="setnote">';
|
||||
print '<textarea name="note" rows="4" style="width:95%;">'.$commande->note.'</textarea><br>';
|
||||
print '<center><input type="submit" class="button" value="'.$langs->trans("Save").'"></center>';
|
||||
print '</form>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print nl2br($commande->note);
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Client
|
||||
print "<tr><td>".$langs->trans("Customer")."</td>";
|
||||
print '<td colspan="3">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$soc->id.'">'.$soc->nom.'</a></td>';
|
||||
print '<td colspan="2">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$soc->id.'">'.$soc->nom.'</a>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
$nbrow=7;
|
||||
if ($conf->projet->enabled) $nbrow++;
|
||||
|
||||
// Ref cde client
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td nowrap>';
|
||||
print $langs->trans('RefCdeClient').'</td><td align="left">';
|
||||
print '</td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="2">';
|
||||
print $commande->ref_client;
|
||||
print '</td>';
|
||||
print '<td rowspan="'.$nbrow.'" valign="top">'.$langs->trans('Note').' :<br>';
|
||||
if ($commande->brouillon == 1 && $user->rights->commande->creer)
|
||||
{
|
||||
print '<form action="fiche.php?id='.$id.'" method="post">';
|
||||
print '<input type="hidden" name="action" value="setnote">';
|
||||
print '<textarea name="note" rows="4" style="width:95%;">'.$commande->note.'</textarea><br>';
|
||||
print '<center><input type="submit" class="button" value="'.$langs->trans("Save").'"></center>';
|
||||
print '</form>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print nl2br($commande->note);
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td>';
|
||||
print "<td colspan=\"2\">".$commande->statuts[$commande->statut]."</td>\n";
|
||||
@ -178,9 +182,9 @@ if ($_GET["id"] > 0)
|
||||
print '</tr>';
|
||||
|
||||
// Projet
|
||||
print '<tr>';
|
||||
if ($conf->projet->enabled)
|
||||
{
|
||||
print '<tr>';
|
||||
$langs->load("projects");
|
||||
print '<td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
@ -198,12 +202,8 @@ if ($_GET["id"] > 0)
|
||||
$html->form_project($_SERVER["PHP_SELF"]."?id=$commande->id",$commande->fk_soc,$commande->projetid,"none");
|
||||
}
|
||||
print "</td>";
|
||||
print '</tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td> </td><td colspan="2"> </td>';
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
// Lignes de 3 colonnes
|
||||
|
||||
|
||||
@ -50,6 +50,7 @@ ComptaCard=Accountancy card
|
||||
DraftOrders=Draft orders
|
||||
RelatedOrders=Related orders
|
||||
OnProcessOrders=On process orders
|
||||
RefCustomer=Ref. customer
|
||||
RefCdeClient=Ref. customer order
|
||||
RefCdeClientShort=Ref. cust. order
|
||||
# Sources
|
||||
|
||||
@ -50,6 +50,7 @@ ComptaCard=Fiche compta
|
||||
DraftOrders=Commandes brouillons
|
||||
RelatedOrders=Commandes rattachées
|
||||
OnProcessOrders=Commandes en cours de traitement
|
||||
RefCustomer=Réf. client
|
||||
RefCdeClient=Réf. commande client
|
||||
RefCdeClientShort=Réf. com. client
|
||||
# Sources
|
||||
|
||||
Loading…
Reference in New Issue
Block a user