Fix: price function not correctly used
This commit is contained in:
parent
ed40e6d9b0
commit
0e25939373
@ -701,7 +701,7 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights-
|
||||
$price_base_type = (GETPOST('price_base_type', 'alpha')?GETPOST('price_base_type', 'alpha'):'HT');
|
||||
|
||||
$db->begin();
|
||||
|
||||
|
||||
// Ecrase $pu par celui du produit
|
||||
// Ecrase $desc par celui du produit
|
||||
// Ecrase $txtva par celui du produit
|
||||
@ -861,7 +861,7 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights-
|
||||
if ($result > 0)
|
||||
{
|
||||
$db->commit();
|
||||
|
||||
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
|
||||
{
|
||||
// Define output language
|
||||
@ -903,7 +903,7 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights-
|
||||
else
|
||||
{
|
||||
$db->rollback();
|
||||
|
||||
|
||||
setEventMessage($object->error, 'errors');
|
||||
}
|
||||
}
|
||||
@ -984,11 +984,11 @@ else if ($action == 'updateligne' && $user->rights->propal->creer && GETPOST('sa
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$db->begin();
|
||||
|
||||
|
||||
$result = $object->updateline(
|
||||
GETPOST('lineid'),
|
||||
$pu_ht,
|
||||
@ -1015,7 +1015,7 @@ else if ($action == 'updateligne' && $user->rights->propal->creer && GETPOST('sa
|
||||
if ($result >= 0)
|
||||
{
|
||||
$db->commit();
|
||||
|
||||
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
|
||||
{
|
||||
// Define output language
|
||||
@ -1046,7 +1046,7 @@ else if ($action == 'updateligne' && $user->rights->propal->creer && GETPOST('sa
|
||||
else
|
||||
{
|
||||
$db->rollback();
|
||||
|
||||
|
||||
setEventMessage($object->error, 'errors');
|
||||
}
|
||||
}
|
||||
@ -1980,8 +1980,8 @@ else
|
||||
|
||||
// Amount HT
|
||||
print '<tr><td height="10" width="25%">'.$langs->trans('AmountHT').'</td>';
|
||||
print '<td align="right" class="nowrap"><b>'.price($object->total_ht).'</b></td>';
|
||||
print '<td>'.$langs->trans("Currency".$conf->currency).'</td>';
|
||||
print '<td align="right" class="nowrap"><b>'.price($object->total_ht,'',$langs,0,-1,-1,$conf->currency).'</b></td>';
|
||||
print '<td></td>';
|
||||
|
||||
// Margin Infos
|
||||
if (! empty($conf->margin->enabled)) {
|
||||
@ -1993,28 +1993,28 @@ else
|
||||
|
||||
// Amount VAT
|
||||
print '<tr><td height="10">'.$langs->trans('AmountVAT').'</td>';
|
||||
print '<td align="right" class="nowrap">'.price($object->total_tva).'</td>';
|
||||
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
|
||||
print '<td align="right" class="nowrap">'.price($object->total_tva,'',$langs,0,-1,-1,$conf->currency).'</td>';
|
||||
print '<td></td></tr>';
|
||||
|
||||
// Amount Local Taxes
|
||||
if ($mysoc->localtax1_assuj=="1") //Localtax1
|
||||
{
|
||||
print '<tr><td height="10">'.$langs->transcountry("AmountLT1",$mysoc->country_code).'</td>';
|
||||
print '<td align="right" class="nowrap">'.price($object->total_localtax1).'</td>';
|
||||
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
|
||||
print '<td align="right" class="nowrap">'.price($object->total_localtax1,'',$langs,0,-1,-1,$conf->currency).'</td>';
|
||||
print '<td></td></tr>';
|
||||
}
|
||||
if ($mysoc->localtax2_assuj=="1") //Localtax2
|
||||
{
|
||||
print '<tr><td height="10">'.$langs->transcountry("AmountLT2",$mysoc->country_code).'</td>';
|
||||
print '<td align="right" class="nowrap">'.price($object->total_localtax2).'</td>';
|
||||
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
|
||||
print '<td align="right" class="nowrap">'.price($object->total_localtax2,'',$langs,0,-1,-1,$conf->currency).'</td>';
|
||||
print '<td></td></tr>';
|
||||
}
|
||||
|
||||
|
||||
// Amount TTC
|
||||
print '<tr><td height="10">'.$langs->trans('AmountTTC').'</td>';
|
||||
print '<td align="right" class="nowrap">'.price($object->total_ttc).'</td>';
|
||||
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
|
||||
print '<td align="right" class="nowrap">'.price($object->total_ttc,'',$langs,0,-1,-1,$conf->currency).'</td>';
|
||||
print '<td></td></tr>';
|
||||
|
||||
// Statut
|
||||
print '<tr><td height="10">'.$langs->trans('Status').'</td><td align="left" colspan="2">'.$object->getLibStatut(4).'</td></tr>';
|
||||
|
||||
@ -1737,7 +1737,7 @@ else
|
||||
|
||||
// Capital
|
||||
print '<tr><td>'.$langs->trans('Capital').'</td><td colspan="3">';
|
||||
if ($object->capital) print $object->capital.' '.$langs->trans("Currency".$conf->currency);
|
||||
if ($object->capital) print price($object->capital,'',$langs,0,-1,-1, $conf->currency);
|
||||
else print ' ';
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user