Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop
This commit is contained in:
commit
db6cce479e
@ -115,7 +115,10 @@
|
||||
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.NoSpaceBeforeEquals">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.NoSpaceAfterEquals">
|
||||
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.NoSpaceBeforeEquals">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma"> <!-- We don't want this rule, we want to be able to align params on several similare functions on different lines -->
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
|
||||
@ -144,9 +144,9 @@ if ($action == 'add')
|
||||
}
|
||||
|
||||
$leftmenu=''; $mainmenu='';
|
||||
if (GETPOST('menuId', 'int') && ! is_numeric(GETPOST('menuId', 'int')))
|
||||
if (GETPOST('menuId', 'alpha') && ! is_numeric(GETPOST('menuId', 'alpha')))
|
||||
{
|
||||
$tmp=explode('&', GETPOST('menuId', 'int'));
|
||||
$tmp=explode('&', GETPOST('menuId', 'alpha'));
|
||||
foreach($tmp as $s)
|
||||
{
|
||||
if (preg_match('/fk_mainmenu=/', $s))
|
||||
@ -214,9 +214,9 @@ if ($action == 'add')
|
||||
$menu->target=GETPOST('target', 'alpha');
|
||||
$menu->user=GETPOST('user', 'alpha');
|
||||
$menu->mainmenu=GETPOST('propertymainmenu', 'alpha');
|
||||
if (is_numeric(GETPOST('menuId', 'int')))
|
||||
if (is_numeric(GETPOST('menuId', 'alpha')))
|
||||
{
|
||||
$menu->fk_menu=GETPOST('menuId', 'int');
|
||||
$menu->fk_menu=GETPOST('menuId', 'alpha');
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -50,8 +50,8 @@ $label=GETPOST("label", "alpha");
|
||||
$sens=GETPOST("sens", "int");
|
||||
$amount=GETPOST("amount", "alpha");
|
||||
$paymenttype=GETPOST("paymenttype", "int");
|
||||
$accountancy_code=GETPOST("accountancy_code", "int");
|
||||
$subledger_account=GETPOST("subledger_account", "int");
|
||||
$accountancy_code=GETPOST("accountancy_code", "alpha");
|
||||
$subledger_account=GETPOST("subledger_account", "alpha");
|
||||
$projectid = (GETPOST('projectid', 'int') ? GETPOST('projectid', 'int') : GETPOST('fk_project', 'int'));
|
||||
|
||||
// Security check
|
||||
@ -114,8 +114,8 @@ if (empty($reshook))
|
||||
$object->num_payment=GETPOST("num_payment", 'alpha');
|
||||
$object->fk_user_author=$user->id;
|
||||
|
||||
$object->accountancy_code=GETPOST("accountancy_code") > 0 ? GETPOST("accountancy_code", "int") : "";
|
||||
$object->subledger_account=GETPOST("subledger_account") > 0 ? GETPOST("subledger_account", "int") : "";
|
||||
$object->accountancy_code=GETPOST("accountancy_code") > 0 ? GETPOST("accountancy_code", "alpha") : "";
|
||||
$object->subledger_account=GETPOST("subledger_account") > 0 ? GETPOST("subledger_account", "alpha") : "";
|
||||
|
||||
$object->sens=GETPOST('sens');
|
||||
$object->fk_project= GETPOST('fk_project', 'int');
|
||||
|
||||
@ -106,7 +106,7 @@ if ($year) $param.='&year='.$year;
|
||||
|
||||
if ($mode != 'sconly')
|
||||
{
|
||||
print $langs->trans("DescTaxAndDividendsArea").'<br>';
|
||||
print '<span class="opacitymedium">'.$langs->trans("DescTaxAndDividendsArea").'</span><br>';
|
||||
print "<br>";
|
||||
}
|
||||
|
||||
|
||||
@ -30,6 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php';
|
||||
|
||||
$langs->loadLangs(array("accountancy","bills"));
|
||||
@ -59,7 +60,7 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined,
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
if (! $sortfield) $sortfield="f.datef,f.rowid"; // Set here default search field
|
||||
if (! $sortfield) $sortfield="date,item"; // Set here default search field
|
||||
if (! $sortorder) $sortorder="DESC";
|
||||
|
||||
|
||||
@ -69,7 +70,7 @@ $arrayfields=array(
|
||||
);
|
||||
|
||||
// Security check
|
||||
if (empty($conf->compta->enabled) && empty($conf->accounting->enabled)) {
|
||||
if (empty($conf->comptabilite->enabled) && empty($conf->accounting->enabled)) {
|
||||
accessforbidden();
|
||||
}
|
||||
if ($user->societe_id > 0)
|
||||
@ -81,6 +82,8 @@ if ($user->societe_id > 0)
|
||||
* Actions
|
||||
*/
|
||||
|
||||
$entity = GETPOST('entity', 'int')?GETPOST('entity', 'int'):$conf->entity;
|
||||
|
||||
//$parameters = array('socid' => $id);
|
||||
//$reshook = $hookmanager->executeHooks('doActions', $parameters, $object); // Note that $object may have been modified by some hooks
|
||||
//if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
@ -91,21 +94,35 @@ if(($action=="searchfiles"||$action=="dl" ) && $date_start && $date_stop){
|
||||
$wheretail=" '".$db->idate($date_start)."' AND '".$db->idate($date_stop)."'";
|
||||
$sql="SELECT rowid as id, ref as ref,paye as paid, total_ttc, fk_soc, datef as date, 'Invoice' as item FROM ".MAIN_DB_PREFIX."facture";
|
||||
$sql.=" WHERE datef between ".$wheretail;
|
||||
$sql.=" AND entity IN (".($entity==1?'0,1':$entity).')';
|
||||
$sql.=" AND fk_statut <> ".Facture::STATUS_DRAFT;
|
||||
$sql.=" UNION ALL";
|
||||
$sql.=" SELECT rowid as id, ref, paye as paid, total_ttc, fk_soc, datef as date, 'InvoiceSupplier' as item FROM ".MAIN_DB_PREFIX."facture_fourn";
|
||||
$sql.=" SELECT rowid as id, ref, paye as paid, total_ttc, fk_soc, datef as date, 'SupplierInvoice' as item FROM ".MAIN_DB_PREFIX."facture_fourn";
|
||||
$sql.=" WHERE datef between ".$wheretail;
|
||||
$sql.=" AND entity IN (".($entity==1?'0,1':$entity).')';
|
||||
$sql.=" AND fk_statut <> ".FactureFournisseur::STATUS_DRAFT;
|
||||
$sql.=" UNION ALL";
|
||||
$sql.=" SELECT rowid as id, ref, paid, total_ttc, fk_user_author as fk_soc, date_fin as date,'ExpenseReport' as item FROM ".MAIN_DB_PREFIX."expensereport";
|
||||
$sql.=" SELECT rowid as id, ref, paid, total_ttc, fk_user_author as fk_soc, date_fin as date, 'ExpenseReport' as item FROM ".MAIN_DB_PREFIX."expensereport";
|
||||
$sql.=" WHERE date_fin between ".$wheretail;
|
||||
$sql.=" AND entity IN (".($entity==1?'0,1':$entity).')';
|
||||
$sql.=" AND fk_statut <> ".ExpenseReport::STATUS_DRAFT;
|
||||
$sql.=" UNION ALL";
|
||||
$sql.=" SELECT rowid as id, ref,paid,amount as total_ttc, '0' as fk_soc, datedon as date,'Donation' as item FROM ".MAIN_DB_PREFIX."don";
|
||||
$sql.=" SELECT rowid as id, ref,paid,amount as total_ttc, '0' as fk_soc, datedon as date, 'Donation' as item FROM ".MAIN_DB_PREFIX."don";
|
||||
$sql.=" WHERE datedon between ".$wheretail;
|
||||
$sql.=" AND entity IN (".($entity==1?'0,1':$entity).')';
|
||||
$sql.=" AND fk_statut <> ".Don::STATUS_DRAFT;
|
||||
$sql.=" UNION ALL";
|
||||
$sql.=" SELECT rowid as id, label as ref, 1 as paid, amount as total_ttc, fk_user as fk_soc,datep as date,'SalaryPayment' as item FROM ".MAIN_DB_PREFIX."payment_salary";
|
||||
$sql.=" SELECT rowid as id, label as ref, 1 as paid, amount as total_ttc, fk_user as fk_soc,datep as date, 'SalaryPayment' as item FROM ".MAIN_DB_PREFIX."payment_salary";
|
||||
$sql.=" WHERE datep between ".$wheretail;
|
||||
$sql.=" AND entity IN (".($entity==1?'0,1':$entity).')';
|
||||
//$sql.=" AND fk_statut <> ".PaymentSalary::STATUS_DRAFT;
|
||||
$sql.=" UNION ALL";
|
||||
$sql.=" SELECT rowid as id, libelle as ref, paye as paid, amount as total_ttc, 0 as fk_soc, date_creation as date, 'SocialContributions' as item FROM ".MAIN_DB_PREFIX."chargesociales";
|
||||
$sql.=" SELECT rowid as id, libelle as ref, paye as paid, amount as total_ttc, 0 as fk_soc, date_creation as date, 'SocialContributions' as item FROM ".MAIN_DB_PREFIX."chargesociales";
|
||||
$sql.=" WHERE date_creation between ".$wheretail;
|
||||
$sql.=" AND entity IN (".($entity==1?'0,1':$entity).')';
|
||||
//$sql.=" AND fk_statut <> ".ChargeSociales::STATUS_DRAFT;
|
||||
$sql.= $db->order($sortfield, $sortorder);
|
||||
|
||||
$resd = $db->query($sql);
|
||||
$files=array();
|
||||
$link='';
|
||||
@ -120,7 +137,7 @@ if(($action=="searchfiles"||$action=="dl" ) && $date_start && $date_stop){
|
||||
|
||||
$upload_dir ='';
|
||||
$i=0;
|
||||
while($i<$numd)
|
||||
while ($i < $numd)
|
||||
{
|
||||
$objd = $db->fetch_object($resd);
|
||||
|
||||
@ -131,18 +148,18 @@ if(($action=="searchfiles"||$action=="dl" ) && $date_start && $date_stop){
|
||||
$upload_dir = $conf->facture->dir_output.'/'.$subdir;
|
||||
$link="document.php?modulepart=facture&file=".str_replace('/', '%2F', $subdir).'%2F';
|
||||
break;
|
||||
case "InvoiceSupplier":
|
||||
case "SupplierInvoice":
|
||||
$tmpinvoicesupplier->fetch($objd->id);
|
||||
$subdir=get_exdir(0, 0, 0, 1, $tmpinvoicesupplier, 'invoice_supplier').'/'.dol_sanitizeFileName($objd->ref);
|
||||
$subdir=get_exdir($tmpinvoicesupplier->id, 2, 0, 0, $tmpinvoicesupplier, 'invoice_supplier').'/'.dol_sanitizeFileName($objd->ref);
|
||||
$upload_dir = $conf->fournisseur->facture->dir_output.'/'.$subdir;
|
||||
$link="document.php?modulepart=facture_fournisseur&file=".str_replace('/', '%2F', $subdir).'%2F';
|
||||
break;
|
||||
case "Expense":
|
||||
case "ExpenseReport":
|
||||
$subdir=dol_sanitizeFileName($objd->ref);
|
||||
$upload_dir = $conf->expensereport->dir_output.'/'.$subdir;
|
||||
$link="document.php?modulepart=expensereport&file=".str_replace('/', '%2F', $subdir).'%2F';
|
||||
break;
|
||||
case "Salary":
|
||||
case "SalaryPayment":
|
||||
$subdir=dol_sanitizeFileName($objd->id);
|
||||
$upload_dir = $conf->salaries->dir_output.'/'.$subdir;
|
||||
$link="document.php?modulepart=salaries&file=".str_replace('/', '%2F', $subdir).'%2F';
|
||||
@ -169,7 +186,9 @@ if(($action=="searchfiles"||$action=="dl" ) && $date_start && $date_stop){
|
||||
{
|
||||
$result=true;
|
||||
$files=dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview\.png)$', '', SORT_ASC, 1);
|
||||
if (count($files)<1) {
|
||||
//var_dump($upload_dir);
|
||||
if (count($files) < 1)
|
||||
{
|
||||
$nofile['date']=$db->idate($objd->date);
|
||||
$nofile['paid']=$objd->paid;
|
||||
$nofile['amount']=$objd->total_ttc;
|
||||
@ -212,15 +231,19 @@ if(($action=="searchfiles"||$action=="dl" ) && $date_start && $date_stop){
|
||||
*/
|
||||
//FIXME
|
||||
/*
|
||||
*ZIP creation
|
||||
*/
|
||||
*ZIP creation
|
||||
*/
|
||||
|
||||
if ($result && $action == "dl")
|
||||
{
|
||||
dol_delete_file($zip);
|
||||
$dirfortmpfile = ($conf->accounting->dir_temp ? $conf->accounting->dir_temp : $conf->compta->dir_temp);
|
||||
|
||||
dol_mkdir($dirfortmpfile);
|
||||
|
||||
$log='date,type,ref,total,paid,filename,item_id'."\n";
|
||||
$zipname = ($conf->accounting->dir_temp ? $conf->accounting->dir_temp : $conf->compta->dir_temp).'/'.($date_start)."-".($date_stop).'_export.zip';
|
||||
$zipname = $dirfortmpfile.'/'.dol_print_date($date_start, 'dayrfc')."-".dol_print_date($date_stop, 'dayrfc').'_export.zip';
|
||||
|
||||
dol_delete_file(name);
|
||||
|
||||
$zip = new ZipArchive;
|
||||
$res = $zip->open($zipname, ZipArchive::OVERWRITE|ZipArchive::CREATE);
|
||||
@ -228,8 +251,8 @@ if ($result && $action == "dl")
|
||||
{
|
||||
foreach ($filesarray as $key=> $file)
|
||||
{
|
||||
if (file_exists($file["fullname"])) $zip->addFile($file["fullname"], $file["relpathnamelang"]); //
|
||||
$log.=$file['date'].','.$file['item'].','.$file['ref'].','.$file['amount'].','.$file['paid'].','.$file["name"].','.$file['fk']."\n";
|
||||
if (file_exists($file["fullname"])) $zip->addFile($file["fullname"], $file["relpathnamelang"]); //
|
||||
$log.=dol_print_date($file['date'], 'dayrfc').','.$file['item'].','.$file['ref'].','.$file['amount'].','.$file['paid'].','.$file["name"].','.$file['fk']."\n";
|
||||
}
|
||||
$zip->addFromString('transactions.csv', $log);
|
||||
$zip->close();
|
||||
@ -251,21 +274,63 @@ if ($result && $action == "dl")
|
||||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
$userstatic=new User($db);
|
||||
|
||||
$title=$langs->trans("ComptaFiles").' - '.$langs->trans("List");
|
||||
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
$h=0;
|
||||
$head[$h][0] = $_SERVER["PHP_SELF"].$varlink;
|
||||
$head[$h][1] = $langs->trans("AccountantFiles");
|
||||
$head[$h][2] = 'AccountantFiles';
|
||||
$head[$h][1] = $langs->trans("AccountancyFiles");
|
||||
$head[$h][2] = 'AccountancyFiles';
|
||||
|
||||
dol_fiche_head($head, 'AccountancyFiles');
|
||||
|
||||
dol_fiche_head($head, 'AccountantFiles');
|
||||
|
||||
$form = new Form($db);
|
||||
$userstatic=new User($db);
|
||||
$title=$langs->trans("ComptaFiles").' - '.$langs->trans("List");
|
||||
print '<form name="searchfiles" action="?action=searchfiles'.$tail.'" method="POST" >'."\n";
|
||||
print $langs->trans("ReportPeriod").': '.$form->select_date($date_start, 'date_start', 0, 0, 0, "", 1, 1, 1);
|
||||
print ' - '.$form->select_date($date_stop, 'date_stop', 0, 0, 0, "", 1, 1, 1)."\n</a>";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print $langs->trans("ReportPeriod").': '.$form->selectDate($date_start, 'date_start', 0, 0, 0, "", 1, 1, 0);
|
||||
print ' - '.$form->selectDate($date_stop, 'date_stop', 0, 0, 0, "", 1, 1, 0)."\n</a>";
|
||||
// Multicompany
|
||||
/*if (! empty($conf->multicompany->enabled) && is_object($mc))
|
||||
{
|
||||
print '<br>';
|
||||
// This is now done with hook formObjectOptions. Keep this code for backward compatibility with old multicompany module
|
||||
if (method_exists($mc, 'formObjectOptions'))
|
||||
{
|
||||
if (empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1 && $user->admin && ! $user->entity) // condition must be same for create and edit mode
|
||||
{
|
||||
print "<tr>".'<td>'.$langs->trans("Entity").'</td>';
|
||||
print "<td>".$mc->select_entities($entity);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<input type="hidden" name="entity" value="'.$conf->entity.'" />';
|
||||
}
|
||||
}
|
||||
|
||||
$object = new stdClass();
|
||||
// Other attributes
|
||||
$parameters=array('objectsrc' => null, 'colspan' => ' colspan="3"');
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook))
|
||||
{
|
||||
print $object->showOptionals($extrafields, 'edit');
|
||||
}
|
||||
}*/
|
||||
if (! empty($conf->multicompany->enabled) && is_object($mc))
|
||||
{
|
||||
print ' - '.$langs->trans("Entity").' : ';
|
||||
$mc->dao->getEntities();
|
||||
$mc->dao->fetch($conf->entity);
|
||||
print $mc->dao->label;
|
||||
print "<br>\n";
|
||||
}
|
||||
|
||||
print '<input class="button" type="submit" value="'.$langs->trans("Refresh").'" /></form>'."\n";
|
||||
|
||||
dol_fiche_end();
|
||||
@ -281,6 +346,7 @@ if (!empty($date_start) && !empty($date_stop))
|
||||
$param.='&date_stopyear='.GETPOST('date_stopyear', 'int');
|
||||
|
||||
print '<form name="dl" action="?action=dl" method="POST" >'."\n";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
|
||||
echo dol_print_date($date_start, 'day')." - ".dol_print_date($date_stop, 'day');
|
||||
|
||||
@ -315,17 +381,21 @@ if (!empty($date_start) && !empty($date_stop))
|
||||
if ($result)
|
||||
{
|
||||
$TData = dol_sort_array($filesarray, 'date', 'ASC');
|
||||
if(empty($TData)) {
|
||||
|
||||
if (empty($TData))
|
||||
{
|
||||
print '<tr class="oddeven"><td colspan="7">'.$langs->trans("NoItem").'</td></tr>';
|
||||
} else {
|
||||
// Sort array by date ASC to calucalte balance
|
||||
}
|
||||
else
|
||||
{
|
||||
// Sort array by date ASC to calculate balance
|
||||
|
||||
$totalDebit = 0;
|
||||
$totalCredit = 0;
|
||||
// Balance calculation
|
||||
$balance = 0;
|
||||
foreach($TData as &$data1) {
|
||||
if($data1['item']!='Invoice'&& $data1['item']!='Donation' ){
|
||||
if ($data1['item']!='Invoice'&& $data1['item']!='Donation' ){
|
||||
$data1['amount']=-$data1['amount'];
|
||||
}
|
||||
if ($data1['amount']>0){
|
||||
@ -334,8 +404,10 @@ if (!empty($date_start) && !empty($date_stop))
|
||||
$balance += $data1['amount'];
|
||||
$data1['balance'] = $balance;
|
||||
}
|
||||
|
||||
// Display array
|
||||
foreach($TData as $data) {
|
||||
foreach($TData as $data)
|
||||
{
|
||||
$html_class = '';
|
||||
//if (!empty($data['fk_facture'])) $html_class = 'facid-'.$data['fk_facture'];
|
||||
//elseif (!empty($data['fk_paiement'])) $html_class = 'payid-'.$data['fk_paiement'];
|
||||
@ -343,7 +415,7 @@ if (!empty($date_start) && !empty($date_stop))
|
||||
print "<td align=\"center\">";
|
||||
print dol_print_date($data['date'], 'day');
|
||||
print "</td>\n";
|
||||
print '<td aling="left">'.$data['item'].'</td>';
|
||||
print '<td aling="left">'.$langs->trans($data['item']).'</td>';
|
||||
print '<td aling="left">'.$data['ref'].'</td>';
|
||||
|
||||
// File link
|
||||
@ -358,6 +430,7 @@ if (!empty($date_start) && !empty($date_stop))
|
||||
print '<td align="right">'.price($data['balance'])."</td>\n";
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
print '<tr class="liste_total">';
|
||||
print '<td colspan="5"> </td>';
|
||||
print '<td align="right">'.price($totalDebit).'</td>';
|
||||
@ -370,6 +443,5 @@ if (!empty($date_start) && !empty($date_stop))
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
@ -279,7 +279,7 @@ if ($resql)
|
||||
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "p.statut", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "p.statut", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
@ -922,7 +922,7 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++)
|
||||
if($mois>12) {$annee_decalage=$annee+1;}
|
||||
$case = strftime("%Y-%m", dol_mktime(12, 0, 0, $mois_modulo, 1, $annee_decalage));
|
||||
|
||||
print '<td align="right"> ';
|
||||
print '<td class="right"> ';
|
||||
if ($modecompta == 'BOOKKEEPING')
|
||||
{
|
||||
if (isset($decaiss[$case]) && $decaiss[$case] != 0)
|
||||
@ -943,7 +943,7 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++)
|
||||
}
|
||||
print "</td>";
|
||||
|
||||
print '<td align="right" class="borderrightlight"> ';
|
||||
print '<td class="borderrightlight right"> ';
|
||||
if ($modecompta == 'BOOKKEEPING')
|
||||
{
|
||||
if (isset($encaiss[$case]))
|
||||
@ -978,8 +978,8 @@ print '</td>';
|
||||
for ($annee = $year_start ; $annee <= $year_end ; $annee++)
|
||||
{
|
||||
$nbcols+=2;
|
||||
print '<td align="right">'.(isset($totsorties[$annee])?price(price2num($totsorties[$annee], 'MT')):' ').'</td>';
|
||||
print '<td align="right" style="border-right: 1px solid #DDD">'.(isset($totentrees[$annee])?price(price2num($totentrees[$annee], 'MT')):' ').'</td>';
|
||||
print '<td class="right">'.(isset($totsorties[$annee])?price(price2num($totsorties[$annee], 'MT')):' ').'</td>';
|
||||
print '<td class="right" style="border-right: 1px solid #DDD">'.(isset($totentrees[$annee])?price(price2num($totentrees[$annee], 'MT')):' ').'</td>';
|
||||
}
|
||||
print "</tr>\n";
|
||||
|
||||
@ -993,7 +993,7 @@ print "</tr>\n";
|
||||
print '<tr class="liste_total"><td>'.$langs->trans("AccountingResult").'</td>';
|
||||
for ($annee = $year_start ; $annee <= $year_end ; $annee++)
|
||||
{
|
||||
print '<td align="right" colspan="2" class="borderrightlight"> ';
|
||||
print '<td colspan="2" class="borderrightlight right"> ';
|
||||
if (isset($totentrees[$annee]) || isset($totsorties[$annee]))
|
||||
{
|
||||
$in=(isset($totentrees[$annee])?price2num($totentrees[$annee], 'MT'):0);
|
||||
|
||||
@ -228,18 +228,18 @@ print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"")
|
||||
print '<tr class="liste_titre">';
|
||||
print '<th class="liste_titre">'.$langs->trans("AccountingCategory").'</th>';
|
||||
print '<th class="liste_titre"></th>';
|
||||
print '<th class="liste_titre" align="right">'.$langs->trans("PreviousPeriod").'</th>';
|
||||
print '<th class="liste_titre" align="right">'.$langs->trans("SelectedPeriod").'</th>';
|
||||
print '<th class="liste_titre right">'.$langs->trans("PreviousPeriod").'</th>';
|
||||
print '<th class="liste_titre right">'.$langs->trans("SelectedPeriod").'</th>';
|
||||
foreach($months as $k => $v){
|
||||
if (($k+1) >= $date_startmonth)
|
||||
{
|
||||
print '<th class="liste_titre width50" align="right" >'.$langs->trans('MonthShort'.sprintf("%02s", ($k+1))).'</th>';
|
||||
print '<th class="liste_titre right width50">'.$langs->trans('MonthShort'.sprintf("%02s", ($k+1))).'</th>';
|
||||
}
|
||||
}
|
||||
foreach($months as $k => $v){
|
||||
if (($k+1) < $date_startmonth)
|
||||
{
|
||||
print '<th class="liste_titre width50" align="right" >'.$langs->trans('MonthShort'.sprintf("%02s", ($k+1))).'</th>';
|
||||
print '<th class="liste_titre right width50">'.$langs->trans('MonthShort'.sprintf("%02s", ($k+1))).'</th>';
|
||||
}
|
||||
}
|
||||
print '</tr>';
|
||||
@ -493,15 +493,15 @@ elseif ($modecompta=="BOOKKEEPING")
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
print '<td align="right">' . price($totCat['NP']) . '</td>';
|
||||
print '<td align="right">' . price($totCat['N']) . '</td>';
|
||||
print '<td class="right">' . price($totCat['NP']) . '</td>';
|
||||
print '<td class="right">' . price($totCat['N']) . '</td>';
|
||||
|
||||
// Each month
|
||||
foreach($totCat['M'] as $k => $v){
|
||||
if (($k+1) >= $date_startmonth) print '<td align="right">' . price($v) . '</td>';
|
||||
if (($k+1) >= $date_startmonth) print '<td class="right">' . price($v) . '</td>';
|
||||
}
|
||||
foreach($totCat['M'] as $k => $v){
|
||||
if (($k+1) < $date_startmonth) print '<td align="right">' . price($v) . '</td>';
|
||||
if (($k+1) < $date_startmonth) print '<td class="right">' . price($v) . '</td>';
|
||||
}
|
||||
|
||||
print "</tr>\n";
|
||||
@ -523,8 +523,8 @@ elseif ($modecompta=="BOOKKEEPING")
|
||||
print ' - ';
|
||||
print $cpt['account_label'];
|
||||
print '</td>';
|
||||
print '<td align="right">' . price($resultNP) . '</td>';
|
||||
print '<td align="right">' . price($resultN) . '</td>';
|
||||
print '<td class="right">' . price($resultNP) . '</td>';
|
||||
print '<td class="right">' . price($resultN) . '</td>';
|
||||
|
||||
// Make one call for each month
|
||||
foreach($months as $k => $v)
|
||||
@ -532,7 +532,7 @@ elseif ($modecompta=="BOOKKEEPING")
|
||||
if (($k+1) >= $date_startmonth)
|
||||
{
|
||||
$resultM=$totPerAccount[$cpt['account_number']]['M'][$k];
|
||||
print '<td align="right">' . price($resultM) . '</td>';
|
||||
print '<td class="right">' . price($resultM) . '</td>';
|
||||
}
|
||||
}
|
||||
foreach($months as $k => $v)
|
||||
@ -540,7 +540,7 @@ elseif ($modecompta=="BOOKKEEPING")
|
||||
if (($k+1) < $date_startmonth)
|
||||
{
|
||||
$resultM=$totPerAccount[$cpt['account_number']]['M'][$k];
|
||||
print '<td align="right">' . price($resultM) . '</td>';
|
||||
print '<td class="right">' . price($resultM) . '</td>';
|
||||
}
|
||||
}
|
||||
print "</tr>\n";
|
||||
|
||||
@ -194,9 +194,9 @@ if ($result)
|
||||
print '</td>';
|
||||
}
|
||||
// Amount
|
||||
print '<td class="liste_titre" align="right"><input name="search_amount" class="flat" type="text" size="8" value="'.$db->escape($search_amount).'"></td>';
|
||||
print '<td class="liste_titre right"><input name="search_amount" class="flat" type="text" size="8" value="'.$db->escape($search_amount).'"></td>';
|
||||
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
@ -204,11 +204,11 @@ if ($result)
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "s.rowid", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Employee", $_SERVER["PHP_SELF"], "u.rowid", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "s.label", "", $param, 'align="left"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "s.label", "", $param, 'class="left"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "s.datep,s.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("PaymentMode", $_SERVER["PHP_SELF"], "type", "", $param, 'align="left"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("PaymentMode", $_SERVER["PHP_SELF"], "type", "", $param, 'class="left"', $sortfield, $sortorder);
|
||||
if (! empty($conf->banque->enabled)) print_liste_field_titre("BankAccount", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "s.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "s.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||
print "</tr>\n";
|
||||
|
||||
@ -269,8 +269,8 @@ if ($result)
|
||||
print '</td>';
|
||||
}
|
||||
// Amount
|
||||
print "<td align=\"right\">".price($obj->amount)."</td>";
|
||||
print "<td></td>";
|
||||
print '<td class="right">'.price($obj->amount).'</td>';
|
||||
print '<td></td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$total = $total + $obj->amount;
|
||||
@ -281,7 +281,7 @@ if ($result)
|
||||
$colspan=5;
|
||||
if (! empty($conf->banque->enabled)) $colspan++;
|
||||
print '<tr class="liste_total"><td colspan="'.$colspan.'" class="liste_total">'.$langs->trans("Total").'</td>';
|
||||
print '<td class="liste_total" align="right">'.price($total)."</td>";
|
||||
print '<td class="liste_total right">'.price($total)."</td>";
|
||||
print "<td></td></tr>";
|
||||
|
||||
print "</table>";
|
||||
|
||||
@ -218,9 +218,9 @@ print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre" height="24">';
|
||||
print '<td align="center">'.$langs->trans("Year").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Number").'</td>';
|
||||
print '<td align="right">'.$langs->trans("AmountTotal").'</td>';
|
||||
print '<td align="right">'.$langs->trans("AmountAverage").'</td>';
|
||||
print '<td class="right">'.$langs->trans("Number").'</td>';
|
||||
print '<td class="right">'.$langs->trans("AmountTotal").'</td>';
|
||||
print '<td class="right">'.$langs->trans("AmountAverage").'</td>';
|
||||
print '</tr>';
|
||||
|
||||
$oldyear=0;
|
||||
@ -234,17 +234,17 @@ foreach ($data as $val)
|
||||
|
||||
print '<tr class="oddeven" height="24">';
|
||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'">'.$oldyear.'</a></td>';
|
||||
print '<td align="right">0</td>';
|
||||
print '<td align="right">0</td>';
|
||||
print '<td align="right">0</td>';
|
||||
print '<td class="right">0</td>';
|
||||
print '<td class="right">0</td>';
|
||||
print '<td class="right">0</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
print '<tr class="oddeven" height="24">';
|
||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'">'.$year.'</a></td>';
|
||||
print '<td align="right">'.$val['nb'].'</td>';
|
||||
print '<td align="right">'.price(price2num($val['total'], 'MT'), 1).'</td>';
|
||||
print '<td align="right">'.price(price2num($val['avg'], 'MT'), 1).'</td>';
|
||||
print '<td class="right">'.$val['nb'].'</td>';
|
||||
print '<td class="right">'.price(price2num($val['total'], 'MT'), 1).'</td>';
|
||||
print '<td class="right">'.price(price2num($val['avg'], 'MT'), 1).'</td>';
|
||||
print '</tr>';
|
||||
$oldyear=$year;
|
||||
}
|
||||
|
||||
@ -537,7 +537,7 @@ if ($id > 0)
|
||||
print $langs->trans('PaymentMode');
|
||||
print '</td>';
|
||||
if ($action != 'editmode')
|
||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmode&id=' . $object->id . '">' . img_edit($langs->trans('SetMode'), 1) . '</a></td>';
|
||||
print '<td class="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmode&id=' . $object->id . '">' . img_edit($langs->trans('SetMode'), 1) . '</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td>';
|
||||
if ($action == 'editmode') {
|
||||
@ -555,7 +555,7 @@ if ($id > 0)
|
||||
print $langs->trans('BankAccount');
|
||||
print '<td>';
|
||||
if ($action != 'editbankaccount' && $user->rights->tax->charges->creer)
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbankaccount&id='.$object->id.'">'.img_edit($langs->trans('SetBankAccount'), 1).'</a></td>';
|
||||
print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbankaccount&id='.$object->id.'">'.img_edit($langs->trans('SetBankAccount'), 1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td>';
|
||||
if ($action == 'editbankaccount') {
|
||||
@ -608,9 +608,9 @@ if ($id > 0)
|
||||
print '<td>'.$langs->trans("Date").'</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
if (! empty($conf->banque->enabled)) {
|
||||
print '<td class="liste_titre" align="right">' . $langs->trans('BankAccount') . '</td>';
|
||||
print '<td class="liste_titre right">' . $langs->trans('BankAccount') . '</td>';
|
||||
}
|
||||
print '<td align="right">'.$langs->trans("Amount").'</td>';
|
||||
print '<td class="right">'.$langs->trans("Amount").'</td>';
|
||||
print '</tr>';
|
||||
|
||||
if ($num > 0)
|
||||
@ -639,12 +639,12 @@ if ($id > 0)
|
||||
$bankaccountstatic->accountancy_journal = $accountingjournal->getNomUrl(0, 1, 1, '', 1);
|
||||
}
|
||||
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
if ($bankaccountstatic->id)
|
||||
print $bankaccountstatic->getNomUrl(1, 'transactions');
|
||||
print '</td>';
|
||||
}
|
||||
print '<td align="right">'.price($objp->amount)."</td>\n";
|
||||
print '<td class="right">'.price($objp->amount)."</td>\n";
|
||||
print "</tr>";
|
||||
$totalpaye += $objp->amount;
|
||||
$i++;
|
||||
@ -658,14 +658,14 @@ if ($id > 0)
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
print '<tr><td colspan="'.$nbcols.'" align="right">'.$langs->trans("AlreadyPaid")." :</td><td align=\"right\">".price($totalpaye)."</td></tr>\n";
|
||||
print '<tr><td colspan="'.$nbcols.'" align="right">'.$langs->trans("AmountExpected")." :</td><td align=\"right\">".price($object->amount)."</td></tr>\n";
|
||||
print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans("AlreadyPaid")." :</td><td class=\"right\">".price($totalpaye)."</td></tr>\n";
|
||||
print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans("AmountExpected")." :</td><td class=\"right\">".price($object->amount)."</td></tr>\n";
|
||||
|
||||
$resteapayer = $object->amount - $totalpaye;
|
||||
$cssforamountpaymentcomplete = 'amountpaymentcomplete';
|
||||
|
||||
print '<tr><td colspan="'.$nbcols.'" align="right">'.$langs->trans("RemainderToPay")." :</td>";
|
||||
print '<td align="right"'.($resteapayer?' class="amountremaintopay"':(' class="'.$cssforamountpaymentcomplete.'"')).'>'.price($resteapayer)."</td></tr>\n";
|
||||
print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans("RemainderToPay")." :</td>";
|
||||
print '<td class="right"'.($resteapayer?' class="amountremaintopay"':(' class="'.$cssforamountpaymentcomplete.'"')).'>'.price($resteapayer)."</td></tr>\n";
|
||||
|
||||
print "</table>";
|
||||
$db->free($resql);
|
||||
|
||||
@ -203,17 +203,17 @@ if ($resql)
|
||||
// Period end date
|
||||
print '<td class="liste_titre"> </td>';
|
||||
// Amount
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
print '<input class="flat" type="text" size="6" name="search_amount" value="'.dol_escape_htmltag($search_amount).'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
// Status
|
||||
print '<td class="liste_titre maxwidthonsmartphone" align="right">';
|
||||
print '<td class="liste_titre maxwidthonsmartphone right">';
|
||||
$liststatus=array('0'=>$langs->trans("Unpaid"), '1'=>$langs->trans("Paid"));
|
||||
print $form->selectarray('search_status', $liststatus, $search_status, 1);
|
||||
print '</td>';
|
||||
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
@ -221,12 +221,12 @@ if ($resql)
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "id", "", $param, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "cs.libelle", "", $param, 'align="left"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "type", "", $param, 'align="left"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "cs.libelle", "", $param, 'class="left"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "type", "", $param, 'class="left"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "periode", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "cs.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "cs.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("DateDue", $_SERVER["PHP_SELF"], "cs.date_ech", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "cs.paye", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "cs.paye", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||
print "</tr>\n";
|
||||
|
||||
@ -267,7 +267,7 @@ if ($resql)
|
||||
print '</td>';
|
||||
|
||||
// Amount
|
||||
print '<td align="right" width="100">'.price($obj->amount).'</td>';
|
||||
print '<td class="right" width="100">'.price($obj->amount).'</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
if (! $i) $totalarray['totalttcfield']=$totalarray['nbfield'];
|
||||
$totalarray['totalttc'] += $obj->amount;
|
||||
@ -275,7 +275,7 @@ if ($resql)
|
||||
// Due date
|
||||
print '<td width="110" align="center">'.dol_print_date($db->jdate($obj->date_ech), 'day').'</td>';
|
||||
|
||||
print '<td align="right" class="nowrap">'.$chargesociale_static->LibStatut($obj->paye, 5, $obj->alreadypayed).'</td>';
|
||||
print '<td class="nowrap right">'.$chargesociale_static->LibStatut($obj->paye, 5, $obj->alreadypayed).'</td>';
|
||||
|
||||
print '<td></td>';
|
||||
|
||||
@ -292,7 +292,7 @@ if ($resql)
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td align="right">'.price($totalarray['totalttc']).'</td>';
|
||||
print '<td class="right">'.price($totalarray['totalttc']).'</td>';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
|
||||
@ -122,8 +122,8 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
|
||||
print_liste_field_titre("LabelContrib", $_SERVER["PHP_SELF"], "c.libelle", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("TypeContrib", $_SERVER["PHP_SELF"], "cs.fk_type", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "cs.date_ech", "", $param, 'width="140px"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "cs.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pc.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "cs.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pc.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
$sql = "SELECT c.id, c.libelle as lib,";
|
||||
@ -187,9 +187,9 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
|
||||
if (empty($date)) $date=$obj->date_ech;
|
||||
print '<td>'.dol_print_date($date, 'day').'</td>';
|
||||
// Expected to pay
|
||||
print '<td align="right">'.price($obj->total).'</td>';
|
||||
print '<td class="right">'.price($obj->total).'</td>';
|
||||
// Paid
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
if ($obj->totalpaye) print price($obj->totalpaye);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
@ -200,11 +200,11 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
|
||||
$i++;
|
||||
}
|
||||
print '<tr class="liste_total"><td colspan="3" class="liste_total">'.$langs->trans("Total").'</td>';
|
||||
print '<td align="right" class="liste_total"></td>'; // A total here has no sense
|
||||
print '<td class="liste_total right"></td>'; // A total here has no sense
|
||||
print '<td align="center" class="liste_total"> </td>';
|
||||
print '<td align="center" class="liste_total"> </td>';
|
||||
print '<td align="center" class="liste_total"> </td>';
|
||||
print '<td align="right" class="liste_total">'.price($totalpaye)."</td>";
|
||||
print '<td class="liste_total right">'.price($totalpaye)."</td>";
|
||||
print "</tr>";
|
||||
}
|
||||
else
|
||||
@ -246,10 +246,10 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "pv.datev", "", $param, 'width="140px"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "pv.label", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "pv.rowid", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "pv.datev", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
while ($i < $num)
|
||||
@ -263,7 +263,7 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
|
||||
|
||||
print "<td>".$obj->label."</td>\n";
|
||||
|
||||
print '<td align="right">'.price($obj->amount)."</td>";
|
||||
print '<td class="right">'.price($obj->amount)."</td>";
|
||||
|
||||
// Ref payment
|
||||
$tva_static->id=$obj->rowid;
|
||||
@ -271,16 +271,16 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
|
||||
print '<td class="left">'.$tva_static->getNomUrl(1)."</td>\n";
|
||||
|
||||
print '<td align="center">'.dol_print_date($db->jdate($obj->dm), 'day')."</td>\n";
|
||||
print '<td align="right">'.price($obj->amount)."</td>";
|
||||
print '<td class="right">'.price($obj->amount)."</td>";
|
||||
print "</tr>\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").'</td>';
|
||||
print '<td align="right">'.price($total).'</td>';
|
||||
print '<td class="right">'.price($total).'</td>';
|
||||
print '<td align="center"> </td>';
|
||||
print '<td align="center"> </td>';
|
||||
print '<td align="right">'.price($total)."</td>";
|
||||
print '<td class="right">'.price($total)."</td>";
|
||||
print "</tr>";
|
||||
|
||||
print "</table>";
|
||||
@ -347,10 +347,10 @@ while($j<$numlt)
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "pv.datev", "", $param, 'width="120"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "pv.label", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "pv.rowid", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "pv.datep", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
while ($i < $num)
|
||||
@ -364,7 +364,7 @@ while($j<$numlt)
|
||||
|
||||
print "<td>".$obj->label."</td>\n";
|
||||
|
||||
print '<td align="right">'.price($obj->amount)."</td>";
|
||||
print '<td class="right">'.price($obj->amount)."</td>";
|
||||
|
||||
// Ref payment
|
||||
$tva_static->id=$obj->rowid;
|
||||
@ -372,16 +372,16 @@ while($j<$numlt)
|
||||
print '<td class="left">'.$tva_static->getNomUrl(1)."</td>\n";
|
||||
|
||||
print '<td align="center">'.dol_print_date($db->jdate($obj->dp), 'day')."</td>\n";
|
||||
print '<td align="right">'.price($obj->amount)."</td>";
|
||||
print '<td class="right">'.price($obj->amount)."</td>";
|
||||
print "</tr>\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
print '<tr class="liste_total"><td align="right" colspan="2">'.$langs->trans("Total").'</td>';
|
||||
print '<td align="right">'.price($total)."</td>";
|
||||
print '<tr class="liste_total"><td class="right" colspan="2">'.$langs->trans("Total").'</td>';
|
||||
print '<td class="right">'.price($total)."</td>";
|
||||
print '<td align="center"> </td>';
|
||||
print '<td align="center"> </td>';
|
||||
print '<td align="right">'.price($total)."</td>";
|
||||
print '<td class="right">'.price($total)."</td>";
|
||||
print "</tr>";
|
||||
|
||||
print "</table>";
|
||||
@ -428,10 +428,10 @@ if (! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read))
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "s.dateep", "", $param, 'width="140px"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "s.label", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "s.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "s.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "s.rowid", "", $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "s.datep", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "s.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "s.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
while ($i < $num)
|
||||
@ -446,7 +446,7 @@ if (! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read))
|
||||
|
||||
print "<td>".$obj->label."</td>\n";
|
||||
|
||||
print '<td align="right">'.($obj->salary?price($obj->salary):'')."</td>";
|
||||
print '<td class="right">'.($obj->salary?price($obj->salary):'')."</td>";
|
||||
|
||||
// Ref payment
|
||||
$sal_static->id=$obj->rowid;
|
||||
@ -454,16 +454,16 @@ if (! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read))
|
||||
print '<td class="left">'.$sal_static->getNomUrl(1)."</td>\n";
|
||||
|
||||
print '<td align="center">'.dol_print_date($db->jdate($obj->datep), 'day')."</td>\n";
|
||||
print '<td align="right">'.price($obj->amount)."</td>";
|
||||
print '<td class="right">'.price($obj->amount)."</td>";
|
||||
print "</tr>\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").'</td>';
|
||||
print '<td align="right"></td>'; // A total here has no sense
|
||||
print '<td class="right"></td>'; // A total here has no sense
|
||||
print '<td align="center"> </td>';
|
||||
print '<td align="center"> </td>';
|
||||
print '<td align="right">'.price($total)."</td>";
|
||||
print '<td class="right">'.price($total)."</td>";
|
||||
print "</tr>";
|
||||
|
||||
print "</table>";
|
||||
|
||||
@ -257,10 +257,10 @@ while($i < 12)
|
||||
{
|
||||
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
||||
if ($j > 12) $j -= 12;
|
||||
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '</td>';
|
||||
print '<td width="60" class="right">' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '</td>';
|
||||
$i++;
|
||||
}
|
||||
print '<td width="60" align="right"><b>' . $langs->trans("TotalHT") . '</b></td></tr>';
|
||||
print '<td width="60" class="right"><b>' . $langs->trans("TotalHT") . '</b></td></tr>';
|
||||
|
||||
$sql = "SELECT fd.tva_tx AS vatrate,";
|
||||
$sql .= " fd.product_type AS product_type,";
|
||||
@ -301,10 +301,10 @@ if ($resql) {
|
||||
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
||||
if ($j > 12) $j -= 12;
|
||||
$monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT);
|
||||
print '<td align="right" width="6%">' . price($obj->$monthj) . '</td>';
|
||||
print '<td class="right" width="6%">' . price($obj->$monthj) . '</td>';
|
||||
$totalpermonth[$j]=(empty($totalpermonth[$j])?0:$totalpermonth[$j])+$obj->$monthj;
|
||||
}
|
||||
print '<td align="right" width="6%"><b>' . price($obj->total) . '</b></td>';
|
||||
print '<td class="right" width="6%"><b>' . price($obj->total) . '</b></td>';
|
||||
$totalpermonth['total']=(empty($totalpermonth['total'])?0:$totalpermonth['total'])+$obj->total;
|
||||
print '</tr>';
|
||||
}
|
||||
@ -318,9 +318,9 @@ if ($resql) {
|
||||
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
||||
if ($j > 12) $j -= 12;
|
||||
$monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT);
|
||||
print '<td align="right" width="6%">' . price($totalpermonth[$j]) . '</td>';
|
||||
print '<td class="right" width="6%">' . price($totalpermonth[$j]) . '</td>';
|
||||
}
|
||||
print '<td align="right" width="6%"><b>' . price($totalpermonth['total']) . '</b></td>';
|
||||
print '<td class="right" width="6%"><b>' . price($totalpermonth['total']) . '</b></td>';
|
||||
print '</tr>';
|
||||
} else {
|
||||
print $db->lasterror(); // Show last sql error
|
||||
@ -335,10 +335,10 @@ while($i < 12)
|
||||
{
|
||||
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
||||
if ($j > 12) $j -= 12;
|
||||
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '</td>';
|
||||
print '<td width="60" class="right">' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '</td>';
|
||||
$i++;
|
||||
}
|
||||
print '<td width="60" align="right"><b>' . $langs->trans("TotalHT") . '</b></td></tr>';
|
||||
print '<td width="60" class="right"><b>' . $langs->trans("TotalHT") . '</b></td></tr>';
|
||||
|
||||
$sql2 = "SELECT ffd.tva_tx AS vatrate,";
|
||||
$sql2 .= " ffd.product_type AS product_type,";
|
||||
@ -380,10 +380,10 @@ if ($resql2) {
|
||||
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
||||
if ($j > 12) $j -= 12;
|
||||
$monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT);
|
||||
print '<td align="right" width="6%">' . price($obj->$monthj) . '</td>';
|
||||
print '<td class="right" width="6%">' . price($obj->$monthj) . '</td>';
|
||||
$totalpermonth[$j]=(empty($totalpermonth[$j])?0:$totalpermonth[$j])+$obj->$monthj;
|
||||
}
|
||||
print '<td align="right" width="6%"><b>' . price($obj->total) . '</b></td>';
|
||||
print '<td class="right" width="6%"><b>' . price($obj->total) . '</b></td>';
|
||||
$totalpermonth['total']=(empty($totalpermonth['total'])?0:$totalpermonth['total'])+$obj->total;
|
||||
print '</tr>';
|
||||
}
|
||||
@ -397,9 +397,9 @@ if ($resql2) {
|
||||
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
||||
if ($j > 12) $j -= 12;
|
||||
$monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT);
|
||||
print '<td align="right" width="6%">' . price($totalpermonth[$j]) . '</td>';
|
||||
print '<td class="right" width="6%">' . price($totalpermonth[$j]) . '</td>';
|
||||
}
|
||||
print '<td align="right" width="6%"><b>' . price($totalpermonth['total']) . '</b></td>';
|
||||
print '<td class="right" width="6%"><b>' . price($totalpermonth['total']) . '</b></td>';
|
||||
print '</tr>';
|
||||
} else {
|
||||
print $db->lasterror(); // Show last sql error
|
||||
|
||||
@ -315,7 +315,7 @@ if ($modecompta == 'CREANCES-DETTES')
|
||||
$form->select_type_of_lines(isset($selected_type)?$selected_type:-1, 'search_type', 1, 1, 1);
|
||||
print '</td>';
|
||||
|
||||
print '<td colspan="5" align="right">';
|
||||
print '<td colspan="5" class="right">';
|
||||
print '<input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"), 'search.png', '', '', 1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print '</td></tr>';
|
||||
|
||||
@ -337,7 +337,7 @@ print_liste_field_titre(
|
||||
"qty",
|
||||
"",
|
||||
$paramslink,
|
||||
'align="right"',
|
||||
'class="right"',
|
||||
$sortfield,
|
||||
$sortorder
|
||||
);
|
||||
@ -347,7 +347,7 @@ print_liste_field_titre(
|
||||
"qty",
|
||||
"",
|
||||
$paramslink,
|
||||
'align="right"',
|
||||
'class="right"',
|
||||
$sortfield,
|
||||
$sortorder
|
||||
);
|
||||
@ -356,8 +356,8 @@ print_liste_field_titre(
|
||||
$_SERVER["PHP_SELF"],
|
||||
"amount",
|
||||
"",
|
||||
$paramslink,
|
||||
'align="right"',
|
||||
$classslink,
|
||||
'class="right"',
|
||||
$sortfield,
|
||||
$sortorder
|
||||
);
|
||||
@ -367,7 +367,7 @@ print_liste_field_titre(
|
||||
"amount_ttc",
|
||||
"",
|
||||
$paramslink,
|
||||
'align="right"',
|
||||
'class="right"',
|
||||
$sortfield,
|
||||
$sortorder
|
||||
);
|
||||
@ -377,7 +377,7 @@ print_liste_field_titre(
|
||||
"amount_ttc",
|
||||
"",
|
||||
$paramslink,
|
||||
'align="right"',
|
||||
'class="right"',
|
||||
$sortfield,
|
||||
$sortorder
|
||||
);
|
||||
@ -400,15 +400,15 @@ print_liste_field_titre(
|
||||
print "</td>\n";
|
||||
|
||||
// Quantity
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
print $qty[$key];
|
||||
print '</td>';
|
||||
|
||||
// Percent;
|
||||
print '<td align="right">'.($qtytotal > 0 ? round(100 * $qty[$key] / $qtytotal, 2).'%' : ' ').'</td>';
|
||||
print '<td class="right">'.($qtytotal > 0 ? round(100 * $qty[$key] / $qtytotal, 2).'%' : ' ').'</td>';
|
||||
|
||||
// Amount w/o VAT
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
/*if ($key > 0) {
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?productid='.$key.'">';
|
||||
} else {
|
||||
@ -419,7 +419,7 @@ print_liste_field_titre(
|
||||
print '</td>';
|
||||
|
||||
// Amount with VAT
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
/*if ($key > 0) {
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?productid='.$key.'">';
|
||||
} else {
|
||||
@ -430,7 +430,7 @@ print_liste_field_titre(
|
||||
print '</td>';
|
||||
|
||||
// Percent;
|
||||
print '<td align="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : ' ').'</td>';
|
||||
print '<td class="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : ' ').'</td>';
|
||||
|
||||
// TODO: statistics?
|
||||
|
||||
@ -441,11 +441,11 @@ print_liste_field_titre(
|
||||
// Total
|
||||
print '<tr class="liste_total">';
|
||||
print '<td>'.$langs->trans("Total").'</td>';
|
||||
print '<td align="right">'.$qtytotal.'</td>';
|
||||
print '<td align="right">100%</td>';
|
||||
print '<td align="right">'.price($catotal_ht).'</td>';
|
||||
print '<td align="right">'.price($catotal).'</td>';
|
||||
print '<td align="right">100%</td>';
|
||||
print '<td class="right">'.$qtytotal.'</td>';
|
||||
print '<td class="right">100%</td>';
|
||||
print '<td class="right">'.price($catotal_ht).'</td>';
|
||||
print '<td class="right">'.price($catotal).'</td>';
|
||||
print '<td class="right">100%</td>';
|
||||
print '</tr>';
|
||||
|
||||
$db->free($result);
|
||||
|
||||
@ -310,7 +310,7 @@ if ($modecompta == 'CREANCES-DETTES') {
|
||||
"amount_ht",
|
||||
"",
|
||||
$paramslink,
|
||||
'align="right"',
|
||||
'class="right"',
|
||||
$sortfield,
|
||||
$sortorder
|
||||
);
|
||||
@ -323,7 +323,7 @@ print_liste_field_titre(
|
||||
"amount_ttc",
|
||||
"",
|
||||
$paramslink,
|
||||
'align="right"',
|
||||
'class="right"',
|
||||
$sortfield,
|
||||
$sortorder
|
||||
);
|
||||
@ -332,7 +332,7 @@ print_liste_field_titre(
|
||||
$_SERVER["PHP_SELF"], "amount_ttc",
|
||||
"",
|
||||
$paramslink,
|
||||
'align="right"',
|
||||
'class="right"',
|
||||
$sortfield,
|
||||
$sortorder
|
||||
);
|
||||
@ -391,7 +391,7 @@ if (count($amount)) {
|
||||
print "<td>".$linkname."</td>\n";
|
||||
|
||||
// Amount w/o VAT
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
if ($modecompta != 'CREANCES-DETTES')
|
||||
{
|
||||
if ($key > 0) {
|
||||
@ -410,7 +410,7 @@ if (count($amount)) {
|
||||
print '</td>';
|
||||
|
||||
// Amount with VAT
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
if ($modecompta != 'CREANCES-DETTES') {
|
||||
if ($key > 0) {
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/paiement/list.php?userid='.$key.'">';
|
||||
@ -428,7 +428,7 @@ if (count($amount)) {
|
||||
print '</td>';
|
||||
|
||||
// Percent
|
||||
print '<td align="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : ' ').'</td>';
|
||||
print '<td class="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : ' ').'</td>';
|
||||
|
||||
// Other stats
|
||||
print '<td align="center">';
|
||||
@ -452,9 +452,9 @@ if (count($amount)) {
|
||||
if ($modecompta != 'CREANCES-DETTES') {
|
||||
print '<td colspan="1"></td>';
|
||||
} else {
|
||||
print '<td align="right">'.price($catotal_ht).'</td>';
|
||||
print '<td class="right">'.price($catotal_ht).'</td>';
|
||||
}
|
||||
print '<td align="right">'.price($catotal).'</td>';
|
||||
print '<td class="right">'.price($catotal).'</td>';
|
||||
print '<td> </td>';
|
||||
print '<td> </td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -378,22 +378,22 @@ if ($subcat) {
|
||||
print ' checked';
|
||||
}
|
||||
print'></td>';
|
||||
print '<td colspan="7" align="right">';
|
||||
print '<td colspan="7" class="right">';
|
||||
print '<input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"), 'search.png', '', '', 1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat" size="6" type="text" name="search_societe" value="'.$search_societe.'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat" size="6" type="text" name="search_zip" value="'.$search_zip.'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat" size="6" type="text" name="search_town" value="'.$search_town.'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print $form->select_country($search_country, 'search_country');
|
||||
//print '<input class="flat" size="6" type="text" name="search_country" value="'.$search_country.'">';
|
||||
print '</td>';
|
||||
@ -448,7 +448,7 @@ if ($modecompta == 'CREANCES-DETTES') {
|
||||
"amount_ht",
|
||||
"",
|
||||
$paramslink,
|
||||
'align="right"',
|
||||
'class="right"',
|
||||
$sortfield,
|
||||
$sortorder
|
||||
);
|
||||
@ -461,7 +461,7 @@ print_liste_field_titre(
|
||||
"amount_ttc",
|
||||
"",
|
||||
$paramslink,
|
||||
'align="right"',
|
||||
'class="right"',
|
||||
$sortfield,
|
||||
$sortorder
|
||||
);
|
||||
@ -471,7 +471,7 @@ print_liste_field_titre(
|
||||
"amount_ttc",
|
||||
"",
|
||||
$paramslink,
|
||||
'align="right"',
|
||||
'class="right"',
|
||||
$sortfield,
|
||||
$sortorder
|
||||
);
|
||||
@ -567,7 +567,7 @@ if (count($amount)) {
|
||||
print '</td>';
|
||||
|
||||
// Amount w/o VAT
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
if ($modecompta != 'CREANCES-DETTES') {
|
||||
if ($key > 0) {
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/paiement/list.php?socid='.$key.'">';
|
||||
@ -585,7 +585,7 @@ if (count($amount)) {
|
||||
print '</td>';
|
||||
|
||||
// Amount with VAT
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
if ($modecompta != 'CREANCES-DETTES') {
|
||||
if ($key > 0) {
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/paiement/list.php?socid='.$key.'">';
|
||||
@ -604,7 +604,7 @@ if (count($amount)) {
|
||||
print '</td>';
|
||||
|
||||
// Percent;
|
||||
print '<td align="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : ' ').'</td>';
|
||||
print '<td class="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : ' ').'</td>';
|
||||
|
||||
// Other stats
|
||||
print '<td align="center">';
|
||||
@ -631,9 +631,9 @@ if (count($amount)) {
|
||||
if ($modecompta != 'CREANCES-DETTES') {
|
||||
print '<td colspan="1"></td>';
|
||||
} else {
|
||||
print '<td align="right">'.price($catotal_ht).'</td>';
|
||||
print '<td class="right">'.price($catotal_ht).'</td>';
|
||||
}
|
||||
print '<td align="right">'.price($catotal).'</td>';
|
||||
print '<td class="right">'.price($catotal).'</td>';
|
||||
print '<td> </td>';
|
||||
print '<td> </td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -285,9 +285,9 @@ print '</tr>';
|
||||
print '<tr class="liste_titre"><td class="liste_titre">'.$langs->trans("Month").'</td>';
|
||||
for ($annee = $year_start ; $annee <= $year_end ; $annee++)
|
||||
{
|
||||
if ($modecompta == 'CREANCES-DETTES') print '<td class="liste_titre" align="right">'.$langs->trans("AmountHT").'</td>';
|
||||
print '<td class="liste_titre" align="right">'.$langs->trans("AmountTTC").'</td>';
|
||||
print '<td class="liste_titre" align="right" class="borderrightlight">'.$langs->trans("Delta").'</td>';
|
||||
if ($modecompta == 'CREANCES-DETTES') print '<td class="liste_titre right">'.$langs->trans("AmountHT").'</td>';
|
||||
print '<td class="liste_titre right">'.$langs->trans("AmountTTC").'</td>';
|
||||
print '<td class="liste_titre right borderrightlight">'.$langs->trans("Delta").'</td>';
|
||||
if ($annee != $year_end) print '<td class="liste_titre" width="15"> </td>';
|
||||
}
|
||||
print '</tr>';
|
||||
@ -322,7 +322,7 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++)
|
||||
{
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
// Valeur CA du mois w/o VAT
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
if ($cum_ht[$case])
|
||||
{
|
||||
$now_show_delta=1; // On a trouve le premier mois de la premiere annee generant du chiffre.
|
||||
@ -337,7 +337,7 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++)
|
||||
}
|
||||
|
||||
// Valeur CA du mois
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
if ($cum[$case])
|
||||
{
|
||||
$now_show_delta=1; // On a trouve le premier mois de la premiere annee generant du chiffre.
|
||||
@ -359,29 +359,29 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++)
|
||||
{
|
||||
$percent=(round(($cum[$case]-$cum[$caseprev])/$cum[$caseprev], 4)*100);
|
||||
//print "X $cum[$case] - $cum[$caseprev] - $cum[$caseprev] - $percent X";
|
||||
print '<td align="right" class="borderrightlight">'.($percent>=0?"+$percent":"$percent").'%</td>';
|
||||
print '<td class="borderrightlight right">'.($percent>=0?"+$percent":"$percent").'%</td>';
|
||||
}
|
||||
if ($cum[$caseprev] && ! $cum[$case])
|
||||
{
|
||||
print '<td align="right" class="borderrightlight">-100%</td>';
|
||||
print '<td class="borderrightlight right">-100%</td>';
|
||||
}
|
||||
if (! $cum[$caseprev] && $cum[$case])
|
||||
{
|
||||
//print '<td align="right">+Inf%</td>';
|
||||
print '<td align="right" class="borderrightlight">-</td>';
|
||||
//print '<td class="right">+Inf%</td>';
|
||||
print '<td class="borderrightlight right">-</td>';
|
||||
}
|
||||
if (isset($cum[$caseprev]) && ! $cum[$caseprev] && ! $cum[$case])
|
||||
{
|
||||
print '<td align="right" class="borderrightlight">+0%</td>';
|
||||
print '<td class="borderrightlight right">+0%</td>';
|
||||
}
|
||||
if (! isset($cum[$caseprev]) && ! $cum[$case])
|
||||
{
|
||||
print '<td align="right" class="borderrightlight">-</td>';
|
||||
print '<td class="borderrightlight right">-</td>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="right" class="borderrightlight">';
|
||||
print '<td class="borderrightlight right">';
|
||||
if ($minyearmonth <= $case && $case <= $maxyearmonth) { print '-'; }
|
||||
else { print ' '; }
|
||||
print '</td>';
|
||||
@ -410,7 +410,7 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++)
|
||||
$caseprev = dol_print_date(dol_mktime(1,1,1,$mois,1,$annee-1),"%Y-%m");
|
||||
|
||||
// Valeur CA du mois
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
if ($cum[$case])
|
||||
{
|
||||
$now_show_delta=1; // On a trouve le premier mois de la premiere annee generant du chiffre.
|
||||
@ -429,25 +429,25 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++)
|
||||
{
|
||||
$percent=(round(($cum[$case]-$cum[$caseprev])/$cum[$caseprev],4)*100);
|
||||
//print "X $cum[$case] - $cum[$caseprev] - $cum[$caseprev] - $percent X";
|
||||
print '<td align="right">'.($percent>=0?"+$percent":"$percent").'%</td>';
|
||||
print '<td class="right">'.($percent>=0?"+$percent":"$percent").'%</td>';
|
||||
|
||||
}
|
||||
if ($cum[$caseprev] && ! $cum[$case])
|
||||
{
|
||||
print '<td align="right">-100%</td>';
|
||||
print '<td class="right">-100%</td>';
|
||||
}
|
||||
if (! $cum[$caseprev] && $cum[$case])
|
||||
{
|
||||
print '<td align="right">+Inf%</td>';
|
||||
print '<td class="right">+Inf%</td>';
|
||||
}
|
||||
if (! $cum[$caseprev] && ! $cum[$case])
|
||||
{
|
||||
print '<td align="right">+0%</td>';
|
||||
print '<td class="right">+0%</td>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
if ($minyearmonth <= $case && $case <= $maxyearmonth) { print '-'; }
|
||||
else { print ' '; }
|
||||
print '</td>';
|
||||
@ -469,7 +469,7 @@ for ($annee = $year_start ; $annee <= $year_end ; $annee++)
|
||||
// Montant total HT
|
||||
if ($total_ht[$annee] || ($annee >= $minyear && $annee <= max($nowyear, $maxyear)))
|
||||
{
|
||||
print '<td align="right" class="nowrap">'.($total_ht[$annee]?price($total_ht[$annee]):"0")."</td>";
|
||||
print '<td class="nowrap right">'.($total_ht[$annee]?price($total_ht[$annee]):"0")."</td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -480,7 +480,7 @@ for ($annee = $year_start ; $annee <= $year_end ; $annee++)
|
||||
// Montant total
|
||||
if ($total[$annee] || ($annee >= $minyear && $annee <= max($nowyear, $maxyear)))
|
||||
{
|
||||
print '<td align="right" class="nowrap">'.($total[$annee]?price($total[$annee]):"0")."</td>";
|
||||
print '<td class="nowrap right">'.($total[$annee]?price($total[$annee]):"0")."</td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -492,24 +492,24 @@ for ($annee = $year_start ; $annee <= $year_end ; $annee++)
|
||||
{
|
||||
if ($total[$annee-1] && $total[$annee]) {
|
||||
$percent=(round(($total[$annee]-$total[$annee-1])/$total[$annee-1], 4)*100);
|
||||
print '<td align="right" class="nowrap borderrightlight">'.($percent>=0?"+$percent":"$percent").'%</td>';
|
||||
print '<td class="nowrap borderrightlight right">'.($percent>=0?"+$percent":"$percent").'%</td>';
|
||||
}
|
||||
if ($total[$annee-1] && ! $total[$annee])
|
||||
{
|
||||
print '<td align="right" class="borderrightlight">-100%</td>';
|
||||
print '<td class="borderrightlight right">-100%</td>';
|
||||
}
|
||||
if (! $total[$annee-1] && $total[$annee])
|
||||
{
|
||||
print '<td align="right" class="borderrightlight">+'.$langs->trans('Inf').'%</td>';
|
||||
print '<td class="borderrightlight right">+'.$langs->trans('Inf').'%</td>';
|
||||
}
|
||||
if (! $total[$annee-1] && ! $total[$annee])
|
||||
{
|
||||
print '<td align="right" class="borderrightlight">+0%</td>';
|
||||
print '<td class="borderrightlight right">+0%</td>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="right" class="borderrightlight">';
|
||||
print '<td class="borderrightlight right">';
|
||||
if ($total[$annee] || ($minyear <= $annee && $annee <= max($nowyear, $maxyear))) { print '-'; }
|
||||
else { print ' '; }
|
||||
print '</td>';
|
||||
@ -567,7 +567,7 @@ print '</div>';
|
||||
$i++;
|
||||
}
|
||||
|
||||
print "<tr class="oddeven"><td align=\"right\" colspan=\"5\"><i>Facture a encaisser : </i></td><td align=\"right\"><i>".price($total_ttc_Rac)."</i></td><td colspan=\"5\"><-- bug ici car n'exclut pas le deja r?gl? des factures partiellement r?gl?es</td></tr>";
|
||||
print "<tr class="oddeven"><td class=\"right\" colspan=\"5\"><i>Facture a encaisser : </i></td><td class=\"right\"><i>".price($total_ttc_Rac)."</i></td><td colspan=\"5\"><-- bug ici car n'exclut pas le deja r?gl? des factures partiellement r?gl?es</td></tr>";
|
||||
}
|
||||
$db->free($resql);
|
||||
}
|
||||
@ -616,7 +616,7 @@ print '</div>';
|
||||
$i++;
|
||||
}
|
||||
|
||||
print "<tr class="oddeven"><td align=\"right\" colspan=\"5\"><i>Signe et non facture:</i></td><td align=\"right\"><i>".price($total_pr)."</i></td><td colspan=\"5\"><-- bug ici, ca devrait exclure le deja facture</td></tr>";
|
||||
print "<tr class="oddeven"><td class=\"right\" colspan=\"5\"><i>Signe et non facture:</i></td><td class=\"right\"><i>".price($total_pr)."</i></td><td colspan=\"5\"><-- bug ici, ca devrait exclure le deja facture</td></tr>";
|
||||
}
|
||||
$db->free($resql);
|
||||
}
|
||||
@ -624,7 +624,7 @@ print '</div>';
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
print "<tr class="oddeven"><td align=\"right\" colspan=\"5\"><i>Total CA previsionnel : </i></td><td align=\"right\"><i>".price($total_CA)."</i></td><td colspan=\"3\"><-- bug ici car bug sur les 2 precedents</td></tr>";
|
||||
print "<tr class="oddeven"><td class=\"right\" colspan=\"5\"><i>Total CA previsionnel : </i></td><td class=\"right\"><i>".price($total_CA)."</i></td><td colspan=\"3\"><-- bug ici car bug sur les 2 precedents</td></tr>";
|
||||
}
|
||||
print "</table>";
|
||||
|
||||
|
||||
@ -351,15 +351,15 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
||||
print '<td class="left">'.$langs->trans("DateInvoice").'</td>';
|
||||
if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment' || $conf->global->TAX_MODE_SELL_SERVICE == 'payment') print '<td class="left">'.$langs->trans("DatePayment").'</td>';
|
||||
else print '<td></td>';
|
||||
print '<td align="right">'.$namerate.'</td>';
|
||||
print '<td class="right">'.$namerate.'</td>';
|
||||
print '<td class="left">'.$productcust.'</td>';
|
||||
if ($modetax != 1)
|
||||
{
|
||||
print '<td align="right">'.$amountcust.'</td>';
|
||||
print '<td align="right">'.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')</td>';
|
||||
print '<td class="right">'.$amountcust.'</td>';
|
||||
print '<td class="right">'.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')</td>';
|
||||
}
|
||||
print '<td align="right">'.$langs->trans("AmountHTVATRealReceived").'</td>';
|
||||
print '<td align="right">'.$vatcust.'</td>';
|
||||
print '<td class="right">'.$langs->trans("AmountHTVATRealReceived").'</td>';
|
||||
print '<td class="right">'.$vatcust.'</td>';
|
||||
print '</tr>';
|
||||
|
||||
$action = "tvadetail";
|
||||
@ -414,7 +414,7 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Ref
|
||||
print '<td class="nowrap" align="left">'.$fields['link'].'</td>';
|
||||
print '<td class="nowrap left">'.$fields['link'].'</td>';
|
||||
|
||||
// Invoice date
|
||||
print '<td class="left">' . dol_print_date($fields['datef'], 'day') . '</td>';
|
||||
@ -424,7 +424,7 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
||||
else print '<td></td>';
|
||||
|
||||
// Rate
|
||||
print '<td align="right">' . $fields['drate'] . '</td>';
|
||||
print '<td class="right">' . $fields['drate'] . '</td>';
|
||||
|
||||
// Description
|
||||
print '<td class="left">';
|
||||
@ -464,7 +464,7 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
||||
// Total HT
|
||||
if ($modetax != 1)
|
||||
{
|
||||
print '<td class="nowrap" align="right">';
|
||||
print '<td class="nowrap right">';
|
||||
print price($fields['totalht']);
|
||||
if (price2num($fields['ftotal_ttc']))
|
||||
{
|
||||
@ -479,7 +479,7 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
||||
$ratiopaymentinvoice=1;
|
||||
if ($modetax != 1)
|
||||
{
|
||||
print '<td class="nowrap" align="right">';
|
||||
print '<td class="nowrap right">';
|
||||
//print $fields['totalht']."-".$fields['payment_amount']."-".$fields['ftotal_ttc'];
|
||||
if ($fields['payment_amount'] && $fields['ftotal_ttc'])
|
||||
{
|
||||
@ -503,13 +503,13 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
||||
}
|
||||
|
||||
// Total collected
|
||||
print '<td class="nowrap" align="right">';
|
||||
print '<td class="nowrap right">';
|
||||
$temp_ht=$fields['totalht']*$ratiopaymentinvoice;
|
||||
print price(price2num($temp_ht, 'MT'), 1);
|
||||
print '</td>';
|
||||
|
||||
// VAT
|
||||
print '<td class="nowrap" align="right">';
|
||||
print '<td class="nowrap right">';
|
||||
$temp_vat=$fields['vat']*$ratiopaymentinvoice;
|
||||
print price(price2num($temp_vat, 'MT'), 1);
|
||||
//print price($fields['vat']);
|
||||
@ -524,13 +524,13 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
||||
// Total customers for this vat rate
|
||||
print '<tr class="liste_total">';
|
||||
print '<td colspan="4"></td>';
|
||||
print '<td align="right">'.$langs->trans("Total").':</td>';
|
||||
print '<td class="right">'.$langs->trans("Total").':</td>';
|
||||
if ($modetax != 1) {
|
||||
print '<td class="nowrap" align="right"> </td>';
|
||||
print '<td align="right"> </td>';
|
||||
print '<td class="nowrap right"> </td>';
|
||||
print '<td class="right"> </td>';
|
||||
}
|
||||
print '<td align="right">'.price(price2num($subtot_coll_total_ht, 'MT')).'</td>';
|
||||
print '<td class="nowrap" align="right">'.price(price2num($subtot_coll_vat, 'MT')).'</td>';
|
||||
print '<td class="right">'.price(price2num($subtot_coll_total_ht, 'MT')).'</td>';
|
||||
print '<td class="nowrap right">'.price(price2num($subtot_coll_vat, 'MT')).'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@ -538,13 +538,13 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
||||
{
|
||||
print '<tr class="liste_total">';
|
||||
print '<td colspan="4"></td>';
|
||||
print '<td align="right">'.$langs->trans("Total").':</td>';
|
||||
print '<td class="right">'.$langs->trans("Total").':</td>';
|
||||
if ($modetax != 1) {
|
||||
print '<td class="nowrap" align="right"> </td>';
|
||||
print '<td align="right"> </td>';
|
||||
print '<td class="nowrap right"> </td>';
|
||||
print '<td class="right"> </td>';
|
||||
}
|
||||
print '<td align="right">'.price(price2num(0, 'MT')).'</td>';
|
||||
print '<td class="nowrap" align="right">'.price(price2num(0, 'MT')).'</td>';
|
||||
print '<td class="right">'.price(price2num(0, 'MT')).'</td>';
|
||||
print '<td class="nowrap right">'.price(price2num(0, 'MT')).'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@ -560,11 +560,11 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
||||
print '<td class="left">'.$namesup.'</td>';
|
||||
print '<td class="left">'.$productsup.'</td>';
|
||||
if ($modetax != 1) {
|
||||
print '<td align="right">'.$amountsup.'</td>';
|
||||
print '<td align="right">'.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')</td>';
|
||||
print '<td class="right">'.$amountsup.'</td>';
|
||||
print '<td class="right">'.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')</td>';
|
||||
}
|
||||
print '<td align="right">'.$langs->trans("AmountHTVATRealPaid").'</td>';
|
||||
print '<td align="right">'.$vatsup.'</td>';
|
||||
print '<td class="right">'.$langs->trans("AmountHTVATRealPaid").'</td>';
|
||||
print '<td class="right">'.$vatsup.'</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
foreach (array_keys($x_paye) as $thirdparty_id)
|
||||
@ -607,7 +607,7 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Ref
|
||||
print '<td class="nowrap" align="left">'.$fields['link'].'</td>';
|
||||
print '<td class="nowrap left">'.$fields['link'].'</td>';
|
||||
|
||||
// Invoice date
|
||||
print '<td class="left">' . dol_print_date($fields['datef'], 'day') . '</td>';
|
||||
@ -657,7 +657,7 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
||||
// Total HT
|
||||
if ($modetax != 1)
|
||||
{
|
||||
print '<td class="nowrap" align="right">';
|
||||
print '<td class="nowrap right">';
|
||||
print price($fields['totalht']);
|
||||
if (price2num($fields['ftotal_ttc']))
|
||||
{
|
||||
@ -672,7 +672,7 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
||||
$ratiopaymentinvoice=1;
|
||||
if ($modetax != 1)
|
||||
{
|
||||
print '<td class="nowrap" align="right">';
|
||||
print '<td class="nowrap right">';
|
||||
if ($fields['payment_amount'] && $fields['ftotal_ttc'])
|
||||
{
|
||||
$paymentfourn_static->id=$fields['payment_id'];
|
||||
@ -698,13 +698,13 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
||||
}
|
||||
|
||||
// VAT paid
|
||||
print '<td class="nowrap" align="right">';
|
||||
print '<td class="nowrap right">';
|
||||
$temp_ht=$fields['totalht']*$ratiopaymentinvoice;
|
||||
print price(price2num($temp_ht, 'MT'), 1);
|
||||
print '</td>';
|
||||
|
||||
// VAT
|
||||
print '<td class="nowrap" align="right">';
|
||||
print '<td class="nowrap right">';
|
||||
$temp_vat=$fields['vat']*$ratiopaymentinvoice;
|
||||
print price(price2num($temp_vat, 'MT'), 1);
|
||||
//print price($fields['vat']);
|
||||
@ -719,26 +719,26 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
||||
// Total suppliers for this vat rate
|
||||
print '<tr class="liste_total">';
|
||||
print '<td colspan="4"></td>';
|
||||
print '<td align="right">'.$langs->trans("Total").':</td>';
|
||||
print '<td class="right">'.$langs->trans("Total").':</td>';
|
||||
if ($modetax != 1) {
|
||||
print '<td class="nowrap" align="right"> </td>';
|
||||
print '<td align="right"> </td>';
|
||||
print '<td class="nowrap right"> </td>';
|
||||
print '<td class="right"> </td>';
|
||||
}
|
||||
print '<td align="right">'.price(price2num($subtot_paye_total_ht, 'MT')).'</td>';
|
||||
print '<td class="nowrap" align="right">'.price(price2num($subtot_paye_vat, 'MT')).'</td>';
|
||||
print '<td class="right">'.price(price2num($subtot_paye_total_ht, 'MT')).'</td>';
|
||||
print '<td class="nowrap right">'.price(price2num($subtot_paye_vat, 'MT')).'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
if (count($x_paye) == 0) { // Show a total line if nothing shown
|
||||
print '<tr class="liste_total">';
|
||||
print '<td colspan="4"></td>';
|
||||
print '<td align="right">'.$langs->trans("Total").':</td>';
|
||||
print '<td class="right">'.$langs->trans("Total").':</td>';
|
||||
if ($modetax != 1) {
|
||||
print '<td class="nowrap" align="right"> </td>';
|
||||
print '<td align="right"> </td>';
|
||||
print '<td class="nowrap right"> </td>';
|
||||
print '<td class="right"> </td>';
|
||||
}
|
||||
print '<td align="right">'.price(price2num(0, 'MT')).'</td>';
|
||||
print '<td class="nowrap" align="right">'.price(price2num(0, 'MT')).'</td>';
|
||||
print '<td class="right">'.price(price2num(0, 'MT')).'</td>';
|
||||
print '<td class="nowrap right">'.price(price2num(0, 'MT')).'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@ -750,7 +750,7 @@ if (! is_array($x_coll) || ! is_array($x_paye))
|
||||
$diff = $x_coll_sum - $x_paye_sum;
|
||||
print '<tr class="liste_total">';
|
||||
print '<td class="liste_total" colspan="'.$span.'">'.$langs->trans("TotalToPay").($q?', '.$langs->trans("Quadri").' '.$q:'').'</td>';
|
||||
print '<td class="liste_total nowrap" align="right"><b>'.price(price2num($diff, 'MT'))."</b></td>\n";
|
||||
print '<td class="liste_total nowrap right"><b>'.price(price2num($diff, 'MT'))."</b></td>\n";
|
||||
print "</tr>\n";
|
||||
|
||||
$i++;
|
||||
|
||||
@ -488,7 +488,8 @@ if ($sql_select)
|
||||
$description=(! empty($conf->global->PRODUIT_DESC_IN_FORM)?'':dol_htmlentitiesbr($objp->description));
|
||||
}
|
||||
|
||||
if (($objp->info_bits & 2) == 2) {
|
||||
if (($objp->info_bits & 2) == 2)
|
||||
{
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$object->id.'">';
|
||||
$txt='';
|
||||
print img_object($langs->trans("ShowReduc"), 'reduc').' ';
|
||||
|
||||
@ -488,10 +488,10 @@ abstract class CommonDocGenerator
|
||||
if (empty($resarray[$array_key.'_total_vat_'.$vatformated])) $resarray[$array_key.'_total_vat_'.$vatformated]=0;
|
||||
$resarray[$array_key.'_total_vat_'.$vatformated]+=$line->total_tva;
|
||||
$resarray[$array_key.'_total_vat_locale_'.$vatformated]=price($resarray[$array_key.'_total_vat_'.$vatformated]);
|
||||
|
||||
|
||||
$totalUp += $line->subprice * $line->qty;
|
||||
}
|
||||
|
||||
|
||||
// @GS: Calculate total up and total discount percentage
|
||||
// Note that this added fields correspond to nothing in Dolibarr (Dolibarr manage discount on lines not globally)
|
||||
$resarray['object_total_up'] = $totalUp;
|
||||
@ -501,7 +501,7 @@ abstract class CommonDocGenerator
|
||||
$resarray['object_total_discount_locale'] = price($resarray['object_total_discount'], 0, $outputlangs);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Retrieve extrafields
|
||||
if (is_array($object->array_options) && count($object->array_options))
|
||||
{
|
||||
@ -514,7 +514,7 @@ abstract class CommonDocGenerator
|
||||
|
||||
$resarray = $this->fill_substitutionarray_with_extrafields($object, $resarray, $extrafields, $array_key, $outputlangs);
|
||||
}
|
||||
|
||||
|
||||
return $resarray;
|
||||
}
|
||||
|
||||
@ -585,7 +585,7 @@ abstract class CommonDocGenerator
|
||||
$extralabels = $extrafields->fetch_name_optionals_label($extrafieldkey, true);
|
||||
$line->fetch_optionals();
|
||||
|
||||
$resarray = $this->fill_substitutionarray_with_extrafields($line, $resarray, $extrafields, $array_key=$array_key, $outputlangs);
|
||||
$resarray = $this->fill_substitutionarray_with_extrafields($line, $resarray, $extrafields, $array_key, $outputlangs);
|
||||
|
||||
// Load product data optional fields to the line -> enables to use "line_options_{extrafield}"
|
||||
if (isset($line->fk_product) && $line->fk_product > 0)
|
||||
|
||||
@ -622,7 +622,7 @@ function dol_include_once($relpath, $classname = '')
|
||||
$fullpath = dol_buildpath($relpath);
|
||||
|
||||
if (!file_exists($fullpath)) {
|
||||
dol_syslog('functions::dol_include_once Tried to load unexisting file: '.$relpath, LOG_ERR);
|
||||
dol_syslog('functions::dol_include_once Tried to load unexisting file: '.$relpath, LOG_WARNING);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -115,7 +115,7 @@ function tree_showpad(&$fulltree, $key, $silent = 0)
|
||||
*/
|
||||
function tree_recur($tab, $pere, $rang, $iddivjstree = 'iddivjstree', $donoresetalreadyloaded = 0, $showfk = 0)
|
||||
{
|
||||
global $tree_recur_alreadyadded;
|
||||
global $tree_recur_alreadyadded, $menu_handler_to_search;
|
||||
|
||||
if ($rang == 0 && empty($donoresetalreadyloaded)) $tree_recur_alreadyadded=array();
|
||||
|
||||
@ -203,7 +203,7 @@ function tree_recur($tab, $pere, $rang, $iddivjstree = 'iddivjstree', $donoreset
|
||||
if ($showfk)
|
||||
{
|
||||
print '<table class="nobordernopadding centpercent"><tr><td>';
|
||||
print '<strong> <a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=edit&menuId='.$menu['rowid'].'">';
|
||||
print '<strong> <a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=edit&menuId='.$tab[$x]['rowid'].'">';
|
||||
print $tab[$x]['title'];
|
||||
print '</a></strong>';
|
||||
print ' (mainmenu='.$tab[$x]['mainmenu'].' leftmenu='.$tab[$x]['leftmenu'].' - fk_mainmenu='.$tab[$x]['fk_mainmenu'].' fk_leftmenu='.$tab[$x]['fk_leftmenu'].')';
|
||||
|
||||
@ -109,7 +109,7 @@ abstract class ModeleNumRefFicheinter
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests if the numbers already in force in the database do not cause conflicts
|
||||
* Tests if the numbers already in force in the database do not cause conflicts
|
||||
* that would prevent this numbering from working.
|
||||
*
|
||||
* @return boolean false si conflit, true si ok
|
||||
|
||||
@ -92,6 +92,11 @@ class Don extends CommonObject
|
||||
public $labelstatut;
|
||||
public $labelstatutshort;
|
||||
|
||||
/**
|
||||
* Draft
|
||||
*/
|
||||
const STATUS_DRAFT = 0;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
||||
@ -274,4 +274,5 @@ INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (24
|
||||
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (244,'ME','MNE','Monténégro',1,0);
|
||||
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (245,'BL','BLM','Saint-Barthélemy',1,0);
|
||||
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (246,'MF','MAF','Saint-Martin',1,0);
|
||||
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (247,'XK','XKX','Kosovo',1,0);
|
||||
|
||||
|
||||
@ -262,6 +262,11 @@ CREATE TABLE llx_pos_cash_fence(
|
||||
-- VMYSQL4.3 ALTER TABLE llx_accounting_account MODIFY COLUMN account_number varchar(32) NOT NULL;
|
||||
-- VPGSQL8.2 ALTER TABLE llx_accounting_account ALTER COLUMN account_number SET NOT NULL;
|
||||
|
||||
|
||||
-- Withdrawals / Prelevements
|
||||
UPDATE llx_const set name = 'PRELEVEMENT_END_TO_END' where name = 'END_TO_END';
|
||||
UPDATE llx_const set name = 'PRELEVEMENT_USTRD' where name = 'USTRD';
|
||||
|
||||
|
||||
ALTER TABLE llx_accounting_account DROP INDEX uk_accounting_account;
|
||||
ALTER TABLE llx_accounting_account ADD UNIQUE INDEX uk_accounting_account (account_number, entity, fk_pcg_version);
|
||||
|
||||
@ -62,3 +62,4 @@ CreateCustomerOnStripe=Create customer on Stripe
|
||||
CreateCardOnStripe=Create card on Stripe
|
||||
ShowInStripe=Show in Stripe
|
||||
StripeUserAccountForActions=User account to use for email notification of some Stripe events (Stripe payouts)
|
||||
StripePayoutList=List of Stripe payouts
|
||||
@ -2137,6 +2137,5 @@ if (! function_exists("llxFooter"))
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -54,12 +54,12 @@ if (! $sortfield)
|
||||
|
||||
$startdate=$enddate='';
|
||||
|
||||
$startdateday = GETPOST('startdateday','int');
|
||||
$startdatemonth = GETPOST('startdatemonth','int');
|
||||
$startdateyear = GETPOST('startdateyear','int');
|
||||
$enddateday = GETPOST('enddateday','int');
|
||||
$enddatemonth = GETPOST('enddatemonth','int');
|
||||
$enddateyear = GETPOST('enddateyear','int');
|
||||
$startdateday = GETPOST('startdateday', 'int');
|
||||
$startdatemonth = GETPOST('startdatemonth', 'int');
|
||||
$startdateyear = GETPOST('startdateyear', 'int');
|
||||
$enddateday = GETPOST('enddateday', 'int');
|
||||
$enddatemonth = GETPOST('enddatemonth', 'int');
|
||||
$enddateyear = GETPOST('enddateyear', 'int');
|
||||
|
||||
if (!empty($startdatemonth))
|
||||
$startdate = dol_mktime(0, 0, 0, $startdatemonth, $startdateday, $startdateyear);
|
||||
@ -171,7 +171,7 @@ if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPr
|
||||
//if ($agentid > 0) $sql.= " GROUP BY s.rowid, s.nom, s.code_client, s.client, u.rowid, u.login, u.lastname, u.firstname";
|
||||
//else $sql.= " GROUP BY u.rowid, u.login, u.lastname, u.firstname";
|
||||
$sql.= " GROUP BY s.rowid, s.nom, s.code_client, s.client, u.rowid, u.login, u.lastname, u.firstname";
|
||||
$sql.=$db->order($sortfield,$sortorder);
|
||||
$sql.=$db->order($sortfield, $sortorder);
|
||||
// TODO: calculate total to display then restore pagination
|
||||
//$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
||||
|
||||
@ -208,25 +208,23 @@ if ($result)
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
if ($agentid > 0)
|
||||
print_liste_field_titre("Customer",$_SERVER["PHP_SELF"],"s.nom","",$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre("Customer", $_SERVER["PHP_SELF"], "s.nom", "", $param, '', $sortfield, $sortorder);
|
||||
else
|
||||
print_liste_field_titre("SalesRepresentative",$_SERVER["PHP_SELF"],"u.lastname","",$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre("SalesRepresentative", $_SERVER["PHP_SELF"], "u.lastname", "", $param, '', $sortfield, $sortorder);
|
||||
|
||||
print_liste_field_titre("SellingPrice",$_SERVER["PHP_SELF"],"selling_price","",$param,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($labelcostprice,$_SERVER["PHP_SELF"],"buying_price","",$param,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre("Margin",$_SERVER["PHP_SELF"],"marge","",$param,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre("SellingPrice", $_SERVER["PHP_SELF"], "selling_price", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($labelcostprice, $_SERVER["PHP_SELF"], "buying_price", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Margin", $_SERVER["PHP_SELF"], "marge", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
|
||||
print_liste_field_titre("MarginRate",$_SERVER["PHP_SELF"],"","",$param,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre("MarginRate", $_SERVER["PHP_SELF"], "", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
if (! empty($conf->global->DISPLAY_MARK_RATES))
|
||||
print_liste_field_titre("MarkRate",$_SERVER["PHP_SELF"],"","",$param,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre("MarkRate", $_SERVER["PHP_SELF"], "", "", $param, 'align="right"', $sortfield, $sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
$rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT, $conf->global->MAIN_MAX_DECIMALS_TOT);
|
||||
|
||||
if ($num > 0)
|
||||
{
|
||||
$var=true;
|
||||
|
||||
$group_list = array();
|
||||
while ($objp = $db->fetch_object($result)) {
|
||||
if ($agentid > 0) {
|
||||
@ -241,11 +239,11 @@ if ($result)
|
||||
$companystatic->id = $objp->socid;
|
||||
$companystatic->name = $objp->name;
|
||||
$companystatic->client = $objp->client;
|
||||
$group_htmlname = $companystatic->getNomUrl(1,'customer');
|
||||
$group_htmlname = $companystatic->getNomUrl(1, 'customer');
|
||||
} else {
|
||||
$group_name = $objp->lastname;
|
||||
$userstatic->fetch($objp->agent);
|
||||
$group_htmlname = $userstatic->getFullName($langs,0,0,0);
|
||||
$group_htmlname = $userstatic->getFullName($langs, 0, 0, 0);
|
||||
}
|
||||
$group_list[$group_id] = array('name' => $group_name, 'htmlname' => $group_htmlname, 'selling_price' => 0, 'buying_price' => 0, 'marge' => 0);
|
||||
}
|
||||
|
||||
1199
htdocs/product/stock/movement_card.php
Normal file
1199
htdocs/product/stock/movement_card.php
Normal file
File diff suppressed because it is too large
Load Diff
@ -1045,8 +1045,8 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
|
||||
$contactsofproject=$projectstatic->getListContactId('internal');
|
||||
if (count($contactsofproject)>0)
|
||||
{
|
||||
if (in_array($user->id, $userid=$contactsofproject)) $userid = $user->id;
|
||||
else $userid=$contactsofproject[0];
|
||||
if (in_array($user->id, $contactsofproject)) $userid = $user->id;
|
||||
else $userid = $contactsofproject[0];
|
||||
if ($projectstatic->public) $contactsofproject = array();
|
||||
print $form->select_dolusers((GETPOST('userid')?GETPOST('userid'):$userid), 'userid', 0, '', 0, '', $contactsofproject, 0, 0, 0, '', 0, $langs->trans("ResourceNotAssignedToProject"), 'maxwidth200');
|
||||
}
|
||||
|
||||
@ -85,7 +85,7 @@ class FormResource
|
||||
|
||||
$resourcestat = new Dolresource($this->db);
|
||||
|
||||
$resources_used = $resourcestat->fetch_all('ASC', 't.rowid', $limit, $offset, $filter='');
|
||||
$resources_used = $resourcestat->fetch_all('ASC', 't.rowid', $limit, $offset, $filter);
|
||||
|
||||
if ($outputmode != 2)
|
||||
{
|
||||
|
||||
@ -1104,8 +1104,7 @@ if ($action == 'create' || $action == 'adduserldap')
|
||||
{
|
||||
print '<tr><td>' . $form->editfieldkey('Categories', 'usercats', '', $object, 0) . '</td><td colspan="3">';
|
||||
$cate_arbo = $form->select_all_categories('user', null, 'parent', null, null, 1);
|
||||
print $form->multiselectarray('usercats', $cate_arbo, GETPOST('usercats', 'array'), null, null, null,
|
||||
null, '90%' );
|
||||
print $form->multiselectarray('usercats', $cate_arbo, GETPOST('usercats', 'array'), null, null, null, null, '90%');
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
|
||||
@ -190,6 +190,8 @@ function getCategory($authentication, $id)
|
||||
{
|
||||
global $db,$conf,$langs;
|
||||
|
||||
$nbmax = 10;
|
||||
|
||||
dol_syslog("Function: getCategory login=".$authentication['login']." id=".$id);
|
||||
|
||||
if ($authentication['entity']) $conf->entity=$authentication['entity'];
|
||||
@ -228,7 +230,7 @@ function getCategory($authentication, $id)
|
||||
//'visible'=>$categorie->visible,
|
||||
'type' => $categorie->type,
|
||||
'dir' => $pdir,
|
||||
'photos' => $categorie->liste_photos($dir, $nbmax=10)
|
||||
'photos' => $categorie->liste_photos($dir, $nbmax)
|
||||
);
|
||||
|
||||
$cats = $categorie->get_filles();
|
||||
@ -248,7 +250,7 @@ function getCategory($authentication, $id)
|
||||
//'visible'=>$fille->visible,
|
||||
'type'=>$fille->type,
|
||||
'dir' => $pdir,
|
||||
'photos' => $fille->liste_photos($dir, $nbmax=10)
|
||||
'photos' => $fille->liste_photos($dir, $nbmax)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -337,6 +337,8 @@ function getProductOrService($authentication, $id = '', $ref = '', $ref_ext = ''
|
||||
{
|
||||
global $db,$conf,$langs;
|
||||
|
||||
$nbmax = 10;
|
||||
|
||||
dol_syslog("Function: getProductOrService login=".$authentication['login']." id=".$id." ref=".$ref." ref_ext=".$ref_ext);
|
||||
|
||||
$langcode=($lang?$lang:(empty($conf->global->MAIN_LANG_DEFAULT)?'auto':$conf->global->MAIN_LANG_DEFAULT));
|
||||
@ -417,7 +419,7 @@ function getProductOrService($authentication, $id = '', $ref = '', $ref_ext = ''
|
||||
'pmp' => $product->pmp,
|
||||
'import_key' => $product->import_key,
|
||||
'dir' => $pdir,
|
||||
'images' => $product->liste_photos($dir, $nbmax=10)
|
||||
'images' => $product->liste_photos($dir, $nbmax)
|
||||
);
|
||||
|
||||
//Retreive all extrafield for thirdsparty
|
||||
@ -1001,6 +1003,8 @@ function getProductsForCategory($authentication, $id, $lang = '')
|
||||
{
|
||||
global $db,$conf,$langs;
|
||||
|
||||
$nbmax = 10;
|
||||
|
||||
$langcode=($lang?$lang:(empty($conf->global->MAIN_LANG_DEFAULT)?'auto':$conf->global->MAIN_LANG_DEFAULT));
|
||||
$langs->setDefaultLang($langcode);
|
||||
|
||||
@ -1086,7 +1090,7 @@ function getProductsForCategory($authentication, $id, $lang = '')
|
||||
'pmp' => $obj->pmp,
|
||||
'import_key' => $obj->import_key,
|
||||
'dir' => $pdir,
|
||||
'images' => $obj->liste_photos($dir, $nbmax=10)
|
||||
'images' => $obj->liste_photos($dir, $nbmax)
|
||||
);
|
||||
|
||||
//Retreive all extrafield for thirdsparty
|
||||
|
||||
Loading…
Reference in New Issue
Block a user