forked from Wavyzz/dolibarr
Status and amount of object should always be visible.
This commit is contained in:
@@ -3004,7 +3004,7 @@ function price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerou
|
||||
$cursymbolafter.=($tmpcur == $currency_code ? ' '.$tmpcur : $tmpcur);
|
||||
}
|
||||
}
|
||||
$output=$cursymbolbefore.$output.$end.$cursymbolafter;
|
||||
$output=$cursymbolbefore.$output.$end.($cursymbolafter?' ':'').$cursymbolafter;
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
@@ -1434,7 +1434,7 @@ class FactureFournisseur extends CommonInvoice
|
||||
}
|
||||
$this->date_creation = $obj->datec;
|
||||
$this->date_modification = $obj->datem;
|
||||
//$this->date_validation = $obj->datev; Should be stored in log table
|
||||
//$this->date_validation = $obj->datev; // This field is not available. Should be store into log table and using this function should be replaced with showing content of log (like for supplier orders)
|
||||
}
|
||||
$this->db->free($result);
|
||||
}
|
||||
|
||||
@@ -1964,8 +1964,9 @@ else
|
||||
$alreadypaid=$object->getSommePaiement();
|
||||
print '<tr><td>'.$langs->trans('Status').'</td><td colspan="3">'.$object->getLibStatut(4,$alreadypaid).'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('AmountHT').'</td><td align="right">'.price($object->total_ht,1,$langs,0,-1,-1,$conf->currency).'</td><td colspan="2" align="left"> </td></tr>';
|
||||
print '<tr><td>'.$langs->trans('AmountVAT').'</td><td align="right">'.price($object->total_tva,1,$langs,0,-1,-1,$conf->currency).'</td><td colspan="2" align="left">';
|
||||
// Amount
|
||||
print '<tr><td>'.$langs->trans('AmountHT').'</td><td colspan="3">'.price($object->total_ht,1,$langs,0,-1,-1,$conf->currency).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('AmountVAT').'</td><td>'.price($object->total_tva,1,$langs,0,-1,-1,$conf->currency).'</td><td colspan="2" align="left">';
|
||||
if (GETPOST('calculationrule')) $calculationrule=GETPOST('calculationrule','alpha');
|
||||
else $calculationrule=(empty($conf->global->MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND)?'totalofround':'roundoftotal');
|
||||
if ($calculationrule == 'totalofround') $calculationrulenum=1;
|
||||
@@ -1982,16 +1983,16 @@ else
|
||||
if ($societe->localtax1_assuj=="1") //Localtax1
|
||||
{
|
||||
print '<tr><td>'.$langs->transcountry("AmountLT1",$societe->country_code).'</td>';
|
||||
print '<td align="right">'.price($object->total_localtax1,1,$langs,0,-1,-1,$conf->currency).'</td>';
|
||||
print '<td colspan="2"> </td></tr>';
|
||||
print '<td colspan="3">'.price($object->total_localtax1,1,$langs,0,-1,-1,$conf->currency).'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
if ($societe->localtax2_assuj=="1") //Localtax2
|
||||
{
|
||||
print '<tr><td>'.$langs->transcountry("AmountLT2",$societe->country_code).'</td>';
|
||||
print '<td align="right">'.price($object->total_localtax2,1,$langs,0,-1,-1,$conf->currency).'</td>';
|
||||
print '<td colspan="2"> </td></tr>';
|
||||
print '<td colspan="3">'.price($object->total_localtax2,1,$langs,0,-1,-1,$conf->currency).'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
print '<tr><td>'.$langs->trans('AmountTTC').'</td><td align="right">'.price($object->total_ttc,1,$langs,0,-1,-1,$conf->currency).'</td><td colspan="2" align="left"> </td></tr>';
|
||||
print '<tr><td>'.$langs->trans('AmountTTC').'</td><td colspan="3">'.price($object->total_ttc,1,$langs,0,-1,-1,$conf->currency).'</td></tr>';
|
||||
|
||||
// Project
|
||||
if (! empty($conf->projet->enabled))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005 Patrick Rouillon <patrick@rouillon.net>
|
||||
* Copyright (C) 2005-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -200,6 +200,30 @@ if ($id > 0 || ! empty($ref))
|
||||
print $form->editfieldval("Label",'label',$object->label,$object,0);
|
||||
print '</td></tr>';
|
||||
|
||||
// Status
|
||||
$alreadypaid=$object->getSommePaiement();
|
||||
print '<tr><td>'.$langs->trans('Status').'</td><td colspan="3">'.$object->getLibStatut(4,$alreadypaid).'</td></tr>';
|
||||
|
||||
// Amount
|
||||
print '<tr><td>'.$langs->trans('AmountHT').'</td><td colspan="3">'.price($object->total_ht,1,$langs,0,-1,-1,$conf->currency).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('AmountVAT').'</td><td colspan="3">'.price($object->total_tva,1,$langs,0,-1,-1,$conf->currency).'</td></tr>';
|
||||
|
||||
// Amount Local Taxes
|
||||
//TODO: Place into a function to control showing by country or study better option
|
||||
if ($societe->localtax1_assuj=="1") //Localtax1
|
||||
{
|
||||
print '<tr><td>'.$langs->transcountry("AmountLT1",$societe->country_code).'</td>';
|
||||
print '<td colspan="3">'.price($object->total_localtax1,1,$langs,0,-1,-1,$conf->currency).'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
if ($societe->localtax2_assuj=="1") //Localtax2
|
||||
{
|
||||
print '<tr><td>'.$langs->transcountry("AmountLT2",$societe->country_code).'</td>';
|
||||
print '<td colspan="3">'.price($object->total_localtax2,1,$langs,0,-1,-1,$conf->currency).'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
print '<tr><td>'.$langs->trans('AmountTTC').'</td><td colspan="3">'.price($object->total_ttc,1,$langs,0,-1,-1,$conf->currency).'</td></tr>';
|
||||
|
||||
print "</table>";
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
@@ -168,6 +168,30 @@ if ($object->id > 0)
|
||||
print $form->editfieldval("Label",'label',$object->label,$object,0);
|
||||
print '</td>';
|
||||
|
||||
// Status
|
||||
$alreadypaid=$object->getSommePaiement();
|
||||
print '<tr><td>'.$langs->trans('Status').'</td><td colspan="3">'.$object->getLibStatut(4,$alreadypaid).'</td></tr>';
|
||||
|
||||
// Amount
|
||||
print '<tr><td>'.$langs->trans('AmountHT').'</td><td colspan="3">'.price($object->total_ht,1,$langs,0,-1,-1,$conf->currency).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('AmountVAT').'</td><td colspan="3">'.price($object->total_tva,1,$langs,0,-1,-1,$conf->currency).'</td></tr>';
|
||||
|
||||
// Amount Local Taxes
|
||||
//TODO: Place into a function to control showing by country or study better option
|
||||
if ($societe->localtax1_assuj=="1") //Localtax1
|
||||
{
|
||||
print '<tr><td>'.$langs->transcountry("AmountLT1",$societe->country_code).'</td>';
|
||||
print '<td colspan="3">'.price($object->total_localtax1,1,$langs,0,-1,-1,$conf->currency).'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
if ($societe->localtax2_assuj=="1") //Localtax2
|
||||
{
|
||||
print '<tr><td>'.$langs->transcountry("AmountLT2",$societe->country_code).'</td>';
|
||||
print '<td colspan="3">'.price($object->total_localtax2,1,$langs,0,-1,-1,$conf->currency).'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
print '<tr><td>'.$langs->trans('AmountTTC').'</td><td colspan="3">'.price($object->total_ttc,1,$langs,0,-1,-1,$conf->currency).'</td></tr>';
|
||||
|
||||
print '</table><br>';
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
@@ -31,11 +31,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php';
|
||||
|
||||
$langs->load('bills');
|
||||
|
||||
$facid = isset($_GET["facid"])?$_GET["facid"]:'';
|
||||
$id = GETPOST("facid",'int');
|
||||
|
||||
// Security check
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'fournisseur', $facid, 'facture_fourn', 'facture');
|
||||
$result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture');
|
||||
|
||||
|
||||
|
||||
@@ -45,22 +45,22 @@ $result = restrictedArea($user, 'fournisseur', $facid, 'facture_fourn', 'facture
|
||||
|
||||
llxHeader();
|
||||
|
||||
$fac = new FactureFournisseur($db);
|
||||
$fac->fetch($_GET["facid"]);
|
||||
$fac->info($_GET["facid"]);
|
||||
$object = new FactureFournisseur($db);
|
||||
$object->fetch($id);
|
||||
$object->info($id);
|
||||
$soc = new Societe($db);
|
||||
$soc->fetch($fac->socid);
|
||||
$soc->fetch($object->socid);
|
||||
|
||||
$head = facturefourn_prepare_head($fac);
|
||||
$head = facturefourn_prepare_head($object);
|
||||
$titre=$langs->trans('SupplierInvoice');
|
||||
dol_fiche_head($head, 'info', $langs->trans('SupplierInvoice'), 0, 'bill');
|
||||
|
||||
print '<table width="100%"><tr><td>';
|
||||
dol_print_object_info($fac);
|
||||
dol_print_object_info($object);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
|
||||
@@ -139,6 +139,30 @@ if ($object->id > 0)
|
||||
print $form->editfieldval("Label",'label',$object->label,$object,0);
|
||||
print '</td></tr>';
|
||||
|
||||
// Status
|
||||
$alreadypaid=$object->getSommePaiement();
|
||||
print '<tr><td>'.$langs->trans('Status').'</td><td colspan="3">'.$object->getLibStatut(4,$alreadypaid).'</td></tr>';
|
||||
|
||||
// Amount
|
||||
print '<tr><td>'.$langs->trans('AmountHT').'</td><td colspan="3">'.price($object->total_ht,1,$langs,0,-1,-1,$conf->currency).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('AmountVAT').'</td><td colspan="3">'.price($object->total_tva,1,$langs,0,-1,-1,$conf->currency).'</td></tr>';
|
||||
|
||||
// Amount Local Taxes
|
||||
//TODO: Place into a function to control showing by country or study better option
|
||||
if ($societe->localtax1_assuj=="1") //Localtax1
|
||||
{
|
||||
print '<tr><td>'.$langs->transcountry("AmountLT1",$societe->country_code).'</td>';
|
||||
print '<td colspan="3">'.price($object->total_localtax1,1,$langs,0,-1,-1,$conf->currency).'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
if ($societe->localtax2_assuj=="1") //Localtax2
|
||||
{
|
||||
print '<tr><td>'.$langs->transcountry("AmountLT2",$societe->country_code).'</td>';
|
||||
print '<td colspan="3">'.price($object->total_localtax2,1,$langs,0,-1,-1,$conf->currency).'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
print '<tr><td>'.$langs->trans('AmountTTC').'</td><td colspan="3">'.price($object->total_ttc,1,$langs,0,-1,-1,$conf->currency).'</td></tr>';
|
||||
|
||||
print "</table>";
|
||||
|
||||
print '<br>';
|
||||
|
||||
Reference in New Issue
Block a user