Skip to content

Commit

Permalink
Fixed: Bad date for supplier orders
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jan 22, 2015
1 parent 8267cec commit b7328ca
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions htdocs/projet/element.php
Expand Up @@ -356,18 +356,22 @@
print "</td>\n";

// Date
$date=$element->date;
if (empty($date)) $date=$element->datep;
if (empty($date)) $date=$element->date_contrat;
if (empty($date)) $date=$element->datev; //Fiche inter
if ($tablename == 'commande_fournisseur' || $tablename == 'supplier_order') $date=$element->date_commande;
else
{
$date=$element->date;
if (empty($date)) $date=$element->datep;
if (empty($date)) $date=$element->date_contrat;
if (empty($date)) $date=$element->datev; //Fiche inter
}
print '<td align="center">'.dol_print_date($date,'day').'</td>';

// Third party
print '<td align="left">';
if (is_object($element->client)) print $element->client->getNomUrl(1,'',48);
if (is_object($element->thirdparty)) print $element->thirdparty->getNomUrl(1,'',48);
print '</td>';

// Amount
// Amount without tax
if (empty($value['disableamount']))
{
print '<td align="right">';
Expand All @@ -378,7 +382,7 @@
}
else print '<td></td>';

// Amount
// Amount inc tax
if (empty($value['disableamount']))
{
print '<td align="right">';
Expand Down

0 comments on commit b7328ca

Please sign in to comment.