Merge remote-tracking branch 'Dolibarr/10.0' into 10.0
This commit is contained in:
commit
376d31b71a
@ -418,7 +418,6 @@ if($action == 'edit') {
|
|||||||
print '<br></form>';
|
print '<br></form>';
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// Boutons d'action
|
|
||||||
print '<br><div class="tabsAction">';
|
print '<br><div class="tabsAction">';
|
||||||
print '<a class="butAction" href="delais.php?action=edit">'.$langs->trans("Modify").'</a></div>';
|
print '<a class="butAction" href="delais.php?action=edit">'.$langs->trans("Modify").'</a></div>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -493,7 +493,8 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Boutons actions
|
// Buttons for actions
|
||||||
|
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit">'.$langs->trans("Modify").'</a>';
|
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit">'.$langs->trans("Modify").'</a>';
|
||||||
|
|||||||
@ -415,7 +415,6 @@ if ($action == 'create')
|
|||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
// Boutons
|
|
||||||
print '<div class="center">';
|
print '<div class="center">';
|
||||||
print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
|
print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
|
||||||
print ' ';
|
print ' ';
|
||||||
|
|||||||
@ -243,7 +243,7 @@ else
|
|||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
|
||||||
// Boutons actions
|
// Buttons for actions
|
||||||
|
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
|
|||||||
@ -173,7 +173,6 @@ if (empty($reshook))
|
|||||||
$action = '';
|
$action = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -320,7 +320,7 @@ p.titre {
|
|||||||
padding: 2px 2px;
|
padding: 2px 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------- Boutons --------------------- */
|
/* -------------- Buttons for SimplePOS --------------------- */
|
||||||
.bouton_ajout_article {
|
.bouton_ajout_article {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
width: 60%;
|
width: 60%;
|
||||||
|
|||||||
@ -43,6 +43,8 @@ $linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
|||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->load("propal");
|
$langs->load("propal");
|
||||||
|
|
||||||
|
$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc');
|
||||||
|
|
||||||
$total=0; $ilink=0;
|
$total=0; $ilink=0;
|
||||||
foreach($linkedObjectBlock as $key => $objectlink)
|
foreach($linkedObjectBlock as $key => $objectlink)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -39,6 +39,8 @@ $linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
|||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
|
|
||||||
|
$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc');
|
||||||
|
|
||||||
$total=0; $ilink=0;
|
$total=0; $ilink=0;
|
||||||
foreach($linkedObjectBlock as $key => $objectlink)
|
foreach($linkedObjectBlock as $key => $objectlink)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2019 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2017 Pierre-Henry Favre <support@atm-consulting.fr>
|
* Copyright (C) 2017 Pierre-Henry Favre <support@atm-consulting.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -16,11 +16,13 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/compta/compta-files.php
|
* \file htdocs/compta/accounting-files.php
|
||||||
* \ingroup compta
|
* \ingroup compta
|
||||||
* \brief Page to show portoflio and files of a thirdparty and download it
|
* \brief Page to show portoflio and files of a thirdparty and download it
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
@ -89,8 +91,23 @@ $entity = GETPOST('entity', 'int')?GETPOST('entity', 'int'):$conf->entity;
|
|||||||
|
|
||||||
$filesarray=array();
|
$filesarray=array();
|
||||||
$result=false;
|
$result=false;
|
||||||
if(($action=="searchfiles" || $action=="dl" ) && $date_start && $date_stop) {
|
if (($action=="searchfiles" || $action=="dl" )) {
|
||||||
|
|
||||||
|
if (empty($date_start))
|
||||||
|
{
|
||||||
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateStart")), null, 'errors');
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
if (empty($date_stop))
|
||||||
|
{
|
||||||
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateEnd")), null, 'errors');
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
$wheretail=" '".$db->idate($date_start)."' AND '".$db->idate($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="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.=" WHERE datef between ".$wheretail;
|
||||||
$sql.=" AND entity IN (".($entity==1?'0,1':$entity).')';
|
$sql.=" AND entity IN (".($entity==1?'0,1':$entity).')';
|
||||||
@ -143,34 +160,40 @@ if(($action=="searchfiles" || $action=="dl" ) && $date_start && $date_stop) {
|
|||||||
switch($objd->item)
|
switch($objd->item)
|
||||||
{
|
{
|
||||||
case "Invoice":
|
case "Invoice":
|
||||||
$subdir=dol_sanitizeFileName($objd->ref);
|
$subdir = '';
|
||||||
|
$subdir.=($subdir ? '/' : '').dol_sanitizeFileName($objd->ref);
|
||||||
$upload_dir = $conf->facture->dir_output.'/'.$subdir;
|
$upload_dir = $conf->facture->dir_output.'/'.$subdir;
|
||||||
$link="document.php?modulepart=facture&file=".str_replace('/', '%2F', $subdir).'%2F';
|
$link="document.php?modulepart=facture&file=".str_replace('/', '%2F', $subdir).'%2F';
|
||||||
break;
|
break;
|
||||||
case "SupplierInvoice":
|
case "SupplierInvoice":
|
||||||
$tmpinvoicesupplier->fetch($objd->id);
|
$tmpinvoicesupplier->fetch($objd->id);
|
||||||
$subdir=get_exdir($tmpinvoicesupplier->id, 2, 0, 0, $tmpinvoicesupplier, 'invoice_supplier').'/'.dol_sanitizeFileName($objd->ref);
|
$subdir = get_exdir($tmpinvoicesupplier->id, 2, 0, 1, $tmpinvoicesupplier, 'invoice_supplier'); // TODO Use first file
|
||||||
|
$subdir.=($subdir ? '/' : '').dol_sanitizeFileName($objd->ref);
|
||||||
$upload_dir = $conf->fournisseur->facture->dir_output.'/'.$subdir;
|
$upload_dir = $conf->fournisseur->facture->dir_output.'/'.$subdir;
|
||||||
$link="document.php?modulepart=facture_fournisseur&file=".str_replace('/', '%2F', $subdir).'%2F';
|
$link="document.php?modulepart=facture_fournisseur&file=".str_replace('/', '%2F', $subdir).'%2F';
|
||||||
break;
|
break;
|
||||||
case "ExpenseReport":
|
case "ExpenseReport":
|
||||||
$subdir=dol_sanitizeFileName($objd->ref);
|
$subdir = '';
|
||||||
|
$subdir.=($subdir ? '/' : '').dol_sanitizeFileName($objd->ref);
|
||||||
$upload_dir = $conf->expensereport->dir_output.'/'.$subdir;
|
$upload_dir = $conf->expensereport->dir_output.'/'.$subdir;
|
||||||
$link="document.php?modulepart=expensereport&file=".str_replace('/', '%2F', $subdir).'%2F';
|
$link="document.php?modulepart=expensereport&file=".str_replace('/', '%2F', $subdir).'%2F';
|
||||||
break;
|
break;
|
||||||
case "SalaryPayment":
|
case "SalaryPayment":
|
||||||
$subdir=dol_sanitizeFileName($objd->id);
|
$subdir = '';
|
||||||
|
$subdir.=($subdir ? '/' : '').dol_sanitizeFileName($objd->id);
|
||||||
$upload_dir = $conf->salaries->dir_output.'/'.$subdir;
|
$upload_dir = $conf->salaries->dir_output.'/'.$subdir;
|
||||||
$link="document.php?modulepart=salaries&file=".str_replace('/', '%2F', $subdir).'%2F';
|
$link="document.php?modulepart=salaries&file=".str_replace('/', '%2F', $subdir).'%2F';
|
||||||
break;
|
break;
|
||||||
case "Donation":
|
case "Donation":
|
||||||
$tmpdonation->fetch($objp->id);
|
$tmpdonation->fetch($objp->id);
|
||||||
$subdir=get_exdir(0, 0, 0, 1, $tmpdonation, 'donation'). '/'. dol_sanitizeFileName($objd->id);
|
$subdir=get_exdir(0, 0, 0, 0, $tmpdonation, 'donation');
|
||||||
|
$subdir.=($subdir ? '/' : '').dol_sanitizeFileName($objd->id);
|
||||||
$upload_dir = $conf->don->dir_output . '/' . $subdir;
|
$upload_dir = $conf->don->dir_output . '/' . $subdir;
|
||||||
$link="document.php?modulepart=don&file=".str_replace('/', '%2F', $subdir).'%2F';
|
$link="document.php?modulepart=don&file=".str_replace('/', '%2F', $subdir).'%2F';
|
||||||
break;
|
break;
|
||||||
case "SocialContributions":
|
case "SocialContributions":
|
||||||
$subdir=dol_sanitizeFileName($objd->id);
|
$subdir = '';
|
||||||
|
$subdir.=($subdir ? '/' : '').dol_sanitizeFileName($objd->id);
|
||||||
$upload_dir = $conf->tax->dir_output . '/' . $subdir;
|
$upload_dir = $conf->tax->dir_output . '/' . $subdir;
|
||||||
$link="document.php?modulepart=tax&file=".str_replace('/', '%2F', $subdir).'%2F';
|
$link="document.php?modulepart=tax&file=".str_replace('/', '%2F', $subdir).'%2F';
|
||||||
break;
|
break;
|
||||||
@ -184,15 +207,16 @@ if(($action=="searchfiles" || $action=="dl" ) && $date_start && $date_stop) {
|
|||||||
if (!empty($upload_dir))
|
if (!empty($upload_dir))
|
||||||
{
|
{
|
||||||
$result=true;
|
$result=true;
|
||||||
|
|
||||||
$files=dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview\.png)$', '', SORT_ASC, 1);
|
$files=dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview\.png)$', '', SORT_ASC, 1);
|
||||||
//var_dump($upload_dir);
|
|
||||||
if (count($files) < 1)
|
if (count($files) < 1)
|
||||||
{
|
{
|
||||||
$nofile['id']=$objd->id;
|
$nofile['id']=$objd->id;
|
||||||
$nofile['date']=$db->idate($objd->date);
|
$nofile['date']=$db->idate($objd->date);
|
||||||
$nofile['paid']=$objd->paid;
|
$nofile['paid']=$objd->paid;
|
||||||
$nofile['amount']=$objd->total_ttc;
|
$nofile['amount']=$objd->total_ttc;
|
||||||
$nofile['ref']=$objd->ref;
|
$nofile['ref']=($objd->ref ? $objd->ref : $objd->id);
|
||||||
$nofile['fk']=$objd->fk_soc;
|
$nofile['fk']=$objd->fk_soc;
|
||||||
$nofile['item']=$objd->item;
|
$nofile['item']=$objd->item;
|
||||||
|
|
||||||
@ -206,7 +230,7 @@ if(($action=="searchfiles" || $action=="dl" ) && $date_start && $date_stop) {
|
|||||||
$file['date']=$db->idate($objd->date);
|
$file['date']=$db->idate($objd->date);
|
||||||
$file['paid']=$objd->paid;
|
$file['paid']=$objd->paid;
|
||||||
$file['amount']=$objd->total_ttc;
|
$file['amount']=$objd->total_ttc;
|
||||||
$file['ref']=$objd->ref;
|
$file['ref']=($objd->ref ? $objd->ref : $objd->id);
|
||||||
$file['fk']=$objd->fk_soc;
|
$file['fk']=$objd->fk_soc;
|
||||||
$file['item']=$objd->item;
|
$file['item']=$objd->item;
|
||||||
$file['link']=$link.$file['name'];
|
$file['link']=$link.$file['name'];
|
||||||
@ -226,6 +250,7 @@ if(($action=="searchfiles" || $action=="dl" ) && $date_start && $date_stop) {
|
|||||||
|
|
||||||
$db->free($resd);
|
$db->free($resd);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* cleanup of old ZIP
|
* cleanup of old ZIP
|
||||||
@ -300,45 +325,20 @@ print '<form name="searchfiles" action="?action=searchfiles'.$tail.'" method="PO
|
|||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
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 $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>";
|
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();
|
// Export is for current company only !
|
||||||
// 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))
|
if (! empty($conf->multicompany->enabled) && is_object($mc))
|
||||||
{
|
{
|
||||||
print ' - '.$langs->trans("Entity").' : ';
|
print '<span class="marginleftonly marginrightonly">('.$langs->trans("Entity").' : ';
|
||||||
$mc->dao->getEntities();
|
$mc->dao->getEntities();
|
||||||
$mc->dao->fetch($conf->entity);
|
$mc->dao->fetch($conf->entity);
|
||||||
print $mc->dao->label;
|
print $mc->dao->label;
|
||||||
print "<br>\n";
|
print ")</span>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<input class="button" type="submit" value="'.$langs->trans("Refresh").'" /></form>'."\n";
|
print '<input class="button" type="submit" name="search" value="'.$langs->trans("Search").'">';
|
||||||
|
|
||||||
|
print '</form>'."\n";
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
@ -376,10 +376,10 @@ if (!empty($date_start) && !empty($date_stop))
|
|||||||
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($arrayfields['date']['label'], $_SERVER["PHP_SELF"], "date", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['date']['label'], $_SERVER["PHP_SELF"], "date", "", $param, 'class="nowrap"', $sortfield, $sortorder);
|
||||||
print '<td>'.$langs->trans("Type").'</td>';
|
print '<td>'.$langs->trans("Type").'</td>';
|
||||||
print '<td>'.$langs->trans("Ref").'</td>';
|
print '<td>'.$langs->trans("Ref").'</td>';
|
||||||
print '<td>'.$langs->trans("Link").'</td>';
|
print '<td>'.$langs->trans("Document").'</td>';
|
||||||
print '<td>'.$langs->trans("Paid").'</td>';
|
print '<td>'.$langs->trans("Paid").'</td>';
|
||||||
print '<td class="right">'.$langs->trans("Debit").'</td>';
|
print '<td class="right">'.$langs->trans("Debit").'</td>';
|
||||||
print '<td class="right">'.$langs->trans("Credit").'</td>';
|
print '<td class="right">'.$langs->trans("Credit").'</td>';
|
||||||
@ -402,12 +402,10 @@ if (!empty($date_start) && !empty($date_stop))
|
|||||||
// Balance calculation
|
// Balance calculation
|
||||||
$balance = 0;
|
$balance = 0;
|
||||||
foreach($TData as &$data1) {
|
foreach($TData as &$data1) {
|
||||||
if ($data1['item']!='Invoice'&& $data1['item']!='Donation' ){
|
if ($data1['item']!='Invoice' && $data1['item']!='Donation')
|
||||||
|
{
|
||||||
$data1['amount']=-$data1['amount'];
|
$data1['amount']=-$data1['amount'];
|
||||||
}
|
}
|
||||||
if ($data1['amount']>0){
|
|
||||||
}else{
|
|
||||||
}
|
|
||||||
$balance += $data1['amount'];
|
$balance += $data1['amount'];
|
||||||
$data1['balance'] = $balance;
|
$data1['balance'] = $balance;
|
||||||
}
|
}
|
||||||
@ -419,14 +417,19 @@ if (!empty($date_start) && !empty($date_stop))
|
|||||||
//if (!empty($data['fk_facture'])) $html_class = 'facid-'.$data['fk_facture'];
|
//if (!empty($data['fk_facture'])) $html_class = 'facid-'.$data['fk_facture'];
|
||||||
//elseif (!empty($data['fk_paiement'])) $html_class = 'payid-'.$data['fk_paiement'];
|
//elseif (!empty($data['fk_paiement'])) $html_class = 'payid-'.$data['fk_paiement'];
|
||||||
print '<tr class="oddeven '.$html_class.'">';
|
print '<tr class="oddeven '.$html_class.'">';
|
||||||
print "<td class=\"center\">";
|
print "<td>";
|
||||||
print dol_print_date($data['date'], 'day');
|
print dol_print_date($data['date'], 'day');
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
print '<td class="left">'.$langs->trans($data['item']).'</td>';
|
print '<td class="left">'.$langs->trans($data['item']).'</td>';
|
||||||
print '<td class="left">'.$data['ref'].'</td>';
|
print '<td class="left">'.$data['ref'].'</td>';
|
||||||
|
|
||||||
// File link
|
// File link
|
||||||
print '<td><a href='.DOL_URL_ROOT.'/'.$data['link'].">".$data['name']."</a></td>\n";
|
print '<td>';
|
||||||
|
if ($data['link'])
|
||||||
|
{
|
||||||
|
print '<a href='.DOL_URL_ROOT.'/'.$data['link'].' target="_blank">'.($data['name'] ? $data['name'] : $data['ref']).'</a>';
|
||||||
|
}
|
||||||
|
print "</td>\n";
|
||||||
|
|
||||||
print '<td class="left">'.$data['paid'].'</td>';
|
print '<td class="left">'.$data['paid'].'</td>';
|
||||||
print '<td class="right">'.(($data['amount'] > 0) ? price(abs($data['amount'])) : '')."</td>\n";
|
print '<td class="right">'.(($data['amount'] > 0) ? price(abs($data['amount'])) : '')."</td>\n";
|
||||||
@ -38,6 +38,8 @@ $linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
|||||||
|
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
|
$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc');
|
||||||
|
|
||||||
$total=0; $ilink=0;
|
$total=0; $ilink=0;
|
||||||
foreach($linkedObjectBlock as $key => $objectlink)
|
foreach($linkedObjectBlock as $key => $objectlink)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6480,7 +6480,7 @@ class Form
|
|||||||
public function showLinkedObjectBlock($object, $morehtmlright = '', $compatibleImportElementsList = false)
|
public function showLinkedObjectBlock($object, $morehtmlright = '', $compatibleImportElementsList = false)
|
||||||
{
|
{
|
||||||
global $conf,$langs,$hookmanager;
|
global $conf,$langs,$hookmanager;
|
||||||
global $bc;
|
global $bc, $action;
|
||||||
|
|
||||||
$object->fetchObjectLinked();
|
$object->fetchObjectLinked();
|
||||||
|
|
||||||
@ -6525,6 +6525,7 @@ class Form
|
|||||||
$showImportButton=true;
|
$showImportButton=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$regs = array();
|
||||||
if ($objecttype != 'supplier_proposal' && preg_match('/^([^_]+)_([^_]+)/i', $objecttype, $regs))
|
if ($objecttype != 'supplier_proposal' && preg_match('/^([^_]+)_([^_]+)/i', $objecttype, $regs))
|
||||||
{
|
{
|
||||||
$element = $regs[1];
|
$element = $regs[1];
|
||||||
@ -6628,7 +6629,7 @@ class Form
|
|||||||
public function showLinkToObjectBlock($object, $restrictlinksto = array(), $excludelinksto = array())
|
public function showLinkToObjectBlock($object, $restrictlinksto = array(), $excludelinksto = array())
|
||||||
{
|
{
|
||||||
global $conf, $langs, $hookmanager;
|
global $conf, $langs, $hookmanager;
|
||||||
global $bc;
|
global $bc, $action;
|
||||||
|
|
||||||
$linktoelem='';
|
$linktoelem='';
|
||||||
$linktoelemlist='';
|
$linktoelemlist='';
|
||||||
@ -6663,8 +6664,6 @@ class Form
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
global $action;
|
|
||||||
|
|
||||||
// Can complete the possiblelink array
|
// Can complete the possiblelink array
|
||||||
$hookmanager->initHooks(array('commonobject'));
|
$hookmanager->initHooks(array('commonobject'));
|
||||||
$parameters=array('listofidcompanytoscan' => $listofidcompanytoscan);
|
$parameters=array('listofidcompanytoscan' => $listofidcompanytoscan);
|
||||||
|
|||||||
@ -1330,10 +1330,10 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi
|
|||||||
$nophoto='';
|
$nophoto='';
|
||||||
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref"></div>';
|
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref"></div>';
|
||||||
}
|
}
|
||||||
//elseif ($conf->browser->layout != 'phone') { // Show no photo link
|
else { // Show no photo link
|
||||||
$nophoto='/public/theme/common/nophoto.png';
|
$nophoto='/public/theme/common/nophoto.png';
|
||||||
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref"><img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="No photo"'.($width?' style="width: '.$width.'px"':'').' src="'.DOL_URL_ROOT.$nophoto.'"></div>';
|
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref"><img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="No photo"'.($width?' style="width: '.$width.'px"':'').' src="'.DOL_URL_ROOT.$nophoto.'"></div>';
|
||||||
//}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif ($object->element == 'ticket')
|
elseif ($object->element == 'ticket')
|
||||||
@ -1349,10 +1349,10 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi
|
|||||||
$nophoto='';
|
$nophoto='';
|
||||||
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref"></div>';
|
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref"></div>';
|
||||||
}
|
}
|
||||||
//elseif ($conf->browser->layout != 'phone') { // Show no photo link
|
else { // Show no photo link
|
||||||
$nophoto='/public/theme/common/nophoto.png';
|
$nophoto='/public/theme/common/nophoto.png';
|
||||||
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref"><img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="No photo" border="0"'.($width?' style="width: '.$width.'px"':'').' src="'.DOL_URL_ROOT.$nophoto.'"></div>';
|
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref"><img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="No photo" border="0"'.($width?' style="width: '.$width.'px"':'').' src="'.DOL_URL_ROOT.$nophoto.'"></div>';
|
||||||
//}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -5260,7 +5260,7 @@ function get_exdir($num, $level, $alpha, $withoutslash, $object, $modulepart)
|
|||||||
// Here, object->id, object->ref and modulepart are required.
|
// Here, object->id, object->ref and modulepart are required.
|
||||||
//var_dump($modulepart);
|
//var_dump($modulepart);
|
||||||
if (in_array($modulepart, array('thirdparty','contact','member','propal','proposal','commande','order','facture','invoice',
|
if (in_array($modulepart, array('thirdparty','contact','member','propal','proposal','commande','order','facture','invoice',
|
||||||
'supplier_order','supplier_proposal','shipment','contract','expensereport')))
|
'supplier_order','supplier_proposal','shipment','contract','expensereport','ficheinter')))
|
||||||
{
|
{
|
||||||
$path=($object->ref?$object->ref:$object->id);
|
$path=($object->ref?$object->ref:$object->id);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -281,6 +281,8 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
|
|||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2430__+MAX_llx_menu__, 'accountancy', 'bookkeeping', 2400__+MAX_llx_menu__, '/accountancy/bookkeeping/list.php?mainmenu=accountancy&leftmenu=accountancy_bookeeping', 'Bookkeeping', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 15, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2430__+MAX_llx_menu__, 'accountancy', 'bookkeeping', 2400__+MAX_llx_menu__, '/accountancy/bookkeeping/list.php?mainmenu=accountancy&leftmenu=accountancy_bookeeping', 'Bookkeeping', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 15, __ENTITY__);
|
||||||
-- Balance
|
-- Balance
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2435__+MAX_llx_menu__, 'accountancy', 'balance', 2400__+MAX_llx_menu__, '/accountancy/bookkeeping/balance.php?mainmenu=accountancy&leftmenu=accountancy_balance', 'AccountBalance', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 16, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2435__+MAX_llx_menu__, 'accountancy', 'balance', 2400__+MAX_llx_menu__, '/accountancy/bookkeeping/balance.php?mainmenu=accountancy&leftmenu=accountancy_balance', 'AccountBalance', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 16, __ENTITY__);
|
||||||
|
-- Export accounting documents
|
||||||
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2436__+MAX_llx_menu__, 'accountancy', 'accountancy_files', 2400__+MAX_llx_menu__, '/compta/compta-files.php?mainmenu=accountancy&leftmenu=accountancy_files', 'AccountantFiles', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 17, __ENTITY__);
|
||||||
-- Reports
|
-- Reports
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2440__+MAX_llx_menu__, 'accountancy', 'accountancy_report', 2400__+MAX_llx_menu__, '/compta/resultat/index.php?mainmenu=accountancy&leftmenu=accountancy_report', 'Reportings', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 17, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2440__+MAX_llx_menu__, 'accountancy', 'accountancy_report', 2400__+MAX_llx_menu__, '/compta/resultat/index.php?mainmenu=accountancy&leftmenu=accountancy_report', 'Reportings', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 17, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_report"', __HANDLER__, 'left', 2441__+MAX_llx_menu__, 'accountancy', 'accountancy_report', 2440__+MAX_llx_menu__, '/compta/resultat/index.php?mainmenu=accountancy&leftmenu=accountancy_report', 'MenuReportInOut', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 18, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_report"', __HANDLER__, 'left', 2441__+MAX_llx_menu__, 'accountancy', 'accountancy_report', 2440__+MAX_llx_menu__, '/compta/resultat/index.php?mainmenu=accountancy&leftmenu=accountancy_report', 'MenuReportInOut', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 18, __ENTITY__);
|
||||||
|
|||||||
@ -1285,9 +1285,9 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
|||||||
$newmenu->add("/accountancy/bookkeeping/balance.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("AccountBalance"), 1, $user->rights->accounting->mouvements->lire);
|
$newmenu->add("/accountancy/bookkeeping/balance.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("AccountBalance"), 1, $user->rights->accounting->mouvements->lire);
|
||||||
|
|
||||||
// Files
|
// Files
|
||||||
if (! empty($conf->global->MAIN_FEATURES_LEVEL) && $conf->global->MAIN_FEATURES_LEVEL >= 2)
|
if (! empty($conf->global->MAIN_FEATURES_LEVEL) && $conf->global->MAIN_FEATURES_LEVEL >= 1)
|
||||||
{
|
{
|
||||||
$newmenu->add("/compta/compta-files.php?mainmenu=accountancy&leftmenu=accountancy_files", $langs->trans("AccountantFiles"), 1, $user->rights->accounting->mouvements->lire);
|
$newmenu->add("/compta/accounting-files.php?mainmenu=accountancy&leftmenu=accountancy_files", $langs->trans("AccountantFiles"), 1, $user->rights->accounting->mouvements->lire);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reports
|
// Reports
|
||||||
@ -1329,6 +1329,12 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
|||||||
// Accountancy (simple)
|
// Accountancy (simple)
|
||||||
if (! empty($conf->comptabilite->enabled))
|
if (! empty($conf->comptabilite->enabled))
|
||||||
{
|
{
|
||||||
|
// Files
|
||||||
|
if (! empty($conf->global->MAIN_FEATURES_LEVEL) && $conf->global->MAIN_FEATURES_LEVEL >= 1)
|
||||||
|
{
|
||||||
|
$newmenu->add("/compta/accounting-files.php?mainmenu=accountancy&leftmenu=accountancy_files", $langs->trans("AccountantFiles"), 0, $user->rights->compta->resultat->lire, '', $mainmenu, 'files');
|
||||||
|
}
|
||||||
|
|
||||||
// Bilan, resultats
|
// Bilan, resultats
|
||||||
$newmenu->add("/compta/resultat/index.php?leftmenu=report&mainmenu=accountancy", $langs->trans("Reportings"), 0, $user->rights->compta->resultat->lire, '', $mainmenu, 'ca');
|
$newmenu->add("/compta/resultat/index.php?leftmenu=report&mainmenu=accountancy", $langs->trans("Reportings"), 0, $user->rights->compta->resultat->lire, '', $mainmenu, 'ca');
|
||||||
|
|
||||||
|
|||||||
@ -53,11 +53,11 @@ if( (array) $linked_resources && count($linked_resources) > 0)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$style='';
|
$class='';
|
||||||
if ($linked_resource['rowid'] == GETPOST('lineid'))
|
if ($linked_resource['rowid'] == GETPOST('lineid'))
|
||||||
$style='style="background: orange;"';
|
$class='highlight';
|
||||||
|
|
||||||
print '<div class="tagtr oddeven" '.$style.'>';
|
print '<div class="tagtr oddeven'.($class?' '.$class:'').'">';
|
||||||
|
|
||||||
print '<div class="tagtd">';
|
print '<div class="tagtd">';
|
||||||
print $object_resource->getNomUrl(1);
|
print $object_resource->getNomUrl(1);
|
||||||
@ -81,7 +81,7 @@ if( (array) $linked_resources && count($linked_resources) > 0)
|
|||||||
print '</a>';
|
print '</a>';
|
||||||
print ' ';
|
print ' ';
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=delete_resource&id='.$linked_resource['resource_id'].'&element='.$element.'&element_id='.$element_id.'&lineid='.$linked_resource['rowid'].'">';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=delete_resource&id='.$linked_resource['resource_id'].'&element='.$element.'&element_id='.$element_id.'&lineid='.$linked_resource['rowid'].'">';
|
||||||
print img_delete();
|
print img_picto($langs->trans("Unlink"), 'unlink');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
|||||||
@ -434,7 +434,7 @@ if ($resql)
|
|||||||
$canedit=((in_array($user_id, $childids) && $user->rights->expensereport->creer)
|
$canedit=((in_array($user_id, $childids) && $user->rights->expensereport->creer)
|
||||||
|| ($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->expensereport->writeall_advance));
|
|| ($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->expensereport->writeall_advance));
|
||||||
|
|
||||||
// Boutons d'actions
|
// Buttons for actions
|
||||||
if ($canedit)
|
if ($canedit)
|
||||||
{
|
{
|
||||||
print '<a href="'.DOL_URL_ROOT.'/expensereport/card.php?action=create&fk_user_author='.$fuser->id.'" class="butAction">'.$langs->trans("AddTrip").'</a>';
|
print '<a href="'.DOL_URL_ROOT.'/expensereport/card.php?action=create&fk_user_author='.$fuser->id.'" class="butAction">'.$langs->trans("AddTrip").'</a>';
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
|
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
|
||||||
* Copyright (C) 2005 Marc Barilley <marc@ocebo.fr>
|
* Copyright (C) 2005 Marc Barilley <marc@ocebo.fr>
|
||||||
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2019 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2013-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2013-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2014-2016 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014-2016 Marcos García <marcosgdf@gmail.com>
|
||||||
@ -831,6 +831,8 @@ if (empty($reshook))
|
|||||||
// Auto calculation of date due if not filled by user
|
// Auto calculation of date due if not filled by user
|
||||||
if(empty($object->date_echeance)) $object->date_echeance = $object->calculate_date_lim_reglement();
|
if(empty($object->date_echeance)) $object->date_echeance = $object->calculate_date_lim_reglement();
|
||||||
|
|
||||||
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
// If creation from another object of another module
|
// If creation from another object of another module
|
||||||
if (! $error && $_POST['origin'] && $_POST['originid'])
|
if (! $error && $_POST['origin'] && $_POST['originid'])
|
||||||
{
|
{
|
||||||
@ -3019,7 +3021,7 @@ else
|
|||||||
if ($action != 'presend')
|
if ($action != 'presend')
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Boutons actions
|
* Buttons actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|||||||
@ -1391,9 +1391,10 @@ else
|
|||||||
|
|
||||||
if (! $edit)
|
if (! $edit)
|
||||||
{
|
{
|
||||||
|
// Buttons for actions
|
||||||
|
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
// Boutons d'actions
|
|
||||||
if ($cancreate && $object->statut == Holiday::STATUS_DRAFT)
|
if ($cancreate && $object->statut == Holiday::STATUS_DRAFT)
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit" class="butAction">'.$langs->trans("EditCP").'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit" class="butAction">'.$langs->trans("EditCP").'</a>';
|
||||||
|
|||||||
@ -319,11 +319,12 @@ if ($id > 0) // For user tab
|
|||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
|
// Buttons for actions
|
||||||
|
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
$canedit=(($user->id == $user_id && $user->rights->holiday->write) || ($user->id != $user_id && $user->rights->holiday->write_all));
|
$canedit=(($user->id == $user_id && $user->rights->holiday->write) || ($user->id != $user_id && $user->rights->holiday->write_all));
|
||||||
|
|
||||||
// Boutons d'actions
|
|
||||||
if ($canedit)
|
if ($canedit)
|
||||||
{
|
{
|
||||||
print '<a href="'.DOL_URL_ROOT.'/holiday/card.php?action=request&fuserid='.$user_id.'" class="butAction">'.$langs->trans("AddCP").'</a>';
|
print '<a href="'.DOL_URL_ROOT.'/holiday/card.php?action=request&fuserid='.$user_id.'" class="butAction">'.$langs->trans("AddCP").'</a>';
|
||||||
|
|||||||
@ -421,6 +421,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
|
|
||||||
|
|
||||||
// Buttons for actions
|
// Buttons for actions
|
||||||
|
|
||||||
if ($action != 'presend' && $action != 'editline') {
|
if ($action != 'presend' && $action != 'editline') {
|
||||||
print '<div class="tabsAction">'."\n";
|
print '<div class="tabsAction">'."\n";
|
||||||
$parameters=array();
|
$parameters=array();
|
||||||
|
|||||||
@ -619,7 +619,7 @@ print '<tr>'."\n";
|
|||||||
print '<td></td>'."\n";
|
print '<td></td>'."\n";
|
||||||
print '<td></td>'."\n";
|
print '<td></td>'."\n";
|
||||||
|
|
||||||
//boucle pour l'affichage des boutons de suppression de colonne
|
// loop to show the delete link
|
||||||
if ($user->rights->opensurvey->write) {
|
if ($user->rights->opensurvey->write) {
|
||||||
for ($i = 0; isset($toutsujet[$i]); $i++) {
|
for ($i = 0; isset($toutsujet[$i]); $i++) {
|
||||||
|
|
||||||
|
|||||||
@ -471,7 +471,7 @@ for ($i = 0; $i < $nbrejourmois + $premierjourmois; $i++) {
|
|||||||
{
|
{
|
||||||
$nbofchoice=count($_SESSION["totalchoixjour"]);
|
$nbofchoice=count($_SESSION["totalchoixjour"]);
|
||||||
for ($j = 0; $j < $nbofchoice; $j++) {
|
for ($j = 0; $j < $nbofchoice; $j++) {
|
||||||
//affichage des boutons ROUGES
|
// show red buttons
|
||||||
if (date("j", $_SESSION["totalchoixjour"][$j]) == $numerojour && date("n", $_SESSION["totalchoixjour"][$j]) == $_SESSION["mois"] && date("Y", $_SESSION["totalchoixjour"][$j]) == $_SESSION["annee"]) {
|
if (date("j", $_SESSION["totalchoixjour"][$j]) == $numerojour && date("n", $_SESSION["totalchoixjour"][$j]) == $_SESSION["mois"] && date("Y", $_SESSION["totalchoixjour"][$j]) == $_SESSION["annee"]) {
|
||||||
print '<td align="center" class="choisi"><input type="submit" class="bouton OFF" name="choixjourretrait[]" value="'.$numerojour.'"></td>'."\n";
|
print '<td align="center" class="choisi"><input type="submit" class="bouton OFF" name="choixjourretrait[]" value="'.$numerojour.'"></td>'."\n";
|
||||||
$dejafait = $numerojour;
|
$dejafait = $numerojour;
|
||||||
@ -479,13 +479,13 @@ for ($i = 0; $i < $nbrejourmois + $premierjourmois; $i++) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Si pas de bouton ROUGE alors on affiche un bouton VERT ou GRIS avec le numéro du jour dessus
|
// If no red button, we show green or grey button with number of day
|
||||||
if (isset($dejafait) === false || $dejafait != $numerojour){
|
if (isset($dejafait) === false || $dejafait != $numerojour){
|
||||||
//bouton vert
|
// green button
|
||||||
if (($numerojour >= $jourAJ && $_SESSION["mois"] == $moisAJ && $_SESSION["annee"] == $anneeAJ) || ($_SESSION["mois"] > $moisAJ && $_SESSION["annee"] == $anneeAJ) || $_SESSION["annee"] > $anneeAJ) {
|
if (($numerojour >= $jourAJ && $_SESSION["mois"] == $moisAJ && $_SESSION["annee"] == $anneeAJ) || ($_SESSION["mois"] > $moisAJ && $_SESSION["annee"] == $anneeAJ) || $_SESSION["annee"] > $anneeAJ) {
|
||||||
print '<td align="center" class="libre"><input type="submit" class="bouton ON" name="choixjourajout[]" value="'.$numerojour.'"></td>'."\n";
|
print '<td align="center" class="libre"><input type="submit" class="bouton ON" name="choixjourajout[]" value="'.$numerojour.'"></td>'."\n";
|
||||||
} else {
|
} else {
|
||||||
//bouton gris
|
// grey button
|
||||||
print '<td align="center" class="avant">'.$numerojour.'</td>'."\n";
|
print '<td align="center" class="avant">'.$numerojour.'</td>'."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -547,7 +547,7 @@ if (issetAndNoEmpty('totalchoixjour', $_SESSION) || $erreur)
|
|||||||
|
|
||||||
print '</table>'."\n";
|
print '</table>'."\n";
|
||||||
|
|
||||||
//affichage des boutons de formulaire pour annuler, effacer les jours ou créer le sondage
|
// show buttons to cancel, delete days or create survey
|
||||||
print '<table>'."\n";
|
print '<table>'."\n";
|
||||||
print '<tr>'."\n";
|
print '<tr>'."\n";
|
||||||
print '<td><input type="submit" class="button" name="reset" value="'. dol_escape_htmltag($langs->trans("RemoveAllDays")) .'"></td><td><input type="submit" class="button" name="reporterhoraires" value="'. dol_escape_htmltag($langs->trans("CopyHoursOfFirstDay")) .'"></td><td><input type="submit" class="button" name="resethoraires" value="'. dol_escape_htmltag($langs->trans("RemoveAllHours")) .'"></td></tr>'."\n";
|
print '<td><input type="submit" class="button" name="reset" value="'. dol_escape_htmltag($langs->trans("RemoveAllDays")) .'"></td><td><input type="submit" class="button" name="reporterhoraires" value="'. dol_escape_htmltag($langs->trans("CopyHoursOfFirstDay")) .'"></td><td><input type="submit" class="button" name="resethoraires" value="'. dol_escape_htmltag($langs->trans("RemoveAllHours")) .'"></td></tr>'."\n";
|
||||||
|
|||||||
@ -194,7 +194,7 @@ if (GETPOST('choix_sondage'))
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// affichage des boutons pour choisir sondage date ou autre
|
// Show image to selecte between date survey or other survey
|
||||||
print '<br><table>'."\n";
|
print '<br><table>'."\n";
|
||||||
print '<tr><td>'. $langs->trans("CreateSurveyDate") .'</td><td></td> '."\n";
|
print '<tr><td>'. $langs->trans("CreateSurveyDate") .'</td><td></td> '."\n";
|
||||||
print '<td><input type="image" name="creation_sondage_date" value="'.$langs->trans('CreateSurveyDate').'" src="../img/calendar-32.png"></td></tr>'."\n";
|
print '<td><input type="image" name="creation_sondage_date" value="'.$langs->trans('CreateSurveyDate').'" src="../img/calendar-32.png"></td></tr>'."\n";
|
||||||
|
|||||||
@ -333,7 +333,8 @@ else
|
|||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
// Boutons actions
|
// Buttons for actions
|
||||||
|
|
||||||
print '<div class="center">';
|
print '<div class="center">';
|
||||||
print '<input type="submit" id="convert_vatrate" name="convert_vatrate" value="'.$langs->trans("MassConvert").'" class="button" />';
|
print '<input type="submit" id="convert_vatrate" name="convert_vatrate" value="'.$langs->trans("MassConvert").'" class="button" />';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2014-2017 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014-2017 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||||
|
* Copyright (C) 2019 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -707,6 +708,27 @@ class Project extends CommonObject
|
|||||||
$ret = $this->deleteTasks($user);
|
$ret = $this->deleteTasks($user);
|
||||||
if ($ret < 0) $error++;
|
if ($ret < 0) $error++;
|
||||||
|
|
||||||
|
|
||||||
|
// Delete all child tables
|
||||||
|
if (! $error) {
|
||||||
|
$elements = array('categorie_project'); // elements to delete. TODO Make goodway to delete
|
||||||
|
foreach($elements as $table)
|
||||||
|
{
|
||||||
|
if (! $error) {
|
||||||
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX.$table;
|
||||||
|
$sql.= " WHERE fk_project = ".$this->id;
|
||||||
|
|
||||||
|
$result = $this->db->query($sql);
|
||||||
|
if (! $result) {
|
||||||
|
$error++;
|
||||||
|
$this->errors[] = $this->db->lasterror();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Delete project
|
// Delete project
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -320,7 +320,7 @@ class SocieteAccount extends CommonObject
|
|||||||
* @param string $id Id of customer in external system (example: 'cu_xxxxxxxxxxxxx', ...)
|
* @param string $id Id of customer in external system (example: 'cu_xxxxxxxxxxxxx', ...)
|
||||||
* @param string $site Site (example: 'stripe', '...')
|
* @param string $site Site (example: 'stripe', '...')
|
||||||
* @param int $status Status (0=test, 1=live)
|
* @param int $status Status (0=test, 1=live)
|
||||||
* @return string Id of third party
|
* @return int Id of third party
|
||||||
* @see getCustomerAccount()
|
* @see getCustomerAccount()
|
||||||
*/
|
*/
|
||||||
public function getThirdPartyID($id, $site, $status = 0)
|
public function getThirdPartyID($id, $site, $status = 0)
|
||||||
|
|||||||
@ -247,6 +247,8 @@ class Stripe extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public function getPaymentMethodStripe($paymentmethod, $key = '', $status = 0)
|
public function getPaymentMethodStripe($paymentmethod, $key = '', $status = 0)
|
||||||
{
|
{
|
||||||
|
$stripepaymentmethod = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Force to use the correct API key
|
// Force to use the correct API key
|
||||||
global $stripearrayofkeysbyenv;
|
global $stripearrayofkeysbyenv;
|
||||||
@ -261,6 +263,7 @@ class Stripe extends CommonObject
|
|||||||
{
|
{
|
||||||
$this->error = $e->getMessage();
|
$this->error = $e->getMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $stripepaymentmethod;
|
return $stripepaymentmethod;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@ if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
|
|||||||
|
|
||||||
|
|
||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
/* Boutons actions */
|
/* Buttons for actions */
|
||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
|
|
||||||
div.divButAction {
|
div.divButAction {
|
||||||
|
|||||||
@ -2362,7 +2362,7 @@ span.tabspan {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
/* Boutons actions */
|
/* Buttons for actions */
|
||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
<?php include dol_buildpath($path.'/theme/'.$theme.'/btn.inc.php', 0); ?>
|
<?php include dol_buildpath($path.'/theme/'.$theme.'/btn.inc.php', 0); ?>
|
||||||
|
|
||||||
|
|||||||
@ -2400,7 +2400,7 @@ div.tabBar table.tableforservicepart2:last-child {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
/* Boutons actions */
|
/* Buttons for actions */
|
||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
|
|
||||||
div.divButAction {
|
div.divButAction {
|
||||||
@ -2503,7 +2503,7 @@ span.tabspan {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
/* Boutons actions */
|
/* Buttons for actions */
|
||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
|
|
||||||
div.divButAction {
|
div.divButAction {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user