Debug the accounting-file tool

This commit is contained in:
Laurent Destailleur 2019-06-18 14:30:13 +02:00
parent 0123a18ff8
commit 8835b49f3f
4 changed files with 177 additions and 106 deletions

View File

@ -16,13 +16,11 @@
* 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/accounting-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';
@ -34,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php';
require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
$langs->loadLangs(array("accountancy", "bills", "companies")); $langs->loadLangs(array("accountancy", "bills", "companies", "salaries"));
$date_start =GETPOST('date_start', 'alpha'); $date_start =GETPOST('date_start', 'alpha');
$date_startDay= GETPOST('date_startday', 'int'); $date_startDay= GETPOST('date_startday', 'int');
@ -46,7 +44,7 @@ $date_stopDay= GETPOST('date_stopday', 'int');
$date_stopMonth= GETPOST('date_stopmonth', 'int'); $date_stopMonth= GETPOST('date_stopmonth', 'int');
$date_stopYear= GETPOST('date_stopyear', 'int'); $date_stopYear= GETPOST('date_stopyear', 'int');
//FIXME doldate //FIXME doldate
$date_stop=($date_stopDay)?dol_mktime(0, 0, 0, $date_stopMonth, $date_stopDay, $date_stopYear):strtotime($date_stop); $date_stop=($date_stopDay)?dol_mktime(23, 59, 59, $date_stopMonth, $date_stopDay, $date_stopYear):strtotime($date_stop);
$action =GETPOST('action', 'alpha'); $action =GETPOST('action', 'alpha');
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
@ -66,6 +64,7 @@ if (! $sortorder) $sortorder="DESC";
$arrayfields=array( $arrayfields=array(
'type'=>array('label'=>"Type", 'checked'=>1),
'date'=>array('label'=>"Date", 'checked'=>1), 'date'=>array('label'=>"Date", 'checked'=>1),
//... //...
); );
@ -108,36 +107,43 @@ if (($action=="searchfiles" || $action=="dl" )) {
{ {
$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 t.rowid as id, t.ref, t.paye as paid, total as total_ht, total_ttc, tva as total_vat, fk_soc, t.datef as date, 'Invoice' as item, s.nom as thirdparty_name, s.code_client as thirdparty_code, c.code as country_code, s.tva_intra as vatnum";
$sql.=" FROM ".MAIN_DB_PREFIX."facture as t LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = t.fk_soc LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = s.fk_pays";
$sql.=" WHERE datef between ".$wheretail; $sql.=" WHERE datef between ".$wheretail;
$sql.=" AND entity IN (".($entity==1?'0,1':$entity).')'; $sql.=" AND t.entity IN (".($entity==1?'0,1':$entity).')';
$sql.=" AND fk_statut <> ".Facture::STATUS_DRAFT; $sql.=" AND t.fk_statut <> ".Facture::STATUS_DRAFT;
$sql.=" UNION ALL"; $sql.=" UNION ALL";
$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.=" SELECT t.rowid as id, t.ref, paye as paid, total_ht, total_ttc, total_tva as total_vat, fk_soc, datef as date, 'SupplierInvoice' as item, s.nom as thirdparty_name, s.code_fournisseur as thirdparty_code, c.code as country_code, s.tva_intra as vatnum";
$sql.=" FROM ".MAIN_DB_PREFIX."facture_fourn as t LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = t.fk_soc LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = s.fk_pays";
$sql.=" WHERE datef between ".$wheretail; $sql.=" WHERE datef between ".$wheretail;
$sql.=" AND entity IN (".($entity==1?'0,1':$entity).')'; $sql.=" AND t.entity IN (".($entity==1?'0,1':$entity).')';
$sql.=" AND fk_statut <> ".FactureFournisseur::STATUS_DRAFT; $sql.=" AND t.fk_statut <> ".FactureFournisseur::STATUS_DRAFT;
$sql.=" UNION ALL"; $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 t.rowid as id, t.ref, paid, total_ht, total_ttc, total_tva as total_vat, fk_user_author as fk_soc, date_fin as date, 'ExpenseReport' as item, CONCAT(CONCAT(u.lastname, ' '), u.firstname) as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum";
$sql.=" FROM ".MAIN_DB_PREFIX."expensereport as t LEFT JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid = t.fk_user_author LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = u.fk_country";
$sql.=" WHERE date_fin between ".$wheretail; $sql.=" WHERE date_fin between ".$wheretail;
$sql.=" AND entity IN (".($entity==1?'0,1':$entity).')'; $sql.=" AND t.entity IN (".($entity==1?'0,1':$entity).')';
$sql.=" AND fk_statut <> ".ExpenseReport::STATUS_DRAFT; $sql.=" AND t.fk_statut <> ".ExpenseReport::STATUS_DRAFT;
$sql.=" UNION ALL"; $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 t.rowid as id, t.ref, paid, amount as total_ht, amount as total_ttc, 0 as total_vat, 0 as fk_soc, datedon as date, 'Donation' as item, t.societe as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum";
$sql.=" FROM ".MAIN_DB_PREFIX."don as t LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = t.fk_country";
$sql.=" WHERE datedon between ".$wheretail; $sql.=" WHERE datedon between ".$wheretail;
$sql.=" AND entity IN (".($entity==1?'0,1':$entity).')'; $sql.=" AND t.entity IN (".($entity==1?'0,1':$entity).')';
$sql.=" AND fk_statut <> ".Don::STATUS_DRAFT; $sql.=" AND t.fk_statut <> ".Don::STATUS_DRAFT;
$sql.=" UNION ALL"; $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 t.rowid as id, t.label as ref, 1 as paid, amount as total_ht, amount as total_ttc, 0 as total_vat, t.fk_user as fk_soc, datep as date, 'SalaryPayment' as item, CONCAT(CONCAT(u.lastname, ' '), u.firstname) as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum";
$sql.=" FROM ".MAIN_DB_PREFIX."payment_salary as t LEFT JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid = t.fk_user LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = u.fk_country";
$sql.=" WHERE datep between ".$wheretail; $sql.=" WHERE datep between ".$wheretail;
$sql.=" AND entity IN (".($entity==1?'0,1':$entity).')'; $sql.=" AND t.entity IN (".($entity==1?'0,1':$entity).')';
//$sql.=" AND fk_statut <> ".PaymentSalary::STATUS_DRAFT; //$sql.=" AND fk_statut <> ".PaymentSalary::STATUS_DRAFT;
$sql.=" UNION ALL"; $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 t.rowid as id, t.libelle as ref, paye as paid, amount as total_ht, amount as total_ttc, 0 as total_tva, 0 as fk_soc, date_creation as date, 'SocialContributions' as item, '' as thirdparty_name, '' as thirdparty_code, '' as country_code, '' as vatnum";
$sql.=" FROM ".MAIN_DB_PREFIX."chargesociales as t";
$sql.=" WHERE date_creation between ".$wheretail; $sql.=" WHERE date_creation between ".$wheretail;
$sql.=" AND entity IN (".($entity==1?'0,1':$entity).')'; $sql.=" AND t.entity IN (".($entity==1?'0,1':$entity).')';
//$sql.=" AND fk_statut <> ".ChargeSociales::STATUS_DRAFT; //$sql.=" AND fk_statut <> ".ChargeSociales::STATUS_DRAFT;
$sql.= $db->order($sortfield, $sortorder); $sql.= $db->order($sortfield, $sortorder);
//print $sql;
$resd = $db->query($sql); $resd = $db->query($sql);
$files=array(); $files=array();
@ -207,18 +213,23 @@ if (($action=="searchfiles" || $action=="dl" )) {
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_ht']=$objd->total_ht;
$nofile['amount_ttc']=$objd->total_ttc;
$nofile['amount_vat']=$objd->total_vat;
$nofile['ref']=($objd->ref ? $objd->ref : $objd->id); $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;
$nofile['thirdparty_name']=$objd->thirdparty_name;
$nofile['thirdparty_code']=$objd->thirdparty_code;
$nofile['country_code']=$objd->country_code;
$nofile['vatnum']=$objd->vatnum;
$filesarray[]=$nofile; $filesarray[]=$nofile;
} }
@ -229,10 +240,18 @@ if (($action=="searchfiles" || $action=="dl" )) {
$file['id']=$objd->id; $file['id']=$objd->id;
$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_ht']=$objd->total_ht;
$file['amount_ttc']=$objd->total_ttc;
$file['amount_vat']=$objd->total_vat;
$file['ref']=($objd->ref ? $objd->ref : $objd->id); $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['thirdparty_name']=$objd->thirdparty_name;
$file['thirdparty_code']=$objd->thirdparty_code;
$file['country_code']=$objd->country_code;
$file['vatnum']=$objd->vatnum;
$file['link']=$link.$file['name']; $file['link']=$link.$file['name'];
$file['relpathnamelang'] = $langs->trans($file['item']).'/'.$file['name']; $file['relpathnamelang'] = $langs->trans($file['item']).'/'.$file['name'];
@ -252,15 +271,20 @@ if (($action=="searchfiles" || $action=="dl" )) {
} }
} }
/*
* cleanup of old ZIP
*/
//FIXME
/* /*
*ZIP creation *ZIP creation
*/ */
if ($result && $action == "dl") $dirfortmpfile = ($conf->accounting->dir_temp ? $conf->accounting->dir_temp : $conf->comptabilite->dir_temp);
if (empty($dirfortmpfile))
{
setEventMessages($langs->trans("ErrorNoAccountingModuleEnabled"), null, 'errors');
$error++;
}
if ($result && $action == "dl" && ! $error)
{ {
if (! extension_loaded('zip')) if (! extension_loaded('zip'))
{ {
@ -268,11 +292,9 @@ if ($result && $action == "dl")
exit; exit;
} }
$dirfortmpfile = ($conf->accounting->dir_temp ? $conf->accounting->dir_temp : $conf->compta->dir_temp);
dol_mkdir($dirfortmpfile); dol_mkdir($dirfortmpfile);
$log='date,type,ref,total,paid,filename,item_id'."\n"; $log=$langs->transnoentitiesnoconv("Type").','.$langs->transnoentitiesnoconv("Date").','.$langs->transnoentitiesnoconv("Ref").','.$langs->transnoentitiesnoconv("TotalHT").','.$langs->transnoentitiesnoconv("TotalTTC").','.$langs->transnoentitiesnoconv("TotalVAT").','.$langs->transnoentitiesnoconv("Paid").',filename,item_id,'.$langs->trans("ThirdParty").','.$langs->trans("Code").','.$langs->trans("Country").','.$langs->trans("VATIntra")."\n";
$zipname = $dirfortmpfile.'/'.dol_print_date($date_start, 'dayrfc')."-".dol_print_date($date_stop, 'dayrfc').'_export.zip'; $zipname = $dirfortmpfile.'/'.dol_print_date($date_start, 'dayrfc')."-".dol_print_date($date_stop, 'dayrfc').'_export.zip';
dol_delete_file($zipname); dol_delete_file($zipname);
@ -284,7 +306,7 @@ if ($result && $action == "dl")
foreach ($filesarray as $key => $file) foreach ($filesarray as $key => $file)
{ {
if (file_exists($file["fullname"])) $zip->addFile($file["fullname"], $file["relpathnamelang"]); // 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"; $log.=$file['item'].','.dol_print_date($file['date'], 'dayrfc').','.$file['ref'].','.$file['amount_ht'].','.$file['amount_ttc'].','.$file['amount_vat'].','.$file['paid'].','.$file["name"].','.$file['fk'].','.$file['thirdparty_name'].','.$file['thirdparty_code'].','.$file['country_code'].',"'.$file['vatnum'].'"'."\n";
} }
$zip->addFromString('transactions.csv', $log); $zip->addFromString('transactions.csv', $log);
$zip->close(); $zip->close();
@ -299,6 +321,10 @@ if ($result && $action == "dl")
exit(); exit();
} }
else
{
setEventMessages($langs->trans("FailedToOpenFile", $zipname), null, 'errors');
}
} }
@ -376,14 +402,18 @@ 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, 'class="nowrap"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['type']['label'], $_SERVER["PHP_SELF"], "type", "", $param, '', $sortfield, $sortorder, 'nowrap ');
print '<td>'.$langs->trans("Type").'</td>'; print_liste_field_titre($arrayfields['date']['label'], $_SERVER["PHP_SELF"], "date", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
print '<td>'.$langs->trans("Ref").'</td>'; print '<td>'.$langs->trans("Ref").'</td>';
print '<td>'.$langs->trans("Document").'</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 align="right">'.$langs->trans("TotalHT").'</td>';
print '<td class="right">'.$langs->trans("Credit").'</td>'; print '<td align="right">'.$langs->trans("TotalTTC").'</td>';
print '<td class="right">'.$langs->trans("Balance").'</td>'; print '<td align="right">'.$langs->trans("TotalVAT").'</td>';
print '<td>'.$langs->trans("ThirdParty").'</td>';
print '<td class="center">'.$langs->trans("Code").'</td>';
print '<td class="center">'.$langs->trans("Country").'</td>';
print '<td class="center">'.$langs->trans("VATIntra").'</td>';
print '</tr>'; print '</tr>';
if ($result) if ($result)
{ {
@ -397,18 +427,11 @@ if (!empty($date_start) && !empty($date_stop))
{ {
// Sort array by date ASC to calculate balance // Sort array by date ASC to calculate balance
$totalET = 0;
$totalIT = 0;
$totalVAT = 0;
$totalDebit = 0; $totalDebit = 0;
$totalCredit = 0; $totalCredit = 0;
// Balance calculation
$balance = 0;
foreach($TData as &$data1) {
if ($data1['item']!='Invoice' && $data1['item']!='Donation')
{
$data1['amount']=-$data1['amount'];
}
$balance += $data1['amount'];
$data1['balance'] = $balance;
}
// Display array // Display array
foreach($TData as $data) foreach($TData as $data)
@ -417,11 +440,17 @@ 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>";
// Type
print '<td>'.$langs->trans($data['item']).'</td>';
// Date
print '<td class="center">';
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">'.$data['ref'].'</td>'; // Ref
print '<td aling="left">'.$data['ref'].'</td>';
// File link // File link
print '<td>'; print '<td>';
@ -431,21 +460,59 @@ if (!empty($date_start) && !empty($date_stop))
} }
print "</td>\n"; print "</td>\n";
print '<td class="left">'.$data['paid'].'</td>'; // Paid
print '<td class="right">'.(($data['amount'] > 0) ? price(abs($data['amount'])) : '')."</td>\n"; print '<td aling="left">'.$data['paid'].'</td>';
$totalDebit += ($data['amount'] > 0) ? abs($data['amount']) : 0;
print '<td class="right">'.(($data['amount'] > 0) ? '' : price(abs($data['amount'])))."</td>\n"; // Total ET
$totalCredit += ($data['amount'] > 0) ? 0 : abs($data['amount']); print '<td align="right">'.price($data['amount_ht'])."</td>\n";
// Total IT
print '<td align="right">'.price($data['amount_ttc'])."</td>\n";
// Total VAT
print '<td align="right">'.price($data['amount_vat'])."</td>\n";
print '<td>'.$data['thirdparty_name']."</td>\n";
print '<td class="center">'.$data['thirdparty_code']."</td>\n";
print '<td class="center">'.$data['country_code']."</td>\n";
print '<td align="right">'.$data['vatnum']."</td>\n";
// Debit
//print '<td align="right">'.(($data['amount_ttc'] > 0) ? price(abs($data['amount_ttc'])) : '')."</td>\n";
// Credit
//print '<td align="right">'.(($data['amount_ttc'] > 0) ? '' : price(abs($data['amount_ttc'])))."</td>\n";
$totalET += $data['amount_ht'];
$totalIT += $data['amount_ttc'];
$totalVAT += $data['amount_vat'];
$totalDebit += ($data['amount_ttc'] > 0) ? abs($data['amount_ttc']) : 0;
$totalCredit += ($data['amount_ttc'] > 0) ? 0 : abs($data['amount_ttc']);
// Balance // Balance
print '<td class="right">'.price($data['balance'])."</td>\n"; //print '<td align="right">'.price($data['balance'])."</td>\n";
print "</tr>\n"; print "</tr>\n";
} }
print '<tr class="liste_total">'; print '<tr class="liste_total">';
print '<td colspan="5">&nbsp;</td>'; print '<td></td>';
print '<td class="right">'.price($totalDebit).'</td>'; print '<td></td>';
print '<td class="right">'.price($totalCredit).'</td>'; print '<td></td>';
print '<td class="right">'.price(price2num($totalDebit - $totalCredit, 'MT')).'</td>'; print '<td></td>';
print '<td></td>';
print '<td align="right">'.price($totalET).'</td>';
print '<td align="right">'.price($totalIT).'</td>';
print '<td align="right">'.price($totalVAT).'</td>';
print '<td></td>';
print '<td></td>';
print '<td></td>';
print '<td></td>';
/*print '<td align="right">'.price($totalDebit).'</td>';
print '<td align="right">'.price($totalCredit).'</td>';
print '<td align="right">'.price(price2num($totalDebit - $totalCredit, 'MT')).'</td>';
*/
print "</tr>\n"; print "</tr>\n";
} }
} }
@ -453,5 +520,6 @@ if (!empty($date_start) && !empty($date_stop))
print '</div>'; print '</div>';
} }
llxFooter(); llxFooter();
$db->close(); $db->close();

View File

@ -60,6 +60,8 @@ CREATE TABLE llx_pos_cash_fence(
-- For 10.0 -- For 10.0
UPDATE llx_chargesociales SET date_creation = tms WHERE date_creation IS NULL;
DROP TABLE llx_cotisation; DROP TABLE llx_cotisation;
ALTER TABLE llx_accounting_bookkeeping DROP COLUMN validated; ALTER TABLE llx_accounting_bookkeeping DROP COLUMN validated;
ALTER TABLE llx_accounting_bookkeeping_tmp DROP COLUMN validated; ALTER TABLE llx_accounting_bookkeeping_tmp DROP COLUMN validated;

View File

@ -400,6 +400,7 @@ ALTER TABLE llx_accounting_account ADD UNIQUE INDEX uk_accounting_account (accou
-- p.tva_tx = 0 -- p.tva_tx = 0
-- where price = 17.5 -- where price = 17.5
UPDATE llx_chargesociales SET date_creation = tms WHERE date_creation IS NULL;
-- VMYSQL4.1 SET sql_mode = 'ALLOW_INVALID_DATES'; -- VMYSQL4.1 SET sql_mode = 'ALLOW_INVALID_DATES';
-- VMYSQL4.1 update llx_accounting_account set tms = datec where DATE(STR_TO_DATE(tms, '%Y-%m-%d')) IS NULL; -- VMYSQL4.1 update llx_accounting_account set tms = datec where DATE(STR_TO_DATE(tms, '%Y-%m-%d')) IS NULL;

View File

@ -173,7 +173,7 @@ if (! empty($conf->projet->enabled)) $tmparray['projet/index.php?mainmenu=projec
if (! empty($conf->holiday->enabled) || ! empty($conf->expensereport->enabled)) $tmparray['hrm/index.php?mainmenu=hrm&leftmenu=']='HRMArea'; // TODO Complete list with first level of menus if (! empty($conf->holiday->enabled) || ! empty($conf->expensereport->enabled)) $tmparray['hrm/index.php?mainmenu=hrm&leftmenu=']='HRMArea'; // TODO Complete list with first level of menus
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) $tmparray['product/index.php?mainmenu=products&leftmenu=']='ProductsAndServicesArea'; if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) $tmparray['product/index.php?mainmenu=products&leftmenu=']='ProductsAndServicesArea';
if (! empty($conf->propal->enabled) || ! empty($conf->commande->enabled) || ! empty($conf->ficheinter->enabled) || ! empty($conf->contrat->enabled)) $tmparray['comm/index.php?mainmenu=commercial&leftmenu=']='CommercialArea'; if (! empty($conf->propal->enabled) || ! empty($conf->commande->enabled) || ! empty($conf->ficheinter->enabled) || ! empty($conf->contrat->enabled)) $tmparray['comm/index.php?mainmenu=commercial&leftmenu=']='CommercialArea';
if (! empty($conf->compta->enabled) || ! empty($conf->accounting->enabled)) $tmparray['compta/index.php?mainmenu=compta&leftmenu=']='AccountancyTreasuryArea'; if (! empty($conf->comptabilite->enabled) || ! empty($conf->accounting->enabled)) $tmparray['compta/index.php?mainmenu=compta&leftmenu=']='AccountancyTreasuryArea';
if (! empty($conf->adherent->enabled)) $tmparray['adherents/index.php?mainmenu=members&leftmenu=']='MembersArea'; if (! empty($conf->adherent->enabled)) $tmparray['adherents/index.php?mainmenu=members&leftmenu=']='MembersArea';
if (! empty($conf->agenda->enabled)) $tmparray['comm/action/index.php?mainmenu=agenda&leftmenu=']='Agenda'; if (! empty($conf->agenda->enabled)) $tmparray['comm/action/index.php?mainmenu=agenda&leftmenu=']='Agenda';