Merge remote-tracking branch 'refs/remotes/Dolibarr/3.9' into 3.9
This commit is contained in:
commit
8b275c6e5c
41
ChangeLog
41
ChangeLog
@ -12,6 +12,47 @@ Upgrading to any other version or any other database system is abolutely require
|
||||
make a Dolibarr upgrade.
|
||||
|
||||
|
||||
|
||||
***** ChangeLog for 3.9.2 compared to 3.9.1 *****
|
||||
FIX: #4813 Won translation for the key OppStatusWON instead OppStatusWIN
|
||||
FIX: #5008 SQL error when editing the reference of a supplier invoice that already exists
|
||||
FIX: #5236 Cron module activated but "Modules tools" does not appear in the left menu.
|
||||
FIX: Accountancy - 3.9 - Chart of accounts are limited on only one country
|
||||
FIX: bug on email template
|
||||
FIX: Can't create a stock transfer from product card
|
||||
FIX: can't fetch by siret or siren because of first "if"
|
||||
FIX: Check stock of product by warehouse if $entrepot_id defined on shippings
|
||||
FIX: Compatible with multicompany
|
||||
FIX: Creation of the second ressource type fails.
|
||||
FIX: end of select when no fournprice
|
||||
FIX: Filter on assigned to was preselected on current user on list "All events" (instead of no filtering)
|
||||
FIX: Filter on category tag for suppliers
|
||||
FIX: hook on group card called but not initialized
|
||||
FIX: Infinite loop on menu tree output for edition
|
||||
FIX: Can show tree of entries added by external modules using fk_mainmenu and fk_leftmenu instead of fk_menu.
|
||||
FIX: init var at wrong place report incorrect "shippable" flag on draft order.
|
||||
FIX: It doesn't check if there is enough stock to update the lines of orders/invoices
|
||||
FIX: Menu statistics was not visible if module proposal was not enabled
|
||||
FIX: Merge manually PR #5161 - Bad translation key
|
||||
FIX: missing column when module was installed before standard integration
|
||||
FIX: Missing number total of modules
|
||||
FIX: Not filtering correctly when coming from dashboard
|
||||
FIX: PROPAL_MERGE_PDF with PRODUCT_USE_OLD_PATH
|
||||
FIX: Remove PHP Warning: Creating default object from empty value.
|
||||
FIX: same page added several times on mergepropal option
|
||||
FIX: search on date into supplier invoice list dont work because of status -1
|
||||
FIX: Search supplier ref on contract
|
||||
FIX: Split of credit note into discount page generates records not correctly recognised as credit note.
|
||||
FIX: SQL error function on getAvailableDiscounts function, on bill create mode if socid is empty
|
||||
FIX: #5087
|
||||
FIX: #5108
|
||||
FIX: #5163
|
||||
FIX: #5195
|
||||
FIX: #5203
|
||||
FIX: #5207
|
||||
FIX: #5209
|
||||
FIX: #5230
|
||||
|
||||
***** ChangeLog for 3.9.1 compared to 3.9.* *****
|
||||
FIX: #3815 Call to undefined function local_by_date()
|
||||
FIX: #4424 Missing email of user popup in supplier orders area
|
||||
|
||||
@ -379,7 +379,7 @@ if ($nboftargetok) {
|
||||
|
||||
print 'Run git tag -a -m "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'" "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'"'."\n";
|
||||
$ret=`git tag -a -m "$MAJOR.$MINOR.$BUILD" "$MAJOR.$MINOR.$BUILD" 2>&1`;
|
||||
if ($ret =~ /already exists/)
|
||||
if ($ret =~ /(already exists|existe déjà)/)
|
||||
{
|
||||
print "WARNING: Tag ".$MAJOR.'.'.$MINOR.'.'.$BUILD." already exists. Overwrite (y/N) ? ";
|
||||
$QUESTIONOVERWRITETAG=<STDIN>;
|
||||
|
||||
@ -43,7 +43,9 @@ $search_pcgtype = GETPOST("search_pcgtype");
|
||||
$search_pcgsubtype = GETPOST("search_pcgsubtype");
|
||||
|
||||
// Security check
|
||||
if (! $user->admin)
|
||||
if ($user->societe_id > 0)
|
||||
accessforbidden();
|
||||
if (! $user->rights->accounting->chartofaccount)
|
||||
accessforbidden();
|
||||
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
/* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
*
|
||||
* 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
|
||||
@ -30,12 +30,15 @@ $action = GETPOST('action');
|
||||
$langs->load("admin");
|
||||
$langs->load("compta");
|
||||
|
||||
if (! $user->admin)
|
||||
// Security check
|
||||
if ($user->societe_id > 0)
|
||||
accessforbidden();
|
||||
if (! $user->rights->accounting->fiscalyear)
|
||||
accessforbidden();
|
||||
|
||||
$error = 0;
|
||||
|
||||
// List of statut
|
||||
// List of status
|
||||
static $tmpstatut2label = array (
|
||||
'0' => 'OpenFiscalYear',
|
||||
'1' => 'CloseFiscalYear'
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
@ -202,10 +202,9 @@ print "<td>" . $langs->trans("Selectchartofaccounts") . "</td>";
|
||||
print "<td>";
|
||||
print '<select class="flat" name="chartofaccounts" id="chartofaccounts">';
|
||||
|
||||
$sql = "SELECT rowid, pcg_version, fk_pays, label, active";
|
||||
$sql = "SELECT rowid, pcg_version, label, active";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_system";
|
||||
$sql .= " WHERE active = 1";
|
||||
$sql .= " AND fk_pays = " . $mysoc->country_id;
|
||||
|
||||
dol_syslog('accountancy/admin/index.php:: $sql=' . $sql);
|
||||
$resql = $db->query($sql);
|
||||
@ -221,7 +220,7 @@ if ($resql) {
|
||||
|
||||
print '<option value="' . $row[0] . '"';
|
||||
print $conf->global->CHARTOFACCOUNTS == $row[0] ? ' selected' : '';
|
||||
print '>' . $row[1] . ' - ' . $row[3] . '</option>';
|
||||
print '>' . $row[1] . ' - ' . $row[2] . '</option>';
|
||||
|
||||
$i ++;
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@ if ($action == 'validatehistory') {
|
||||
$sql1 .= " SET fd.fk_code_ventilation = 0";
|
||||
$sql1 .= ' WHERE fd.fk_code_ventilation NOT IN ';
|
||||
$sql1 .= ' (SELECT accnt.rowid ';
|
||||
$sql1 .= ' FROM ' . MAIN_DB_PREFIX . 'accountingaccount as accnt';
|
||||
$sql1 .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as accnt';
|
||||
$sql1 .= ' INNER JOIN ' . MAIN_DB_PREFIX . 'accounting_system as syst';
|
||||
$sql1 .= ' ON accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=' . $conf->global->CHARTOFACCOUNTS . ')';
|
||||
|
||||
@ -393,4 +393,4 @@ print "</table>\n";
|
||||
print '</td></tr></table>';
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
$db->close();
|
||||
|
||||
@ -1381,17 +1381,12 @@ else
|
||||
print $form->formconfirm("card.php?rowid=".$rowid,$langs->trans("DeleteMember"),$langs->trans("ConfirmDeleteMember"),"confirm_delete",$formquestion,0,1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Confirm add in spip
|
||||
*/
|
||||
// Confirm add in spip
|
||||
if ($action == 'add_spip')
|
||||
{
|
||||
print $form->formconfirm("card.php?rowid=".$rowid, $langs->trans('AddIntoSpip'), $langs->trans('AddIntoSpipConfirmation'), 'confirm_add_spip');
|
||||
}
|
||||
|
||||
/*
|
||||
* Confirm removed from spip
|
||||
*/
|
||||
// Confirm removed from spip
|
||||
if ($action == 'del_spip')
|
||||
{
|
||||
print $form->formconfirm("card.php?rowid=$rowid", $langs->trans('DeleteIntoSpip'), $langs->trans('DeleteIntoSpipConfirmation'), 'confirm_del_spip');
|
||||
@ -1556,8 +1551,16 @@ else
|
||||
}
|
||||
else
|
||||
{
|
||||
print $langs->trans("SubscriptionNotReceived");
|
||||
if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie
|
||||
if (! $adht->cotisation)
|
||||
{
|
||||
print $langs->trans("SubscriptionNotRecorded");
|
||||
if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie
|
||||
}
|
||||
else
|
||||
{
|
||||
print $langs->trans("SubscriptionNotReceived");
|
||||
if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie
|
||||
}
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -722,8 +722,16 @@ if ($rowid > 0)
|
||||
}
|
||||
else
|
||||
{
|
||||
print $langs->trans("SubscriptionNotReceived");
|
||||
if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie
|
||||
if (! $adht->cotisation)
|
||||
{
|
||||
print $langs->trans("SubscriptionNotRecorded");
|
||||
if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie
|
||||
}
|
||||
else
|
||||
{
|
||||
print $langs->trans("SubscriptionNotReceived");
|
||||
if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie
|
||||
}
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -62,21 +62,12 @@ if ($action == 'setcoder')
|
||||
}
|
||||
else if ($action == 'update')
|
||||
{
|
||||
if (GETPOST('submit_GENBARCODE_LOCATION'))
|
||||
{
|
||||
$location = GETPOST('GENBARCODE_LOCATION','alpha');
|
||||
$res = dolibarr_set_const($db, "GENBARCODE_LOCATION",$location,'chaine',0,'',$conf->entity);
|
||||
}
|
||||
if (GETPOST('submit_PRODUIT_DEFAULT_BARCODE_TYPE'))
|
||||
{
|
||||
$coder_id = GETPOST('PRODUIT_DEFAULT_BARCODE_TYPE','alpha');
|
||||
$res = dolibarr_set_const($db, "PRODUIT_DEFAULT_BARCODE_TYPE", $coder_id,'chaine',0,'',$conf->entity);
|
||||
}
|
||||
if (GETPOST('submit_GENBARCODE_BARCODETYPE_THIRDPARTY'))
|
||||
{
|
||||
$coder_id = GETPOST('GENBARCODE_BARCODETYPE_THIRDPARTY','alpha');
|
||||
$res = dolibarr_set_const($db, "GENBARCODE_BARCODETYPE_THIRDPARTY", $coder_id,'chaine',0,'',$conf->entity);
|
||||
}
|
||||
$location = GETPOST('GENBARCODE_LOCATION','alpha');
|
||||
$res = dolibarr_set_const($db, "GENBARCODE_LOCATION",$location,'chaine',0,'',$conf->entity);
|
||||
$coder_id = GETPOST('PRODUIT_DEFAULT_BARCODE_TYPE','alpha');
|
||||
$res = dolibarr_set_const($db, "PRODUIT_DEFAULT_BARCODE_TYPE", $coder_id,'chaine',0,'',$conf->entity);
|
||||
$coder_id = GETPOST('GENBARCODE_BARCODETYPE_THIRDPARTY','alpha');
|
||||
$res = dolibarr_set_const($db, "GENBARCODE_BARCODETYPE_THIRDPARTY", $coder_id,'chaine',0,'',$conf->entity);
|
||||
}
|
||||
else if ($action == 'updateengine')
|
||||
{
|
||||
@ -195,9 +186,9 @@ $var=true;
|
||||
print '<br>';
|
||||
print load_fiche_titre($langs->trans("BarcodeEncodeModule"),'','');
|
||||
|
||||
print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"updateengine\">";
|
||||
//print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
|
||||
//print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
//print "<input type=\"hidden\" name=\"action\" value=\"updateengine\">";
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
@ -261,7 +252,7 @@ if ($resql)
|
||||
// Build barcode on disk (not used, this is done to make debug easier)
|
||||
$result=$module->writeBarCode($obj->example,$obj->encoding,'Y');
|
||||
// Generate on the fly and output barcode with generator
|
||||
$url=DOL_URL_ROOT.'/viewimage.php?modulepart=barcode&generator='.urlencode($obj->coder).'&code='.urlencode($obj->example).'&encoding='.urlencode($obj->encoding);
|
||||
$url=DOL_URL_ROOT.'/viewimage.php?modulepart=barcode&generator='.urlencode($obj->coder).'&code='.urlencode($obj->example).'&encoding='.urlencode($obj->encoding);
|
||||
//print $url;
|
||||
print '<img src="'.$url.'" title="'.$obj->example.'" border="0">';
|
||||
}
|
||||
@ -296,7 +287,7 @@ if (empty($conf->use_javascript_ajax))
|
||||
// TODO Implement code behind action updateengine
|
||||
//print '<div class="center"><input type="submit" class="button" name="save" value="'.$langs->trans("Save").'"></div>';
|
||||
}
|
||||
print '</form>';
|
||||
//print '</form>';
|
||||
|
||||
print "<br>";
|
||||
|
||||
@ -331,9 +322,7 @@ if (! isset($_SERVER['WINDIR']))
|
||||
$langs->load("errors");
|
||||
print '<br><font class="error">'.$langs->trans("ErrorFileNotFound",$conf->global->GENBARCODE_LOCATION).'</font>';
|
||||
}
|
||||
print '</td>';
|
||||
print '<td width="60" align="center"><input type="submit" class="button" name="submit_GENBARCODE_LOCATION" value="'.$langs->trans("Modify").'"></td>';
|
||||
print '</tr>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Module products
|
||||
@ -344,10 +333,7 @@ if (! empty($conf->product->enabled))
|
||||
print '<td>'.$langs->trans("SetDefaultBarcodeTypeProducts").'</td>';
|
||||
print '<td width="60" align="right">';
|
||||
$formbarcode->select_barcode_type($conf->global->PRODUIT_DEFAULT_BARCODE_TYPE,"PRODUIT_DEFAULT_BARCODE_TYPE",1);
|
||||
print '</td><td align="right">';
|
||||
print '<input type="submit" class="button" name="submit_PRODUIT_DEFAULT_BARCODE_TYPE" value="'.$langs->trans("Modify").'">';
|
||||
print "</td>";
|
||||
print '</tr>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Module thirdparty
|
||||
@ -358,13 +344,13 @@ if (! empty($conf->societe->enabled))
|
||||
print '<td>'.$langs->trans("SetDefaultBarcodeTypeThirdParties").'</td>';
|
||||
print '<td width="60" align="right">';
|
||||
print $formbarcode->select_barcode_type($conf->global->GENBARCODE_BARCODETYPE_THIRDPARTY,"GENBARCODE_BARCODETYPE_THIRDPARTY",1);
|
||||
print '</td><td align="right">';
|
||||
print '<input type="submit" class="button" name="submit_GENBARCODE_BARCODETYPE_THIRDPARTY" value="'.$langs->trans("Modify").'">';
|
||||
print "</td>";
|
||||
print '</tr>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print "</table>\n";
|
||||
print '<div class="tabsAction">';
|
||||
print '<input type="submit" class="button" name="submit_GENBARCODE_BARCODETYPE_THIRDPARTY" value="'.$langs->trans("Modify").'">';
|
||||
print "</div>";
|
||||
print '</form>';
|
||||
|
||||
print '<br>';
|
||||
@ -419,13 +405,13 @@ if ($conf->produit->enabled)
|
||||
|
||||
if ($conf->global->BARCODE_PRODUCT_ADDON_NUM == "$file")
|
||||
{
|
||||
print '<td align="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproductoff&value='.$file.'">';
|
||||
print '<td align="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproductoff&value='.$file.'">';
|
||||
print img_picto($langs->trans("Activated"),'switch_on');
|
||||
print '</a></td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproducton&value='.$file.'">';
|
||||
print '<td align="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setbarcodeproducton&value='.$file.'">';
|
||||
print img_picto($langs->trans("Disabled"),'switch_off');
|
||||
print '</a></td>';
|
||||
}
|
||||
@ -442,7 +428,7 @@ if ($conf->produit->enabled)
|
||||
print "</table>\n";
|
||||
}
|
||||
|
||||
print '</form>';
|
||||
//print '</form>';
|
||||
|
||||
print "<br>";
|
||||
|
||||
|
||||
@ -271,7 +271,7 @@ if ($action == 'create')
|
||||
</script>';
|
||||
|
||||
print load_fiche_titre($langs->trans("NewMenu"),'','title_setup');
|
||||
|
||||
|
||||
print '<form action="./edit.php?action=add&menuId='.$_GET['menuId'].'" method="post" name="formmenucreate">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
|
||||
@ -281,7 +281,7 @@ if ($action == 'create')
|
||||
$parent_rowid = $_GET['menuId'];
|
||||
if ($_GET['menuId'])
|
||||
{
|
||||
$sql = "SELECT m.rowid, m.mainmenu, m.level, m.langs FROM ".MAIN_DB_PREFIX."menu as m WHERE m.rowid = ".$_GET['menuId'];
|
||||
$sql = "SELECT m.rowid, m.mainmenu, m.leftmenu, m.level, m.langs FROM ".MAIN_DB_PREFIX."menu as m WHERE m.rowid = ".$_GET['menuId'];
|
||||
$res = $db->query($sql);
|
||||
if ($res)
|
||||
{
|
||||
@ -290,6 +290,7 @@ if ($action == 'create')
|
||||
{
|
||||
$parent_rowid = $menu['rowid'];
|
||||
$parent_mainmenu = $menu['mainmenu'];
|
||||
$parent_leftmenu = $menu['leftmenu'];
|
||||
$parent_langs = $menu['langs'];
|
||||
$parent_level = $menu['level'];
|
||||
}
|
||||
@ -340,7 +341,9 @@ if ($action == 'create')
|
||||
{
|
||||
print '<td><input type="text" size="20" id="menuId" name="menuId" value="'.($_POST["menuId"]?$_POST["menuId"]:'').'"></td>';
|
||||
}
|
||||
print '<td>'.$langs->trans('DetailMenuIdParent').'</td></tr>';
|
||||
print '<td>'.$langs->trans('DetailMenuIdParent');
|
||||
print ', '.$langs->trans("Example").': fk_mainmenu=abc&fk_leftmenu=def';
|
||||
print '</td></tr>';
|
||||
|
||||
// Title
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('Title').'</td><td><input type="text" size="30" name="titre" value="'.$_POST["titre"].'"></td><td>'.$langs->trans('DetailTitre').'</td></tr>';
|
||||
@ -418,7 +421,12 @@ elseif ($action == 'edit')
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('MenuIdParent').'</td>';
|
||||
//$menu_handler
|
||||
//print '<td><input type="text" size="50" name="handler" value="all"></td>';
|
||||
print '<td>'.$menu->fk_menu.'</td>';
|
||||
print '<td>';
|
||||
$valtouse=$menu->fk_menu;
|
||||
if ($menu->fk_mainmenu) $valtouse='fk_mainmenu='.$menu->fk_mainmenu;
|
||||
if ($menu->fk_leftmenu) $valtouse.='&fk_leftmenu='.$menu->fk_leftmenu;
|
||||
print $valtouse;
|
||||
print '</td>';
|
||||
print '<td>'.$langs->trans('DetailMenuIdParent').'</td></tr>';
|
||||
|
||||
// Niveau
|
||||
|
||||
@ -289,17 +289,18 @@ if ($conf->use_javascript_ajax)
|
||||
- la chaine a afficher
|
||||
ie: data[]= array (index, index parent, chaine )
|
||||
*/
|
||||
|
||||
//il faut d'abord declarer un element racine de l'arbre
|
||||
|
||||
$data[] = array('rowid'=>0,'fk_menu'=>-1,'title'=>"racine",'mainmenu'=>'','leftmenu'=>'','fk_mainmenu'=>'','fk_leftmenu'=>'');
|
||||
|
||||
$data[] = array('rowid'=>0,'fk_menu'=>-1,'title'=>"racine",'mainmenu'=>'','leftmenu'=>'','fk_mainmenu'=>'','fk_leftmenu'=>'');
|
||||
|
||||
//puis tous les elements enfants
|
||||
|
||||
$sql = "SELECT m.rowid, m.titre, m.langs, m.mainmenu, m.leftmenu, m.fk_menu, m.fk_mainmenu, m.fk_leftmenu";
|
||||
$sql = "SELECT m.rowid, m.titre, m.langs, m.mainmenu, m.leftmenu, m.fk_menu, m.fk_mainmenu, m.fk_leftmenu, m.module";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."menu as m";
|
||||
$sql.= " WHERE menu_handler = '".$menu_handler_to_search."'";
|
||||
$sql.= " AND entity = ".$conf->entity;
|
||||
$sql.= " AND fk_menu >= 0";
|
||||
//$sql.= " AND fk_menu >= 0";
|
||||
$sql.= " ORDER BY m.position, m.rowid"; // Order is position then rowid (because we need a sort criteria when position is same)
|
||||
|
||||
$res = $db->query($sql);
|
||||
@ -314,9 +315,10 @@ if ($conf->use_javascript_ajax)
|
||||
$titre = $langs->trans($menu['titre']);
|
||||
$data[] = array(
|
||||
'rowid'=>$menu['rowid'],
|
||||
'module'=>$menu['module'],
|
||||
'fk_menu'=>$menu['fk_menu'],
|
||||
'title'=>$titre,
|
||||
'mainmenu'=>$menu['mainmenu'],
|
||||
'mainmenu'=>$menu['mainmenu'],
|
||||
'leftmenu'=>$menu['leftmenu'],
|
||||
'fk_mainmenu'=>$menu['fk_mainmenu'],
|
||||
'fk_leftmenu'=>$menu['fk_leftmenu'],
|
||||
@ -334,17 +336,54 @@ if ($conf->use_javascript_ajax)
|
||||
}
|
||||
}
|
||||
|
||||
global $tree_recur_alreadyadded; // This var was def into tree_recur
|
||||
|
||||
// Appelle de la fonction recursive (ammorce)
|
||||
// avec recherche depuis la racine.
|
||||
//var_dump($data);
|
||||
tree_recur($data,$data[0],0);
|
||||
tree_recur($data, $data[0], 0, 'iddivjstree'); // $data[0] is virtual record 'racine'
|
||||
|
||||
|
||||
print '</td>';
|
||||
|
||||
|
||||
print '</tr>';
|
||||
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
|
||||
// Process remaining records (records that are not linked to root by any path)
|
||||
$remainingdata = array();
|
||||
foreach($data as $datar)
|
||||
{
|
||||
if (empty($datar['rowid']) || $tree_recur_alreadyadded[$datar['rowid']]) continue;
|
||||
$remainingdata[] = $datar;
|
||||
}
|
||||
|
||||
if (count($remainingdata))
|
||||
{
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("NotTopTreeMenuPersonalized").'</td>';
|
||||
print '<td align="right"></td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr>';
|
||||
print '<td colspan="2">';
|
||||
|
||||
foreach($remainingdata as $datar)
|
||||
{
|
||||
$father = array('rowid'=>$datar['rowid'],'title'=>"???",'mainmenu'=>$datar['fk_mainmenu'],'leftmenu'=>$datar['fk_leftmenu'],'fk_mainmenu'=>'','fk_leftmenu'=>'');
|
||||
//print 'Start with rowid='.$datar['rowid'].' mainmenu='.$father ['mainmenu'].' leftmenu='.$father ['leftmenu'].'<br>'."\n";
|
||||
tree_recur($data, $father, 0, 'iddivjstree'.$datar['rowid'], 1, 1);
|
||||
}
|
||||
|
||||
print '</td>';
|
||||
|
||||
print '</tr>';
|
||||
|
||||
print '</table>';
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
|
||||
|
||||
@ -223,7 +223,7 @@ asort($orders);
|
||||
//var_dump($modules);
|
||||
|
||||
$nbofactivatedmodules=count($conf->modules);
|
||||
$moreinfo=$langs->trans("TotalNumberOfActivatedModules",($nbofactivatedmodules-1));
|
||||
$moreinfo=$langs->trans("TotalNumberOfActivatedModules",($nbofactivatedmodules-1), count($modules));
|
||||
if ($nbofactivatedmodules <= 1) $moreinfo .= ' '.img_warning($langs->trans("YouMustEnableOneModule"));
|
||||
print load_fiche_titre($langs->trans("ModulesSetup"),$moreinfo,'title_setup');
|
||||
|
||||
|
||||
@ -1173,7 +1173,7 @@ if ($id > 0)
|
||||
// Clone event
|
||||
if($action == 'clone')
|
||||
{
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . GETPOST('id'), $langs->trans('CloneAction'), $langs->trans('ConfirmCloneAction', $object->label), 'confirm_clone', $formquestion, 'yes', 1);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . GETPOST('id'), $langs->trans('CloneAction'), $langs->trans('ConfirmCloneEvent', $object->label), 'confirm_clone', $formquestion, 'yes', 1);
|
||||
|
||||
print $formconfirm;
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ $filtert = GETPOST("usertodo","int",3)?GETPOST("usertodo","int",3):GETPOST("filt
|
||||
$usergroup = GETPOST("usergroup","int",3);
|
||||
$showbirthday = empty($conf->use_javascript_ajax)?GETPOST("showbirthday","int"):1;
|
||||
|
||||
// If not choice done on calendar owner, we filter on user.
|
||||
// If not choice done on calendar owner (like on left menu link "Agenda"), we filter on user.
|
||||
if (empty($filtert) && empty($conf->global->AGENDA_ALL_CALENDARS))
|
||||
{
|
||||
$filtert=$user->id;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2003 Eric Seigne <erics@rycks.com>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -210,7 +210,7 @@ if ($status == 'todo') { $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (
|
||||
if ($filtert > 0 || $usergroup > 0)
|
||||
{
|
||||
$sql.= " AND (";
|
||||
if ($filtert > 0) $sql.= "(ar.fk_element = ".$filtert." OR a.fk_user_action=".$filtert.")";
|
||||
if ($filtert > 0) $sql.= "(ar.fk_element = ".$filtert." OR (ar.fk_element IS NULL AND a.fk_user_action=".$filtert."))"; // The OR is for backward compatibility
|
||||
if ($usergroup > 0) $sql.= ($filtert>0?" OR ":"")." ugu.fk_usergroup = ".$usergroup;
|
||||
$sql.= ")";
|
||||
}
|
||||
@ -350,7 +350,7 @@ if ($resql)
|
||||
$actionstatic->type_code=$obj->type_code;
|
||||
$actionstatic->type_label=$obj->type_label;
|
||||
$actionstatic->label=$obj->label;
|
||||
print $actionstatic->getNomUrl(1,28);
|
||||
print $actionstatic->getNomUrl(1,36);
|
||||
print '</td>';
|
||||
|
||||
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
||||
|
||||
@ -562,15 +562,6 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
// Reopen proposal
|
||||
else if ($action == 'confirm_reopen' && $user->rights->propal->cloturer && ! GETPOST('cancel'))
|
||||
{
|
||||
// prevent browser refresh from reopening proposal several times
|
||||
if ($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED) {
|
||||
$object->reopen($user, 1);
|
||||
}
|
||||
}
|
||||
|
||||
// Close proposal
|
||||
else if ($action == 'setstatut' && $user->rights->propal->cloturer && ! GETPOST('cancel'))
|
||||
{
|
||||
@ -591,17 +582,6 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
// Classify billed
|
||||
else if ($action == 'classifybilled' && $user->rights->propal->cloturer)
|
||||
{
|
||||
$result=$object->cloture($user, 4, '');
|
||||
if ($result < 0)
|
||||
{
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
// Reopen proposal
|
||||
else if ($action == 'confirm_reopen' && $user->rights->propal->cloturer && ! GETPOST('cancel'))
|
||||
{
|
||||
@ -617,20 +597,6 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
// Close proposal
|
||||
else if ($action == 'setstatut' && $user->rights->propal->cloturer && ! GETPOST('cancel'))
|
||||
{
|
||||
if (! GETPOST('statut')) {
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CloseAs")), null, 'errors');
|
||||
$action = 'statut';
|
||||
} else {
|
||||
// prevent browser refresh from closing proposal several times
|
||||
if ($object->statut == Propal::STATUS_VALIDATED) {
|
||||
$object->cloture($user, GETPOST('statut'), GETPOST('note'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
|
||||
|
||||
|
||||
|
||||
@ -2505,7 +2505,7 @@ class Propal extends CommonObject
|
||||
$response = new WorkboardResponse();
|
||||
$response->warning_delay = $delay_warning/60/60/24;
|
||||
$response->label = $label;
|
||||
$response->url = DOL_URL_ROOT.'/comm/propal/list.php?viewstatut='.$statut;
|
||||
$response->url = DOL_URL_ROOT.'/comm/propal/list.php?viewstatut='.$statut.'&mainmenu=commercial&leftmenu=propals';
|
||||
$response->img = img_object($langs->trans("Propals"),"propal");
|
||||
|
||||
// This assignment in condition is not a bug. It allows walking the results.
|
||||
|
||||
@ -341,22 +341,22 @@ if ($socid > 0)
|
||||
$var = !$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td>'.dol_print_date($db->jdate($obj->dc),'dayhour').'</td>';
|
||||
if ($obj->description == '(CREDIT_NOTE)')
|
||||
if (preg_match('/\(CREDIT_NOTE\)/',$obj->description))
|
||||
{
|
||||
print '<td class="nowrap">';
|
||||
$facturestatic->id=$obj->fk_facture_source;
|
||||
$facturestatic->ref=$obj->ref;
|
||||
$facturestatic->type=$obj->type;
|
||||
print $langs->trans("CreditNote").' '.$facturestatic->getNomURl(1);
|
||||
print preg_replace('/\(CREDIT_NOTE\)/',$langs->trans("CreditNote"),$obj->description).' '.$facturestatic->getNomURl(1);
|
||||
print '</td>';
|
||||
}
|
||||
elseif ($obj->description == '(DEPOSIT)')
|
||||
elseif (preg_match('/\(DEPOSIT\)/',$obj->description))
|
||||
{
|
||||
print '<td class="nowrap">';
|
||||
$facturestatic->id=$obj->fk_facture_source;
|
||||
$facturestatic->ref=$obj->ref;
|
||||
$facturestatic->type=$obj->type;
|
||||
print $langs->trans("InvoiceDeposit").' '.$facturestatic->getNomURl(1);
|
||||
print preg_replace('/\(DEPOSIT\)/',$langs->trans("InvoiceDeposit"),$obj->description).' '.$facturestatic->getNomURl(1);
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
@ -500,22 +500,22 @@ if ($socid > 0)
|
||||
$var = !$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td>'.dol_print_date($db->jdate($obj->dc),'dayhour').'</td>';
|
||||
if ($obj->description == '(CREDIT_NOTE)')
|
||||
if (preg_match('/\(CREDIT_NOTE\)/',$obj->description))
|
||||
{
|
||||
print '<td class="nowrap">';
|
||||
$facturestatic->id=$obj->fk_facture_source;
|
||||
$facturestatic->ref=$obj->ref;
|
||||
$facturestatic->type=$obj->type;
|
||||
print $langs->trans("CreditNote").' '.$facturestatic->getNomURl(1);
|
||||
print preg_replace('/\(CREDIT_NOTE\)/',$langs->trans("CreditNote"),$obj->description).' '.$facturestatic->getNomURl(1);
|
||||
print '</td>';
|
||||
}
|
||||
elseif ($obj->description == '(DEPOSIT)')
|
||||
elseif (preg_match('/\(DEPOSIT\)/',$obj->description))
|
||||
{
|
||||
print '<td class="nowrap">';
|
||||
$facturestatic->id=$obj->fk_facture_source;
|
||||
$facturestatic->ref=$obj->ref;
|
||||
$facturestatic->type=$obj->type;
|
||||
print $langs->trans("InvoiceDeposit").' '.$facturestatic->getNomURl(1);
|
||||
print preg_replace('/\(DEPOSIT\)/',$langs->trans("InvoiceDeposit"),$obj->description).' '.$facturestatic->getNomURl(1);
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
|
||||
@ -445,7 +445,15 @@ if (empty($reshook))
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'classifyunbilled' && $user->rights->commande->creer)
|
||||
{
|
||||
$ret=$object->classifyUnBilled();
|
||||
|
||||
if ($ret < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
// Positionne ref commande client
|
||||
else if ($action == 'set_ref_client' && $user->rights->commande->creer) {
|
||||
$object->set_ref_client($user, GETPOST('ref_client'));
|
||||
@ -1900,8 +1908,8 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
// invoice
|
||||
$filtercreditnote = "fk_facture_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
|
||||
} else {
|
||||
$filterabsolutediscount = "fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND description='(DEPOSIT)')";
|
||||
$filtercreditnote = "fk_facture_source IS NOT NULL AND description <> '(DEPOSIT)'";
|
||||
$filterabsolutediscount = "fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND description LIKE '(DEPOSIT)%')";
|
||||
$filtercreditnote = "fk_facture_source IS NOT NULL AND description NOT LIKE '(DEPOSIT)%'";
|
||||
}
|
||||
|
||||
// Relative and absolute discounts
|
||||
@ -2373,7 +2381,11 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=classifybilled">' . $langs->trans("ClassifyBilled") . '</a></div>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($object->statut > Commande::STATUS_DRAFT && $object->billed) {
|
||||
if ($user->rights->commande->creer && $object->statut >= Commande::STATUS_VALIDATED && empty($conf->global->WORKFLOW_DISABLE_CLASSIFY_BILLED_FROM_ORDER) && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)) {
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=classifyunbilled">' . $langs->trans("ClassifyUnBilled") . '</a></div>';
|
||||
}
|
||||
}
|
||||
// Clone
|
||||
if ($user->rights->commande->creer) {
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&socid=' . $object->socid . '&action=clone&object=order">' . $langs->trans("ToClone") . '</a></div>';
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
* 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
|
||||
@ -2419,7 +2420,57 @@ class Commande extends CommonOrder
|
||||
return $this->classifyBilled();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Classify the order as not invoiced
|
||||
*
|
||||
* @return int <0 if ko, >0 if ok
|
||||
*/
|
||||
function classifyUnBilled()
|
||||
{
|
||||
global $conf, $user, $langs;
|
||||
$error = 0;
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'commande SET facture = 0';
|
||||
$sql.= ' WHERE rowid = '.$this->id.' AND fk_statut > '.self::STATUS_DRAFT;
|
||||
|
||||
dol_syslog(get_class($this)."::classifyUnBilled", LOG_DEBUG);
|
||||
if ($this->db->query($sql))
|
||||
{
|
||||
// Call trigger
|
||||
$result=$this->call_trigger('ORDER_CLASSIFY_UNBILLED',$user);
|
||||
if ($result < 0) $error++;
|
||||
// End call triggers
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$this->facturee=0; // deprecated
|
||||
$this->billed=0;
|
||||
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach($this->errors as $errmsg)
|
||||
{
|
||||
dol_syslog(get_class($this)."::classifyUnBilled ".$errmsg, LOG_ERR);
|
||||
$this->error.=($this->error?', '.$errmsg:$errmsg);
|
||||
}
|
||||
$this->db->rollback();
|
||||
return -1*$error;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$this->db->error();
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Update a line in database
|
||||
*
|
||||
@ -2448,7 +2499,7 @@ class Commande extends CommonOrder
|
||||
*/
|
||||
function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0.0,$txlocaltax2=0.0, $price_base_type='HT', $info_bits=0, $date_start='', $date_end='', $type=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='', $special_code=0, $array_options=0, $fk_unit=null)
|
||||
{
|
||||
global $conf, $mysoc;
|
||||
global $conf, $mysoc, $langs;
|
||||
|
||||
dol_syslog(get_class($this)."::updateline id=$rowid, desc=$desc, pu=$pu, qty=$qty, remise_percent=$remise_percent, txtva=$txtva, txlocaltax1=$txlocaltax1, txlocaltax2=$txlocaltax2, price_base_type=$price_base_type, info_bits=$info_bits, date_start=$date_start, date_end=$date_end, type=$type, fk_parent_line=$fk_parent_line, pa_ht=$pa_ht, special_code=$special_code");
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
||||
@ -2504,6 +2555,26 @@ class Commande extends CommonOrder
|
||||
$line = new OrderLine($this->db);
|
||||
$line->fetch($rowid);
|
||||
|
||||
if (!empty($line->fk_product))
|
||||
{
|
||||
$product=new Product($this->db);
|
||||
$result=$product->fetch($line->fk_product);
|
||||
$product_type=$product->type;
|
||||
|
||||
if (! empty($conf->global->STOCK_MUST_BE_ENOUGH_FOR_ORDER) && $product_type == 0 && $product->stock_reel < $qty)
|
||||
{
|
||||
$this->error=$langs->trans('ErrorStockIsNotEnough');
|
||||
dol_syslog(get_class($this)."::addline error=Product ".$product->ref.": ".$this->error, LOG_ERR);
|
||||
$this->db->rollback();
|
||||
unset($_POST['productid']);
|
||||
unset($_POST['tva_tx']);
|
||||
unset($_POST['price_ht']);
|
||||
unset($_POST['qty']);
|
||||
unset($_POST['buying_price']);
|
||||
return self::STOCK_NOT_ENOUGH_FOR_ORDER;
|
||||
}
|
||||
}
|
||||
|
||||
$staticline = clone $line;
|
||||
|
||||
$line->oldline = $staticline;
|
||||
@ -2854,7 +2925,7 @@ class Commande extends CommonOrder
|
||||
$response = new WorkboardResponse();
|
||||
$response->warning_delay=$conf->commande->client->warning_delay/60/60/24;
|
||||
$response->label=$langs->trans("OrdersToProcess");
|
||||
$response->url=DOL_URL_ROOT.'/commande/list.php?viewstatut=-3';
|
||||
$response->url=DOL_URL_ROOT.'/commande/list.php?viewstatut=-3&mainmenu=commercial&leftmenu=orders';
|
||||
$response->img=img_object($langs->trans("Orders"),"order");
|
||||
|
||||
$generic_commande = new Commande($this->db);
|
||||
|
||||
@ -206,7 +206,7 @@ class CommandeStats extends Stats
|
||||
|
||||
$sql = "SELECT product.ref, COUNT(product.ref) as nb, SUM(tl.".$this->field_line.") as total, AVG(tl.".$this->field_line.") as avg";
|
||||
$sql.= " FROM ".$this->from.", ".$this->from_line.", ".MAIN_DB_PREFIX."product as product";
|
||||
//if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE ".$this->where;
|
||||
$sql.= " AND c.rowid = tl.fk_commande AND tl.fk_product = product.rowid";
|
||||
$sql.= " AND c.date_commande BETWEEN '".$this->db->idate(dol_get_first_day($year,1,false))."' AND '".$this->db->idate(dol_get_last_day($year,12,false))."'";
|
||||
|
||||
@ -429,15 +429,15 @@ if ($resql)
|
||||
// Show shippable Icon (create subloop, so may be slow)
|
||||
if ($conf->stock->enabled)
|
||||
{
|
||||
$notshippable=0;
|
||||
$warning = 0;
|
||||
$text_info='';
|
||||
$text_warning='';
|
||||
$nbprod=0;
|
||||
|
||||
$langs->load("stocks");
|
||||
if (($objp->fk_statut > 0) && ($objp->fk_statut < 3))
|
||||
{
|
||||
$notshippable=0;
|
||||
$warning = 0;
|
||||
$text_info='';
|
||||
$text_warning='';
|
||||
$nbprod=0;
|
||||
|
||||
$numlines = count($generic_commande->lines); // Loop on each line of order
|
||||
for ($lig=0; $lig < $numlines; $lig++)
|
||||
{
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
* 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
|
||||
@ -986,6 +987,7 @@ class Account extends CommonObject
|
||||
$sql = "SELECT COUNT(ba.rowid) as nb";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account as ba";
|
||||
$sql.= " WHERE ba.rappro > 0 and ba.clos = 0";
|
||||
$sql.= " AND ba.entity IN (".getEntity('bank_account', 1).")";
|
||||
if (empty($conf->global->BANK_CAN_RECONCILIATE_CASHACCOUNT)) $sql.= " AND ba.courant != 2";
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
|
||||
@ -392,21 +392,22 @@ if (empty($reshook))
|
||||
|
||||
// Check parameters
|
||||
|
||||
// Check for mandatory prof id
|
||||
for($i = 1; $i < 6; $i ++)
|
||||
// Check for mandatory prof id (but only if country is than than ours)
|
||||
if ($mysoc->country_id > 0 && $object->thirdparty->country_id == $mysoc->country_id)
|
||||
{
|
||||
$idprof_mandatory = 'SOCIETE_IDPROF' . ($i) . '_INVOICE_MANDATORY';
|
||||
$idprof = 'idprof' . $i;
|
||||
if (! $object->thirdparty->$idprof && ! empty($conf->global->$idprof_mandatory))
|
||||
{
|
||||
if (! $error)
|
||||
$langs->load("errors");
|
||||
$error ++;
|
||||
|
||||
setEventMessages($langs->trans('ErrorProdIdIsMandatory', $langs->transcountry('ProfId' . $i, $object->thirdparty->country_code)), null, 'errors');
|
||||
}
|
||||
for ($i = 1; $i <= 6; $i++)
|
||||
{
|
||||
$idprof_mandatory = 'SOCIETE_IDPROF' . ($i) . '_INVOICE_MANDATORY';
|
||||
$idprof = 'idprof' . $i;
|
||||
if (! $object->thirdparty->$idprof && ! empty($conf->global->$idprof_mandatory))
|
||||
{
|
||||
if (! $error) $langs->load("errors");
|
||||
$error++;
|
||||
setEventMessages($langs->trans('ErrorProdIdIsMandatory', $langs->transcountry('ProfId' . $i, $object->thirdparty->country_code)), null, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$qualified_for_stock_change = 0;
|
||||
if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
|
||||
$qualified_for_stock_change = $object->hasProductsOrServices(2);
|
||||
@ -1954,7 +1955,7 @@ if ($action == 'create')
|
||||
$dateinvoice = (empty($dateinvoice)?(empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''):$dateinvoice); // Do not set 0 here (0 for a date is 1970)
|
||||
}
|
||||
|
||||
$absolute_discount = $soc->getAvailableDiscounts();
|
||||
if(!empty($soc->id)) $absolute_discount = $soc->getAvailableDiscounts();
|
||||
|
||||
if (! empty($conf->use_javascript_ajax))
|
||||
{
|
||||
@ -2563,8 +2564,8 @@ else if ($id > 0 || ! empty($ref))
|
||||
$filterabsolutediscount = "fk_facture_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
|
||||
$filtercreditnote = "fk_facture_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
|
||||
} else {
|
||||
$filterabsolutediscount = "fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND description='(DEPOSIT)')";
|
||||
$filtercreditnote = "fk_facture_source IS NOT NULL AND description <> '(DEPOSIT)'";
|
||||
$filterabsolutediscount = "fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND description LIKE '(DEPOSIT)%')";
|
||||
$filtercreditnote = "fk_facture_source IS NOT NULL AND description NOT LIKE '(DEPOSIT)%'";
|
||||
}
|
||||
|
||||
$absolute_discount = $soc->getAvailableDiscounts('', $filterabsolutediscount);
|
||||
@ -2982,9 +2983,9 @@ else if ($id > 0 || ! empty($ref))
|
||||
// Remise dispo de type avoir
|
||||
if (! $absolute_discount)
|
||||
print '<br>';
|
||||
// $form->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, 0, 'remise_id_for_payment', $soc->id, $absolute_creditnote,
|
||||
// $filtercreditnote, $resteapayer);
|
||||
$form->form_remise_dispo($_SERVER["PHP_SELF"] . '?facid=' . $object->id, 0, 'remise_id_for_payment', $soc->id, $absolute_creditnote, $filtercreditnote, 0); // We allow credit note even if amount is higher
|
||||
// $form->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, 0, 'remise_id_for_payment', $soc->id, $absolute_creditnote, $filtercreditnote, $resteapayer
|
||||
$more=' ('.$addcreditnote.')';
|
||||
$form->form_remise_dispo($_SERVER["PHP_SELF"] . '?facid=' . $object->id, 0, 'remise_id_for_payment', $soc->id, $absolute_creditnote, $filtercreditnote, 0, $more); // We allow credit note even if amount is higher
|
||||
}
|
||||
}
|
||||
if (! $absolute_discount && ! $absolute_creditnote) {
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
* Copyright (C) 2012-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2013 Cedric Gross <c.gross@kreiz-it.fr>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
* 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
|
||||
@ -2335,6 +2336,19 @@ class Facture extends CommonInvoice
|
||||
$line = new FactureLigne($this->db);
|
||||
$line->fetch($rowid);
|
||||
|
||||
if (!empty($line->fk_product))
|
||||
{
|
||||
$product=new Product($this->db);
|
||||
$result=$product->fetch($line->fk_product);
|
||||
$product_type=$product->type;
|
||||
|
||||
if (! empty($conf->global->STOCK_MUST_BE_ENOUGH_FOR_INVOICE) && $product_type == 0 && $product->stock_reel < $qty) {
|
||||
$this->error=$langs->trans('ErrorStockIsNotEnough');
|
||||
$this->db->rollback();
|
||||
return -3;
|
||||
}
|
||||
}
|
||||
|
||||
$staticline = clone $line;
|
||||
|
||||
$line->oldline = $staticline;
|
||||
@ -3213,7 +3227,7 @@ class Facture extends CommonInvoice
|
||||
$response = new WorkboardResponse();
|
||||
$response->warning_delay=$conf->facture->client->warning_delay/60/60/24;
|
||||
$response->label=$langs->trans("CustomerBillsUnpaid");
|
||||
$response->url=DOL_URL_ROOT.'/compta/facture/list.php?search_status=1';
|
||||
$response->url=DOL_URL_ROOT.'/compta/facture/list.php?search_status=1&mainmenu=accountancy&leftmenu=customers_bills';
|
||||
$response->img=img_object($langs->trans("Bills"),"bill");
|
||||
|
||||
$generic_facture = new Facture($this->db);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2015 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015-2016 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2016 Marcos García <marcosgdf@gmail.com>
|
||||
@ -877,7 +877,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
|
||||
if ($socid) $sql.= " AND ff.fk_soc = ".$socid;
|
||||
$sql.= " GROUP BY ff.rowid, ff.ref, ff.fk_statut, ff.libelle, ff.total_ht, ff.tva, ff.total_tva, ff.total_ttc, ff.paye,";
|
||||
$sql.= " s.nom, s.rowid, s.code_client, s.code_fournisseur";
|
||||
$sql.= " s.nom, s.rowid, s.code_client, s.code_fournisseur, ff.date_lim_reglement";
|
||||
$sql.= " ORDER BY ff.date_lim_reglement ASC";
|
||||
|
||||
$resql=$db->query($sql);
|
||||
|
||||
@ -177,6 +177,8 @@ report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportl
|
||||
|
||||
// SQL request
|
||||
$catotal=0;
|
||||
$catotal_ht=0;
|
||||
$qtytotal=0;
|
||||
|
||||
if ($modecompta == 'CREANCES-DETTES')
|
||||
{
|
||||
@ -386,6 +388,8 @@ if ($modecompta == 'CREANCES-DETTES')
|
||||
// Total
|
||||
print '<tr class="liste_total">';
|
||||
print '<td>'.$langs->trans("Total").'</td>';
|
||||
print '<td align="right">'.price($qtytotal).'</td>';
|
||||
print '<td> </td>';
|
||||
print '<td align="right">'.price($catotal_ht).'</td>';
|
||||
print '<td align="right">'.price($catotal).'</td>';
|
||||
print '<td> </td>';
|
||||
|
||||
@ -326,8 +326,7 @@ if (empty($reshook))
|
||||
$label = $lines[$i]->product_label;
|
||||
}
|
||||
|
||||
if ($conf->global->PRODUIT_DESC_IN_FORM)
|
||||
$desc .= ($lines[$i]->desc && $lines[$i]->desc!=$lines[$i]->libelle)?dol_htmlentitiesbr($lines[$i]->desc):'';
|
||||
$desc .= ($lines[$i]->desc && $lines[$i]->desc!=$lines[$i]->libelle)?dol_htmlentitiesbr($lines[$i]->desc):'';
|
||||
}
|
||||
else {
|
||||
$desc = dol_htmlentitiesbr($lines[$i]->desc);
|
||||
@ -358,7 +357,6 @@ if (empty($reshook))
|
||||
$error++;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1027,7 +1025,7 @@ if ($action == 'create')
|
||||
|
||||
$projectid = (!empty($objectsrc->fk_project)?$objectsrc->fk_project:'');
|
||||
|
||||
$soc = $objectsrc->client;
|
||||
$soc = $objectsrc->thirdparty;
|
||||
|
||||
$note_private = (! empty($objectsrc->note_private) ? $objectsrc->note_private : '');
|
||||
$note_public = (! empty($objectsrc->note_public) ? $objectsrc->note_public : '');
|
||||
|
||||
@ -245,7 +245,7 @@ if ($resql)
|
||||
print '<input type="text" class="flat" size="3" name="search_contract" value="'.dol_escape_htmltag($search_contract).'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre">';
|
||||
print '<input type="text" class="flat" size="6" name="search_ref_customer value="'.dol_escape_htmltag($search_ref_supplier).'">';
|
||||
print '<input type="text" class="flat" size="6" name="search_ref_customer value="'.dol_escape_htmltag($search_ref_customer).'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre">';
|
||||
print '<input type="text" class="flat" size="6" name="search_ref_supplier value="'.dol_escape_htmltag($search_ref_supplier).'">';
|
||||
|
||||
@ -240,7 +240,10 @@ if ($section)
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
|
||||
$useglobalvars=1;
|
||||
$form = new Form($db);
|
||||
$formquestion=array('urlfile'=>array('type'=>'hidden','value'=>$urlfile,'name'=>'urlfile'));
|
||||
$formquestion=array(
|
||||
'urlfile'=>array('type'=>'hidden','value'=>$urlfile,'name'=>'urlfile'),
|
||||
'section'=>array('type'=>'hidden','value'=>$section,'name'=>'section')
|
||||
);
|
||||
print $form->formconfirm($url,$langs->trans("DeleteFile"),$langs->trans("ConfirmDeleteFile"),'confirm_deletefile',$formquestion,"no",($useajax?'deletefile':0));
|
||||
}
|
||||
|
||||
|
||||
@ -4246,7 +4246,7 @@ abstract class CommonObject
|
||||
$productFournisseur = new ProductFournisseur($this->db);
|
||||
if (($result = $productFournisseur->find_min_price_product_fournisseur($fk_product)) > 0)
|
||||
{
|
||||
$buyPrice = $productFournisseur->fourn_price;
|
||||
$buyPrice = $productFournisseur->fourn_unitprice;
|
||||
}
|
||||
else if ($result < 0)
|
||||
{
|
||||
|
||||
@ -1128,8 +1128,8 @@ class Form
|
||||
{
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
$desc=dol_trunc($obj->description,40);
|
||||
if ($desc=='(CREDIT_NOTE)') $desc=$langs->trans("CreditNote");
|
||||
if ($desc=='(DEPOSIT)') $desc=$langs->trans("Deposit");
|
||||
if (preg_match('/\(CREDIT_NOTE\)/', $desc)) $desc=preg_replace('/\(CREDIT_NOTE\)/', $langs->trans("CreditNote"), $desc);
|
||||
if (preg_match('/\(DEPOSIT\)/', $desc)) $desc=preg_replace('/\(DEPOSIT\)/', $langs->trans("Deposit"), $desc);
|
||||
|
||||
$selectstring='';
|
||||
if ($selected > 0 && $selected == $obj->rowid) $selectstring=' selected';
|
||||
@ -2278,7 +2278,7 @@ class Form
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."product as p";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON p.rowid = pfp.fk_product";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON pfp.fk_soc = s.rowid";
|
||||
$sql.= " WHERE p.entity IN (".getEntity('product', 1).")";
|
||||
$sql.= " WHERE p.entity IN (".getEntity('productprice', 1).")";
|
||||
$sql.= " AND p.tobuy = 1";
|
||||
$sql.= " AND s.fournisseur = 1";
|
||||
$sql.= " AND p.rowid = ".$productid;
|
||||
@ -2351,10 +2351,10 @@ class Form
|
||||
$form.= $opt;
|
||||
$i++;
|
||||
}
|
||||
$form.= '</select>';
|
||||
|
||||
$this->db->free($result);
|
||||
}
|
||||
|
||||
$form.= '</select>';
|
||||
$this->db->free($result);
|
||||
return $form;
|
||||
}
|
||||
else
|
||||
@ -3762,7 +3762,7 @@ class Form
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! $filter || $filter=="fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND description='(DEPOSIT)')") print $langs->trans("CompanyHasAbsoluteDiscount",price($amount,0,$langs,0,0,-1,$conf->currency)).': ';
|
||||
if (! $filter || $filter=="fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND description LIKE '(DEPOSIT)%')") print $langs->trans("CompanyHasAbsoluteDiscount",price($amount,0,$langs,0,0,-1,$conf->currency)).': ';
|
||||
else print $langs->trans("CompanyHasCreditNote",price($amount,0,$langs,0,0,-1,$conf->currency)).': ';
|
||||
}
|
||||
$newfilter='fk_facture IS NULL AND fk_facture_line IS NULL'; // Remises disponibles
|
||||
@ -3773,7 +3773,7 @@ class Form
|
||||
if ($nbqualifiedlines > 0)
|
||||
{
|
||||
print ' <input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("UseLine")).'"';
|
||||
if ($filter && $filter != "fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND description='(DEPOSIT)')") print ' title="'.$langs->trans("UseCreditNoteInInvoicePayment").'"';
|
||||
if ($filter && $filter != "fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND description LIKE '(DEPOSIT)%')") print ' title="'.$langs->trans("UseCreditNoteInInvoicePayment").'"';
|
||||
print '>';
|
||||
}
|
||||
if ($more) print $more;
|
||||
|
||||
@ -805,6 +805,7 @@ class FormOther
|
||||
$select_week .= '<option value="'.$key.'">';
|
||||
}
|
||||
$select_week .= $val;
|
||||
$select_week .= '</option>';
|
||||
}
|
||||
$select_week .= '</select>';
|
||||
return $select_week;
|
||||
@ -844,6 +845,7 @@ class FormOther
|
||||
$select_month .= '<option value="'.$key.'">';
|
||||
}
|
||||
$select_month .= $val;
|
||||
$select_month .= '</option>';
|
||||
}
|
||||
$select_month .= '</select>';
|
||||
return $select_month;
|
||||
|
||||
@ -162,68 +162,52 @@ class Ldap
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (! function_exists('ldap_connect'))
|
||||
if (! function_exists("ldap_connect"))
|
||||
{
|
||||
$this->error='Your PHP need extension ldap';
|
||||
$this->error='LDAPFunctionsNotAvailableOnPHP';
|
||||
dol_syslog(get_class($this)."::connect_bind ".$this->error, LOG_WARNING);
|
||||
return -1;
|
||||
$return=-1;
|
||||
}
|
||||
|
||||
// Loop on each ldap server
|
||||
foreach ($this->server as $key => $host)
|
||||
|
||||
if (empty($this->error))
|
||||
{
|
||||
if ($connected) break;
|
||||
if (empty($host)) continue;
|
||||
|
||||
if (preg_match('/^ldap/',$host))
|
||||
// Loop on each ldap server
|
||||
foreach ($this->server as $key => $host)
|
||||
{
|
||||
$this->connection = ldap_connect($host);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->connection = ldap_connect($host,$this->serverPort);
|
||||
}
|
||||
|
||||
if (is_resource($this->connection))
|
||||
{
|
||||
// Begin TLS if requested by the configuration
|
||||
if (! empty($conf->global->LDAP_SERVER_USE_TLS))
|
||||
{
|
||||
if (! ldap_start_tls($this->connection))
|
||||
{
|
||||
dol_syslog(get_class($this)."::connect_bind failed to start tls", LOG_WARNING);
|
||||
$connected = 0;
|
||||
$this->close();
|
||||
}
|
||||
}
|
||||
|
||||
// Execute the ldap_set_option here (after connect and before bind)
|
||||
$this->setVersion();
|
||||
ldap_set_option($this->connection, LDAP_OPT_SIZELIMIT, 0); // no limit here. should return true.
|
||||
|
||||
|
||||
if ($this->serverType == "activedirectory")
|
||||
if ($connected) break;
|
||||
if (empty($host)) continue;
|
||||
|
||||
if (preg_match('/^ldap/',$host))
|
||||
{
|
||||
$result=$this->setReferrals();
|
||||
dol_syslog(get_class($this)."::connect_bind try bindauth for activedirectory on ".$host." user=".$this->searchUser." password=".preg_replace('/./','*',$this->searchPassword),LOG_DEBUG);
|
||||
$this->result=$this->bindauth($this->searchUser,$this->searchPassword);
|
||||
if ($this->result)
|
||||
{
|
||||
$this->bind=$this->result;
|
||||
$connected=2;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=ldap_errno($this->connection).' '.ldap_error($this->connection);
|
||||
}
|
||||
$this->connection = ldap_connect($host);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Try in auth mode
|
||||
if ($this->searchUser && $this->searchPassword)
|
||||
$this->connection = ldap_connect($host,$this->serverPort);
|
||||
}
|
||||
|
||||
if (is_resource($this->connection))
|
||||
{
|
||||
// Begin TLS if requested by the configuration
|
||||
if (! empty($conf->global->LDAP_SERVER_USE_TLS))
|
||||
{
|
||||
if (! ldap_start_tls($this->connection))
|
||||
{
|
||||
dol_syslog(get_class($this)."::connect_bind failed to start tls", LOG_WARNING);
|
||||
$connected = 0;
|
||||
$this->close();
|
||||
}
|
||||
}
|
||||
|
||||
// Execute the ldap_set_option here (after connect and before bind)
|
||||
$this->setVersion();
|
||||
ldap_set_option($this->connection, LDAP_OPT_SIZELIMIT, 0); // no limit here. should return true.
|
||||
|
||||
|
||||
if ($this->serverType == "activedirectory")
|
||||
{
|
||||
dol_syslog(get_class($this)."::connect_bind try bindauth on ".$host." user=".$this->searchUser." password=".preg_replace('/./','*',$this->searchPassword),LOG_DEBUG);
|
||||
$result=$this->setReferrals();
|
||||
dol_syslog(get_class($this)."::connect_bind try bindauth for activedirectory on ".$host." user=".$this->searchUser." password=".preg_replace('/./','*',$this->searchPassword),LOG_DEBUG);
|
||||
$this->result=$this->bindauth($this->searchUser,$this->searchPassword);
|
||||
if ($this->result)
|
||||
{
|
||||
@ -236,26 +220,45 @@ class Ldap
|
||||
$this->error=ldap_errno($this->connection).' '.ldap_error($this->connection);
|
||||
}
|
||||
}
|
||||
// Try in anonymous
|
||||
if (! $this->bind)
|
||||
else
|
||||
{
|
||||
dol_syslog(get_class($this)."::connect_bind try bind on ".$host,LOG_DEBUG);
|
||||
$result=$this->bind();
|
||||
if ($result)
|
||||
// Try in auth mode
|
||||
if ($this->searchUser && $this->searchPassword)
|
||||
{
|
||||
$this->bind=$this->result;
|
||||
$connected=1;
|
||||
break;
|
||||
dol_syslog(get_class($this)."::connect_bind try bindauth on ".$host." user=".$this->searchUser." password=".preg_replace('/./','*',$this->searchPassword),LOG_DEBUG);
|
||||
$this->result=$this->bindauth($this->searchUser,$this->searchPassword);
|
||||
if ($this->result)
|
||||
{
|
||||
$this->bind=$this->result;
|
||||
$connected=2;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=ldap_errno($this->connection).' '.ldap_error($this->connection);
|
||||
}
|
||||
}
|
||||
else
|
||||
// Try in anonymous
|
||||
if (! $this->bind)
|
||||
{
|
||||
$this->error=ldap_errno($this->connection).' '.ldap_error($this->connection);
|
||||
dol_syslog(get_class($this)."::connect_bind try bind on ".$host,LOG_DEBUG);
|
||||
$result=$this->bind();
|
||||
if ($result)
|
||||
{
|
||||
$this->bind=$this->result;
|
||||
$connected=1;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=ldap_errno($this->connection).' '.ldap_error($this->connection);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (! $connected) $this->close();
|
||||
}
|
||||
|
||||
if (! $connected) $this->close();
|
||||
}
|
||||
|
||||
if ($connected)
|
||||
|
||||
@ -264,6 +264,8 @@ class Menubase
|
||||
$sql.= " t.mainmenu,";
|
||||
$sql.= " t.leftmenu,";
|
||||
$sql.= " t.fk_menu,";
|
||||
$sql.= " t.fk_mainmenu,";
|
||||
$sql.= " t.fk_leftmenu,";
|
||||
$sql.= " t.position,";
|
||||
$sql.= " t.url,";
|
||||
$sql.= " t.target,";
|
||||
@ -293,6 +295,8 @@ class Menubase
|
||||
$this->mainmenu = $obj->mainmenu;
|
||||
$this->leftmenu = $obj->leftmenu;
|
||||
$this->fk_menu = $obj->fk_menu;
|
||||
$this->fk_mainmenu = $obj->fk_mainmenu;
|
||||
$this->fk_leftmenu = $obj->fk_leftmenu;
|
||||
$this->position = $obj->position;
|
||||
$this->url = $obj->url;
|
||||
$this->target = $obj->target;
|
||||
|
||||
@ -1032,12 +1032,12 @@ function price2numjs(amount) {
|
||||
if ($langs->transnoentitiesnoconv("SeparatorThousand") != "SeparatorThousand") {
|
||||
$thousand = $langs->transnoentitiesnoconv("SeparatorThousand");
|
||||
}
|
||||
print "var dec='" . $dec . "'; var thousand='" . $thousand . "';\n"; // Set var in javascript
|
||||
print "var dec='" . dol_escape_js($dec) . "'; var thousand='" . dol_escape_js($thousand) . "';\n"; // Set var in javascript
|
||||
?>
|
||||
|
||||
var main_max_dec_shown = <?php echo str_replace('.', '', $conf->global->MAIN_MAX_DECIMALS_SHOWN); ?>;
|
||||
var main_rounding_unit = <?php echo $conf->global->MAIN_MAX_DECIMALS_UNIT; ?>;
|
||||
var main_rounding_tot = <?php echo $conf->global->MAIN_MAX_DECIMALS_TOT; ?>;
|
||||
var main_max_dec_shown = <?php echo (int) str_replace('.', '', $conf->global->MAIN_MAX_DECIMALS_SHOWN); ?>;
|
||||
var main_rounding_unit = <?php echo (int) $conf->global->MAIN_MAX_DECIMALS_UNIT; ?>;
|
||||
var main_rounding_tot = <?php echo (int) $conf->global->MAIN_MAX_DECIMALS_TOT; ?>;
|
||||
|
||||
var amount = amount.toString();
|
||||
|
||||
|
||||
@ -732,17 +732,24 @@ function activateModule($value,$withdeps=1)
|
||||
if (isset($objMod->depends) && is_array($objMod->depends) && ! empty($objMod->depends))
|
||||
{
|
||||
// Activation des modules dont le module depend
|
||||
$TError=array();
|
||||
$num = count($objMod->depends);
|
||||
for ($i = 0; $i < $num; $i++)
|
||||
{
|
||||
$activate = false;
|
||||
foreach ($modulesdir as $dir)
|
||||
{
|
||||
if (file_exists($dir.$objMod->depends[$i].".class.php"))
|
||||
{
|
||||
activateModule($objMod->depends[$i]);
|
||||
$activate = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$activate) $TError[] = $langs->trans('activateModuleDependNotSatisfied', $objMod->name, $objMod->depends[$i]);
|
||||
}
|
||||
|
||||
setEventMessages('', $TError, 'errors');
|
||||
}
|
||||
|
||||
if (isset($objMod->conflictwith) && is_array($objMod->conflictwith) && ! empty($objMod->conflictwith))
|
||||
|
||||
@ -436,7 +436,7 @@ function dol_size($size,$type='')
|
||||
*/
|
||||
function dol_sanitizeFileName($str,$newstr='_',$unaccent=1)
|
||||
{
|
||||
$filesystem_forbidden_chars = array('<','>',':','/','\\','?','*','|','"');
|
||||
$filesystem_forbidden_chars = array('<','>',':','/','\\','?','*','|','"','°');
|
||||
return dol_string_nospecial($unaccent?dol_string_unaccent($str):$str, $newstr, $filesystem_forbidden_chars);
|
||||
}
|
||||
|
||||
|
||||
@ -970,7 +970,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks=
|
||||
$sql2.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = p.fk_soc";
|
||||
$sql2.= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task as t ON p.rowid = t.fk_projet";
|
||||
$sql2.= " WHERE p.rowid IN (".join(',',$arrayidofprojects).")";
|
||||
$sql2.= " GROUP BY p.rowid, p.ref, p.title, p.fk_soc, p.fk_user_creat, p.public, p.fk_statut, p.fk_opp_status, p.opp_amount";
|
||||
$sql2.= " GROUP BY p.rowid, p.ref, p.title, p.fk_soc, s.nom, p.fk_user_creat, p.public, p.fk_statut, p.fk_opp_status, p.opp_amount";
|
||||
$sql2.= " ORDER BY p.title, p.ref";
|
||||
|
||||
$var=true;
|
||||
|
||||
@ -109,11 +109,17 @@ function tree_showpad(&$fulltree,$key,$silent=0)
|
||||
* @param int $pere Array with parent ids ('rowid'=>,'mainmenu'=>,'leftmenu'=>,'fk_mainmenu=>,'fk_leftmenu=>)
|
||||
* @param int $rang Level of element
|
||||
* @param string $iddivjstree Id to use for parent ul element
|
||||
* @param int $donoresetalreadyloaded Do not reset global array $donoresetalreadyloaded used to avoid to go down on an aleady processed record
|
||||
* @param int $showfk Show fk links to parent into label
|
||||
* @return void
|
||||
*/
|
||||
function tree_recur($tab, $pere, $rang, $iddivjstree='iddivjstree')
|
||||
function tree_recur($tab, $pere, $rang, $iddivjstree='iddivjstree', $donoresetalreadyloaded=0, $showfk=0)
|
||||
{
|
||||
if (empty($pere['rowid']))
|
||||
global $tree_recur_alreadyadded;
|
||||
|
||||
if ($rang == 0 && empty($donoresetalreadyloaded)) $tree_recur_alreadyadded=array();
|
||||
|
||||
if ($rang == 0)
|
||||
{
|
||||
// Test also done with jstree and dynatree (not able to have <a> inside label)
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
@ -132,7 +138,7 @@ function tree_recur($tab, $pere, $rang, $iddivjstree='iddivjstree')
|
||||
|
||||
print '<ul id="'.$iddivjstree.'">';
|
||||
}
|
||||
|
||||
|
||||
if ($rang > 50) return; // Protect against infinite loop. Max 50 depth
|
||||
|
||||
//ballayage du tableau
|
||||
@ -144,25 +150,53 @@ function tree_recur($tab, $pere, $rang, $iddivjstree='iddivjstree')
|
||||
// If an element has $pere for parent
|
||||
if ($tab[$x]['fk_menu'] != -1 && $tab[$x]['fk_menu'] == $pere['rowid'])
|
||||
{
|
||||
if (empty($ulprinted) && ! empty($pere['rowid'])) { print '<ul'.(empty($pere['rowid'])?' id="treeData"':'').'>'; $ulprinted++; }
|
||||
//print 'rang='.$rang.'-x='.$x." rowid=".$tab[$x]['rowid']." tab[x]['fk_leftmenu'] = ".$tab[$x]['fk_leftmenu']." leftmenu pere = ".$pere['leftmenu']."<br>\n";
|
||||
if (empty($ulprinted) && ! empty($pere['rowid']))
|
||||
{
|
||||
if (! empty($tree_recur_alreadyadded[$tab[$x]['rowid']]))
|
||||
{
|
||||
dol_syslog('Error, record with id '.$tab[$x]['rowid'].' seems to be a child of record with id '.$pere['rowid'].' but it was already output. Complete field "leftmenu" and "mainmenu" on ALL records to avoid ambiguity.', LOG_WARNING);
|
||||
continue;
|
||||
}
|
||||
|
||||
print '<ul'.(empty($pere['rowid'])?' id="treeData"':'').'>'; $ulprinted++;
|
||||
}
|
||||
print "\n".'<li '.($tab[$x]['statut']?' class="liuseractive"':'class="liuserdisabled"').'>';
|
||||
print $tab[$x]['entry'];
|
||||
if ($showfk) print ' (fk_mainmenu='.$tab[$x]['fk_mainmenu'].' fk_leftmenu='.$tab[$x]['fk_leftmenu'].')';
|
||||
//print ' -> A '.$tab[$x]['rowid'].' mainmenu='.$tab[$x]['mainmenu'].' leftmenu='.$tab[$x]['leftmenu'].' fk_mainmenu='.$tab[$x]['fk_mainmenu'].' fk_leftmenu='.$tab[$x]['fk_leftmenu'].'<br>'."\n";
|
||||
$tree_recur_alreadyadded[$tab[$x]['rowid']]=($rang + 1);
|
||||
// And now we search all its sons of lower level
|
||||
tree_recur($tab,$tab[$x],$rang+1);
|
||||
print '</li>';
|
||||
}
|
||||
elseif (! empty($tab[$x]['rowid']) && $tab[$x]['fk_menu'] == -1 && $tab[$x]['fk_mainmenu'] == $pere['mainmenu'] && $tab[$x]['fk_leftmenu'] == $pere['leftmenu'])
|
||||
{
|
||||
if (empty($ulprinted) && ! empty($pere['rowid'])) { print '<ul'.(empty($pere['rowid'])?' id="treeData"':'').'>'; $ulprinted++; }
|
||||
//print 'rang='.$rang.'-x='.$x." rowid=".$tab[$x]['rowid']." tab[x]['fk_leftmenu'] = ".$tab[$x]['fk_leftmenu']." leftmenu pere = ".$pere['leftmenu']."<br>\n";
|
||||
if (empty($ulprinted) && ! empty($pere['rowid']))
|
||||
{
|
||||
if (! empty($tree_recur_alreadyadded[$tab[$x]['rowid']]))
|
||||
{
|
||||
dol_syslog('Error, record with id '.$tab[$x]['rowid'].' seems to be a child of record with id '.$pere['rowid'].' but it was already output. Complete field "leftmenu" and "mainmenu" on ALL records to avoid ambiguity.', LOG_WARNING);
|
||||
//print 'Error, record with id '.$tab[$x]['rowid'].' seems to be a child of record with id '.$pere['rowid'].' but it was already output. Complete field "leftmenu" and "mainmenu" on ALL records to avoid ambiguity.';
|
||||
continue;
|
||||
}
|
||||
|
||||
print '<ul'.(empty($pere['rowid'])?' id="treeData"':'').'>'; $ulprinted++;
|
||||
}
|
||||
print "\n".'<li '.($tab[$x]['statut']?' class="liuseractive"':'class="liuserdisabled"').'>';
|
||||
print $tab[$x]['entry'];
|
||||
if ($showfk) print ' (fk_mainmenu='.$tab[$x]['fk_mainmenu'].' fk_leftmenu='.$tab[$x]['fk_leftmenu'].')';
|
||||
//print ' -> B '.$tab[$x]['rowid'].' mainmenu='.$tab[$x]['mainmenu'].' leftmenu='.$tab[$x]['leftmenu'].' fk_mainmenu='.$tab[$x]['fk_mainmenu'].' fk_leftmenu='.$tab[$x]['fk_leftmenu'].'<br>'."\n";
|
||||
$tree_recur_alreadyadded[$tab[$x]['rowid']]=($rang + 1);
|
||||
// And now we search all its sons of lower level
|
||||
tree_recur($tab,$tab[$x],$rang+1);
|
||||
//print 'Call tree_recur for x='.$x.' rowid='.$tab[$x]['rowid']." fk_mainmenu pere = ".$tab[$x]['fk_mainmenu']." fk_leftmenu pere = ".$tab[$x]['fk_leftmenu']."<br>\n";
|
||||
tree_recur($tab,$tab[$x],$rang+1);
|
||||
print '</li>';
|
||||
}
|
||||
}
|
||||
if (! empty($ulprinted) && ! empty($pere['rowid'])) { print '</ul>'."\n"; }
|
||||
|
||||
if (empty($pere['rowid'])) print '</ul>';
|
||||
if ($rang == 0) print '</ul>';
|
||||
}
|
||||
|
||||
|
||||
@ -206,7 +206,7 @@ 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->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2303__+MAX_llx_menu__, 'accountancy', '', 2300__+MAX_llx_menu__, '/compta/tva/clients.php?leftmenu=tax_vat', 'ReportByCustomers', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 2, __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->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2304__+MAX_llx_menu__, 'accountancy', '', 2300__+MAX_llx_menu__, '/compta/tva/quadri_detail.php?leftmenu=tax_vat', 'ReportByQuarter', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 3, __ENTITY__);
|
||||
-- Accounting Expert
|
||||
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', 2400__+MAX_llx_menu__, 'accountancy', 'accounting', 6__+MAX_llx_menu__, '/accountancy/customer/index.php?leftmenu=accounting', 'MenuAccountancy', 0, 'accountancy', '(! empty($conf->accounting->enabled) || $user->rights->accounting->ventilation->read || $user->rights->accounting->ventilation->dispatch || $user->rights->compta->resultat->lire', '', 0, 7, __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', 2400__+MAX_llx_menu__, 'accountancy', 'accounting', 6__+MAX_llx_menu__, '/accountancy/customer/index.php?leftmenu=accounting', 'MenuAccountancy', 0, 'accountancy', '! empty($conf->accounting->enabled) || $user->rights->accounting->ventilation->read || $user->rights->accounting->ventilation->dispatch || $user->rights->compta->resultat->lire', '', 0, 7, __ENTITY__);
|
||||
-- Dispatch
|
||||
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', 2401__+MAX_llx_menu__, 'accountancy', 'dispatch_customer', 2400__+MAX_llx_menu__, '/accountancy/customer/index.php?leftmenu=dispatch_customer', 'CustomersVentilation', 1, 'accountancy', '$user->rights->accounting->ventilation->read', '', 0, 1, __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=="dispatch_customer"', __HANDLER__, 'left', 2402__+MAX_llx_menu__, 'accountancy', '', 2401__+MAX_llx_menu__, '/accountancy/customer/list.php', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->ventilation->dispatch', '', 0, 2, __ENTITY__);
|
||||
|
||||
@ -110,7 +110,8 @@ class MenuManager
|
||||
|
||||
// Modules system tools
|
||||
// TODO Find a way to add parent menu only if child menu exists. For the moment, no other method than hard coded methods.
|
||||
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled) || ! empty($conf->barcode->enabled) // TODO We should enabled module system tools entry without hardcoded test, but when at least one modules bringing such entries are on
|
||||
// TODO We should enabled module system tools entry without hardcoded test, but when at least one modules bringing such entries are on
|
||||
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled) || ! empty($conf->barcode->enabled) || ! empty($conf->cron->enabled)
|
||||
|| ! empty($conf->global->MAIN_MENU_ENABLE_MODULETOOLS))
|
||||
{
|
||||
if (empty($user->societe_id))
|
||||
|
||||
@ -544,14 +544,15 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
}
|
||||
|
||||
// Modules system tools
|
||||
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled) || ! empty($conf->barcode->enabled) // TODO We should enabled module system tools entry without hardcoded test, but when at least one modules bringing such entries are on
|
||||
// TODO We should enabled module system tools entry without hardcoded test, but when at least one modules bringing such entries are on
|
||||
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled) || ! empty($conf->barcode->enabled) || ! empty($conf->cron->enabled)
|
||||
|| ! empty($conf->global->MAIN_MENU_ENABLE_MODULETOOLS)) // Some external modules may need to force to have this entry on.
|
||||
{
|
||||
if (empty($user->societe_id))
|
||||
{
|
||||
$newmenu->add("/admin/tools/index.php?mainmenu=home&leftmenu=modulesadmintools", $langs->trans("ModulesSystemTools"), 0, $user->admin, '', $mainmenu, 'modulesadmintools');
|
||||
// Special case: This entry can't be embedded into modules because we need it for both module service and products and we don't want duplicate lines.
|
||||
if ((empty($leftmenu) || $leftmenu=="modulesadmintools") && $user->admin)
|
||||
if ((! empty($conf->product->enabled) || ! empty($conf->service->enabled)) && (empty($leftmenu) || $leftmenu=="modulesadmintools") && $user->admin)
|
||||
{
|
||||
$langs->load("products");
|
||||
$newmenu->add("/product/admin/product_tools.php?mainmenu=home&leftmenu=modulesadmintools", $langs->trans("ProductVatMassChange"), 1, $user->admin);
|
||||
@ -772,8 +773,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
if (! empty($conf->facture->enabled))
|
||||
{
|
||||
$langs->load("bills");
|
||||
$newmenu->add("/compta/facture/list.php",$langs->trans("BillsCustomers"),0,$user->rights->facture->lire, '', $mainmenu, 'customers_bills');
|
||||
$newmenu->add("/compta/facture.php?action=create",$langs->trans("NewBill"),1,$user->rights->facture->creer);
|
||||
$newmenu->add("/compta/facture/list.php?leftmenu=customers_bills",$langs->trans("BillsCustomers"),0,$user->rights->facture->lire, '', $mainmenu, 'customers_bills');
|
||||
$newmenu->add("/compta/facture.php?action=create&leftmenu=customers_bills",$langs->trans("NewBill"),1,$user->rights->facture->creer);
|
||||
$newmenu->add("/compta/facture/list.php?leftmenu=customers_bills",$langs->trans("List"),1,$user->rights->facture->lire);
|
||||
|
||||
if (empty($leftmenu) || ($leftmenu == 'customers_bills'))
|
||||
@ -1098,7 +1099,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
$langs->load("stocks");
|
||||
$newmenu->add("/product/reassortlot.php?type=0", $langs->trans("StocksByLotSerial"), 1, $user->rights->produit->lire && $user->rights->stock->lire);
|
||||
}
|
||||
if (! empty($conf->propal->enabled))
|
||||
if (! empty($conf->propal->enabled) || ! empty($conf->commande->enabled) || ! empty($conf->facture->enabled) || ! empty($conf->fournisseur->enabled) || ! empty($conf->supplier_proposal->enabled))
|
||||
{
|
||||
$newmenu->add("/product/stats/card.php?id=all&leftmenu=stats&type=0", $langs->trans("Statistics"), 1, $user->rights->produit->lire && $user->rights->propale->lire);
|
||||
}
|
||||
@ -1110,7 +1111,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
$newmenu->add("/product/index.php?leftmenu=service&type=1", $langs->trans("Services"), 0, $user->rights->service->lire, '', $mainmenu, 'service');
|
||||
$newmenu->add("/product/card.php?leftmenu=service&action=create&type=1", $langs->trans("NewService"), 1, $user->rights->service->creer);
|
||||
$newmenu->add("/product/list.php?leftmenu=service&type=1", $langs->trans("List"), 1, $user->rights->service->lire);
|
||||
if (! empty($conf->propal->enabled))
|
||||
if (! empty($conf->propal->enabled) || ! empty($conf->commande->enabled) || ! empty($conf->facture->enabled) || ! empty($conf->fournisseur->enabled) || ! empty($conf->supplier_proposal->enabled))
|
||||
{
|
||||
$newmenu->add("/product/stats/card.php?id=all&leftmenu=stats&type=1", $langs->trans("Statistics"), 1, $user->rights->service->lire && $user->rights->propale->lire);
|
||||
}
|
||||
|
||||
@ -266,7 +266,7 @@ class modAgenda extends DolibarrModules
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuToDoActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo',
|
||||
'url'=>'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1',
|
||||
'langs'=>'agenda',
|
||||
'position'=>105,
|
||||
'perms'=>'$user->rights->agenda->allactions->read',
|
||||
@ -278,7 +278,7 @@ class modAgenda extends DolibarrModules
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuDoneActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done',
|
||||
'url'=>'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1',
|
||||
'langs'=>'agenda',
|
||||
'position'=>106,
|
||||
'perms'=>'$user->rights->agenda->allactions->read',
|
||||
@ -327,7 +327,7 @@ class modAgenda extends DolibarrModules
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuToDoActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo',
|
||||
'url'=>'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1',
|
||||
'langs'=>'agenda',
|
||||
'position'=>115,
|
||||
'perms'=>'$user->rights->agenda->allactions->read',
|
||||
@ -339,7 +339,7 @@ class modAgenda extends DolibarrModules
|
||||
'type'=>'left',
|
||||
'titre'=>'MenuDoneActions',
|
||||
'mainmenu'=>'agenda',
|
||||
'url'=>'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done',
|
||||
'url'=>'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1',
|
||||
'langs'=>'agenda',
|
||||
'position'=>116,
|
||||
'perms'=>'$user->rights->agenda->allactions->read',
|
||||
|
||||
@ -381,6 +381,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
||||
|
||||
$tmparray = array_merge($array_user,$array_soc,$array_thirdparty,$array_objet,$array_other,$array_thirdparty_contact);
|
||||
complete_substitutions_array($tmparray, $outputlangs, $object);
|
||||
$object->fetch_optionals();
|
||||
// Call the ODTSubstitution hook
|
||||
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray);
|
||||
$reshook=$hookmanager->executeHooks('ODTSubstitution',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
@ -647,8 +647,11 @@ class pdf_azur extends ModelePDFPropales
|
||||
*/
|
||||
|
||||
// Customer signature area
|
||||
$posy=$this->_signature_area($pdf, $object, $posy, $outputlangs);
|
||||
|
||||
if (empty($conf->global->PROPAL_DISABLE_SIGNATURE))
|
||||
{
|
||||
$posy=$this->_signature_area($pdf, $object, $posy, $outputlangs);
|
||||
}
|
||||
|
||||
// Pied de page
|
||||
$this->_pagefoot($pdf,$object,$outputlangs);
|
||||
if (method_exists($pdf,'AliasNbPages')) $pdf->AliasNbPages();
|
||||
@ -710,7 +713,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
if (file_exists($infile) && is_readable($infile)) {
|
||||
$pagecount = $pdf->setSourceFile($infile);
|
||||
for($i = 1; $i <= $pagecount; $i ++) {
|
||||
$tplIdx = $pdf->importPage(1);
|
||||
$tplIdx = $pdf->importPage($i);
|
||||
if ($tplIdx!==false) {
|
||||
$s = $pdf->getTemplatesize($tplIdx);
|
||||
$pdf->AddPage($s['h'] > $s['w'] ? 'P' : 'L');
|
||||
|
||||
@ -175,10 +175,9 @@ if ($action == 'confirm_deletefile')
|
||||
dol_print_error($db,$ecmdir->error);
|
||||
exit;
|
||||
}
|
||||
$relativepath=$ecmdir->getRelativePath();
|
||||
}
|
||||
else $relativepath='';
|
||||
$upload_dir = $conf->ecm->dir_output.($relativepath?'/'.$relativepath:'');
|
||||
$upload_dir = $conf->ecm->dir_output;
|
||||
$file = $upload_dir . "/" . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_POST are already decoded by PHP).
|
||||
|
||||
$ret=dol_delete_file($file);
|
||||
|
||||
@ -864,16 +864,14 @@ class Expedition extends CommonObject
|
||||
$product=new Product($this->db);
|
||||
$result=$product->fetch($fk_product);
|
||||
|
||||
$product_type=$product->type;
|
||||
if ($entrepot_id > 0) {
|
||||
$product->load_stock();
|
||||
$product_stock = $product->stock_warehouse[$entrepot_id]->real;
|
||||
$product->load_stock();
|
||||
$product_stock = $product->stock_warehouse[$entrepot_id]->real;
|
||||
}
|
||||
else
|
||||
{
|
||||
$product_stock = $product->stock_reel;
|
||||
}
|
||||
|
||||
else
|
||||
$product_stock = $product->stock_reel;
|
||||
|
||||
$product_type=$product->type;
|
||||
if ($product_type == 0 && $product_stock < $qty)
|
||||
{
|
||||
$this->error=$langs->trans('ErrorStockIsNotEnough');
|
||||
|
||||
@ -333,7 +333,7 @@ if ($action == "confirm_save_from_refuse" && GETPOST("confirm") == "yes" && $id
|
||||
|
||||
if ($result > 0)
|
||||
{
|
||||
if (! empty($conf->global->DEPLACEMENT_TO_CLEAN))
|
||||
if (! empty($conf->global->DEPLACEMENT_TO_CLEAN)) // TODO Translate this so we can remove condition
|
||||
{
|
||||
// Send mail
|
||||
|
||||
@ -390,6 +390,7 @@ if ($action == "confirm_save_from_refuse" && GETPOST("confirm") == "yes" && $id
|
||||
else
|
||||
{
|
||||
$mesg=$mailfile->error;
|
||||
setEventMessages($mesg, null, 'errors');
|
||||
}
|
||||
// END - Send mail
|
||||
}
|
||||
@ -438,7 +439,7 @@ if ($action == "confirm_approve" && GETPOST("confirm") == "yes" && $id > 0 && $u
|
||||
|
||||
if ($result > 0)
|
||||
{
|
||||
if (! empty($conf->global->DEPLACEMENT_TO_CLEAN))
|
||||
if (! empty($conf->global->DEPLACEMENT_TO_CLEAN)) // TODO Translate this so we can remove condition
|
||||
{
|
||||
// Send mail
|
||||
|
||||
@ -542,7 +543,7 @@ if ($action == "confirm_refuse" && GETPOST('confirm')=="yes" && $id > 0 && $user
|
||||
|
||||
if ($result > 0)
|
||||
{
|
||||
if (! empty($conf->global->DEPLACEMENT_TO_CLEAN))
|
||||
if (! empty($conf->global->DEPLACEMENT_TO_CLEAN)) // TODO Translate this so we can remove condition
|
||||
{
|
||||
// Send mail
|
||||
|
||||
@ -583,7 +584,6 @@ if ($action == "confirm_refuse" && GETPOST('confirm')=="yes" && $id > 0 && $user
|
||||
else
|
||||
{
|
||||
setEventMessages($langs->trans("ErrorFailedToSendMail",$emailFrom,$emailTo), null, 'errors');
|
||||
$mesg="Impossible d'envoyer l'email.";
|
||||
}
|
||||
// END - Send mail
|
||||
}
|
||||
@ -627,7 +627,7 @@ if ($action == "confirm_cancel" && GETPOST('confirm')=="yes" && GETPOST('detail_
|
||||
|
||||
if ($result > 0)
|
||||
{
|
||||
if (! empty($conf->global->DEPLACEMENT_TO_CLEAN))
|
||||
if (! empty($conf->global->DEPLACEMENT_TO_CLEAN)) // TODO Translate this so we can remove condition
|
||||
{
|
||||
// Send mail
|
||||
|
||||
@ -667,6 +667,7 @@ if ($action == "confirm_cancel" && GETPOST('confirm')=="yes" && GETPOST('detail_
|
||||
else
|
||||
{
|
||||
$mesg="Impossible d'envoyer l'email.";
|
||||
setEventMessages($mesg, null, 'errors');
|
||||
}
|
||||
// END - Send mail
|
||||
}
|
||||
@ -756,7 +757,7 @@ if ($action == 'set_paid' && $id > 0 && $user->rights->expensereport->to_paid)
|
||||
|
||||
if ($result > 0)
|
||||
{
|
||||
if (! empty($conf->global->DEPLACEMENT_TO_CLEAN))
|
||||
if (! empty($conf->global->DEPLACEMENT_TO_CLEAN)) // TODO Translate this so we can remove condition
|
||||
{
|
||||
// Send mail
|
||||
|
||||
@ -806,9 +807,8 @@ if ($action == 'set_paid' && $id > 0 && $user->rights->expensereport->to_paid)
|
||||
endif;
|
||||
|
||||
else:
|
||||
|
||||
$mesg="Impossible d'envoyer l'email.";
|
||||
|
||||
$mesg="Impossible d'envoyer l'email.";
|
||||
setEventMessages($mesg, null, 'errors');
|
||||
endif;
|
||||
// END - Send mail
|
||||
}
|
||||
@ -819,7 +819,7 @@ if ($action == 'set_paid' && $id > 0 && $user->rights->expensereport->to_paid)
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == "addline")
|
||||
if ($action == "addline" && $user->rights->expensereport->creer)
|
||||
{
|
||||
$error = 0;
|
||||
|
||||
@ -911,7 +911,7 @@ if ($action == "addline")
|
||||
$action='';
|
||||
}
|
||||
|
||||
if ($action == 'confirm_delete_line' && GETPOST("confirm") == "yes")
|
||||
if ($action == 'confirm_delete_line' && GETPOST("confirm") == "yes" && $user->rights->expensereport->creer)
|
||||
{
|
||||
$object = new ExpenseReport($db);
|
||||
$object->fetch($id);
|
||||
@ -921,7 +921,7 @@ if ($action == 'confirm_delete_line' && GETPOST("confirm") == "yes")
|
||||
$total_ht = $object_ligne->total_ht;
|
||||
$total_tva = $object_ligne->total_tva;
|
||||
|
||||
$result=$object->deleteline(GETPOST("rowid"));
|
||||
$result=$object->deleteline(GETPOST("rowid"), $user);
|
||||
if ($result >= 0)
|
||||
{
|
||||
if ($result > 0)
|
||||
@ -954,14 +954,13 @@ if ($action == 'confirm_delete_line' && GETPOST("confirm") == "yes")
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == "updateligne" )
|
||||
if ($action == "updateligne" && $user->rights->expensereport->creer)
|
||||
{
|
||||
$object = new ExpenseReport($db);
|
||||
$object->fetch($id);
|
||||
|
||||
$rowid = $_POST['rowid'];
|
||||
$type_fees_id = GETPOST('fk_c_type_fees');
|
||||
$object_ligne->vatrate = price2num(GETPOST('vatrate'));
|
||||
$projet_id = $fk_projet;
|
||||
$comments = GETPOST('comments');
|
||||
$qty = GETPOST('qty');
|
||||
@ -983,6 +982,7 @@ if ($action == "updateligne" )
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
// TODO Use update method of ExpenseReportLine
|
||||
$result = $object->updateline($rowid, $type_fees_id, $projet_id, $vatrate, $comments, $qty, $value_unit, $date, $id);
|
||||
if ($result >= 0)
|
||||
{
|
||||
@ -1078,29 +1078,6 @@ $formfile = new FormFile($db);
|
||||
$formproject = new FormProjets($db);
|
||||
$projecttmp = new Project($db);
|
||||
|
||||
if (! empty($conf->global->DEPLACEMENT_TO_CLEAN))
|
||||
{
|
||||
if(!empty($_GET['mesg']))
|
||||
{
|
||||
$text_mesg = explode(",",$_GET['mesg']);
|
||||
|
||||
foreach($text_mesg as $text)
|
||||
{
|
||||
$mesg.= "- ".$langs->trans($text)."<br />";
|
||||
}
|
||||
|
||||
print "<div class=\"error\" style=\"font-size:15px;background-color:#FFB3B3;\">";
|
||||
print $langs->trans("LINE_NOT_ADDED")."<br />";
|
||||
print $mesg;
|
||||
print "</div>";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($mesg) print "<div class=\"error\" style=\"font-size:16px;background-color:red;\">".$mesg."</div>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Create
|
||||
if ($action == 'create')
|
||||
{
|
||||
@ -1625,7 +1602,7 @@ else
|
||||
$sql.= ' ctf.code as type_fees_code, ctf.label as type_fees_libelle,';
|
||||
$sql.= ' pjt.rowid as projet_id, pjt.title as projet_title, pjt.ref as projet_ref';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'expensereport_det as fde';
|
||||
$sql.= ' INNER JOIN '.MAIN_DB_PREFIX.'c_type_fees as ctf ON fde.fk_c_type_fees=ctf.id';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_type_fees as ctf ON fde.fk_c_type_fees=ctf.id';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'projet as pjt ON fde.fk_projet=pjt.rowid';
|
||||
$sql.= ' WHERE fde.fk_expensereport = '.$object->id;
|
||||
|
||||
@ -1663,8 +1640,11 @@ else
|
||||
print '<td style="text-align:right;">'.$langs->trans('AmountHT').'</td>';
|
||||
print '<td style="text-align:right;">'.$langs->trans('AmountTTC').'</td>';
|
||||
}
|
||||
print '<td style="text-align:right;"></td>';
|
||||
|
||||
// Ajout des boutons de modification/suppression
|
||||
if (($object->fk_statut < 2 || $object->fk_statut == 99) && $user->rights->expensereport->creer)
|
||||
{
|
||||
print '<td style="text-align:right;"></td>';
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
$var=true;
|
||||
@ -1691,7 +1671,7 @@ else
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
print '<td style="text-align:center;">'.$langs->trans("TF_".strtoupper($objp->type_fees_libelle)).'</td>';
|
||||
print '<td style="text-align:center;">'.$langs->trans("TF_".strtoupper(empty($objp->type_fees_libelle)?'OTHER':$objp->type_fees_libelle)).'</td>';
|
||||
print '<td style="text-align:left;">'.$objp->comments.'</td>';
|
||||
print '<td style="text-align:right;">'.vatrate($objp->vatrate,true).'</td>';
|
||||
print '<td style="text-align:right;">'.price($objp->value_unit).'</td>';
|
||||
@ -1705,7 +1685,7 @@ else
|
||||
|
||||
// Ajout des boutons de modification/suppression
|
||||
print '<td style="text-align:right;" class="nowrap">';
|
||||
if($object->fk_statut<2 OR $object->fk_statut==99)
|
||||
if (($object->fk_statut < 2 || $object->fk_statut == 99) && $user->rights->expensereport->creer)
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=editline&rowid='.$objp->rowid.'#'.$objp->rowid.'">';
|
||||
print img_edit();
|
||||
@ -1791,7 +1771,7 @@ else
|
||||
//print '</div>';
|
||||
|
||||
// Add a line
|
||||
if (($object->fk_statut==0 || $object->fk_statut==99) && $action != 'editline')
|
||||
if (($object->fk_statut==0 || $object->fk_statut==99) && $action != 'editline' && $user->rights->expensereport->creer)
|
||||
{
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2"></td>';
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com>
|
||||
* Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
* 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
|
||||
@ -140,6 +141,7 @@ class ExpenseReport extends CommonObject
|
||||
$sql.= ",paid";
|
||||
$sql.= ",note_public";
|
||||
$sql.= ",note_private";
|
||||
$sql.= ",entity";
|
||||
$sql.= ") VALUES(";
|
||||
$sql.= "'(PROV)'";
|
||||
$sql.= ", ".$this->total_ht;
|
||||
@ -156,6 +158,7 @@ class ExpenseReport extends CommonObject
|
||||
$sql.= ", 0";
|
||||
$sql.= ", ".($this->note_public?"'".$this->db->escape($this->note_public)."'":"null");
|
||||
$sql.= ", ".($this->note_private?"'".$this->db->escape($this->note_private)."'":"null");
|
||||
$sql.= ", ".$conf->entity;
|
||||
$sql.= ")";
|
||||
|
||||
dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG);
|
||||
@ -746,7 +749,7 @@ class ExpenseReport extends CommonObject
|
||||
$sql.= ' ctf.code as code_type_fees, ctf.label as libelle_type_fees,';
|
||||
$sql.= ' p.ref as ref_projet, p.title as title_projet';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.$this->table_element_line.' as de';
|
||||
$sql.= ' INNER JOIN '.MAIN_DB_PREFIX.'c_type_fees as ctf ON de.fk_c_type_fees = ctf.id';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_type_fees as ctf ON de.fk_c_type_fees = ctf.id';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'projet as p ON de.fk_projet = p.rowid';
|
||||
$sql.= ' WHERE de.'.$this->fk_element.' = '.$this->id;
|
||||
|
||||
@ -776,7 +779,7 @@ class ExpenseReport extends CommonObject
|
||||
$deplig->total_tva = $objp->total_tva;
|
||||
$deplig->total_ttc = $objp->total_ttc;
|
||||
|
||||
$deplig->type_fees_code = $objp->code_type_fees;
|
||||
$deplig->type_fees_code = empty($objp->code_type_fees)?'TF_OTHER':$objp->code_type_fees;
|
||||
$deplig->type_fees_libelle = $objp->libelle_type_fees;
|
||||
$deplig->tva_tx = $objp->tva_tx;
|
||||
$deplig->vatrate = $objp->tva_tx;
|
||||
@ -850,12 +853,9 @@ class ExpenseReport extends CommonObject
|
||||
{
|
||||
global $conf,$langs;
|
||||
|
||||
$this->oldref = $this->ref;
|
||||
$expld_car = (empty($conf->global->NDF_EXPLODE_CHAR))?"-":$conf->global->NDF_EXPLODE_CHAR;
|
||||
|
||||
// Sélection du numéro de ref suivant
|
||||
$ref_next = $this->getNextNumRef();
|
||||
$ref_number_int = ($this->ref+1)-1;
|
||||
|
||||
// Sélection de la date de début de la NDF
|
||||
$sql = 'SELECT date_debut';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.$this->table_element;
|
||||
@ -864,21 +864,59 @@ class ExpenseReport extends CommonObject
|
||||
$objp = $this->db->fetch_object($result);
|
||||
$this->date_debut = $this->db->jdate($objp->date_debut);
|
||||
|
||||
// Création du ref_number suivant
|
||||
if($ref_next)
|
||||
$update_number_int = false;
|
||||
|
||||
// Create next ref if ref is PROVxx
|
||||
// Rename directory if dir was a temporary ref
|
||||
if (preg_match('/^[\(]?PROV/i', $this->ref))
|
||||
{
|
||||
$prefix="ER";
|
||||
if (! empty($conf->global->EXPENSE_REPORT_PREFIX)) $prefix=$conf->global->EXPENSE_REPORT_PREFIX;
|
||||
$this->ref = strtoupper($fuser->login).$expld_car.$prefix.$this->ref.$expld_car.dol_print_date($this->date_debut,'%y%m%d');
|
||||
// Sélection du numéro de ref suivant
|
||||
$ref_next = $this->getNextNumRef();
|
||||
$ref_number_int = ($this->ref+1)-1;
|
||||
$update_number_int = true;
|
||||
// Création du ref_number suivant
|
||||
if($ref_next)
|
||||
{
|
||||
$prefix="ER";
|
||||
if (! empty($conf->global->EXPENSE_REPORT_PREFIX)) $prefix=$conf->global->EXPENSE_REPORT_PREFIX;
|
||||
$this->ref = strtoupper($fuser->login).$expld_car.$prefix.$this->ref.$expld_car.dol_print_date($this->date_debut,'%y%m%d');
|
||||
}
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
// We rename directory in order to avoid losing the attachments
|
||||
$oldref = dol_sanitizeFileName($this->oldref);
|
||||
$newref = dol_sanitizeFileName($this->ref);
|
||||
$dirsource = $conf->expensereport->dir_output.'/'.$oldref;
|
||||
$dirdest = $conf->expensereport->dir_output.'/'.$newref;
|
||||
if (file_exists($dirsource))
|
||||
{
|
||||
dol_syslog(get_class($this)."::valid() rename dir ".$dirsource." into ".$dirdest);
|
||||
|
||||
if (@rename($dirsource, $dirdest))
|
||||
{
|
||||
dol_syslog("Rename ok");
|
||||
// Rename docs starting with $oldref with $newref
|
||||
$listoffiles=dol_dir_list($conf->expensereport->dir_output.'/'.$newref, 'files', 1, '^'.preg_quote($oldref,'/'));
|
||||
foreach($listoffiles as $fileentry)
|
||||
{
|
||||
$dirsource=$fileentry['name'];
|
||||
$dirdest=preg_replace('/^'.preg_quote($oldref,'/').'/',$newref, $dirsource);
|
||||
$dirsource=$fileentry['path'].'/'.$dirsource;
|
||||
$dirdest=$fileentry['path'].'/'.$dirdest;
|
||||
@rename($dirsource, $dirdest);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->fk_statut != 2)
|
||||
{
|
||||
$now = dol_now();
|
||||
|
||||
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element;
|
||||
$sql.= " SET ref = '".$this->ref."', fk_statut = 2, fk_user_valid = ".$fuser->id.", date_valid='".$this->db->idate($now)."',";
|
||||
$sql.= " ref_number_int = ".$ref_number_int;
|
||||
$sql.= " SET ref = '".$this->ref."', fk_statut = 2, fk_user_valid = ".$fuser->id.", date_valid='".$this->db->idate($now)."'";
|
||||
if ($update_number_int) {
|
||||
$sql.= ", ref_number_int = ".$ref_number_int;
|
||||
}
|
||||
$sql.= ' WHERE rowid = '.$this->id;
|
||||
|
||||
$resql=$this->db->query($sql);
|
||||
@ -1265,7 +1303,9 @@ class ExpenseReport extends CommonObject
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
|
||||
$sql.= " WHERE p.rowid = ".$projet_id;
|
||||
$result = $this->db->query($sql);
|
||||
$objp_projet = $this->db->fetch_object($result);
|
||||
if ($result) {
|
||||
$objp_projet = $this->db->fetch_object($result);
|
||||
}
|
||||
$ligne->projet_ref = $objp_projet->ref_projet;
|
||||
$ligne->projet_title = $objp_projet->title_projet;
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
if (! defined('DOL_APPLICATION_TITLE')) define('DOL_APPLICATION_TITLE','Dolibarr');
|
||||
if (! defined('DOL_VERSION')) define('DOL_VERSION','3.9.1');
|
||||
if (! defined('DOL_VERSION')) define('DOL_VERSION','3.9.2');
|
||||
|
||||
if (! defined('EURO')) define('EURO',chr(128));
|
||||
|
||||
|
||||
@ -89,9 +89,11 @@ if ($idprod > 0)
|
||||
}
|
||||
}
|
||||
|
||||
// Add price for pmp
|
||||
$price=$producttmp->pmp;
|
||||
$prices[] = array("id" => 'pmpprice', "price" => price2num($price), "label" => $langs->trans("PMPValueShort").': '.price($price,0,$langs,0,0,-1,$conf->currency), "title" => $langs->trans("PMPValueShort").': '.price($price,0,$langs,0,0,-1,$conf->currency)); // For price field, we must use price2num(), for label or title, price()
|
||||
if(!empty($conf->stock->enabled)) {
|
||||
// Add price for pmp
|
||||
$price=$producttmp->pmp;
|
||||
$prices[] = array("id" => 'pmpprice', "price" => price2num($price), "label" => $langs->trans("PMPValueShort").': '.price($price,0,$langs,0,0,-1,$conf->currency), "title" => $langs->trans("PMPValueShort").': '.price($price,0,$langs,0,0,-1,$conf->currency)); // For price field, we must use price2num(), for label or title, price()
|
||||
}
|
||||
}
|
||||
|
||||
echo json_encode($prices);
|
||||
|
||||
@ -2371,7 +2371,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
$response = new WorkboardResponse();
|
||||
$response->warning_delay=$conf->commande->fournisseur->warning_delay/60/60/24;
|
||||
$response->label=$langs->trans("SuppliersOrdersToProcess");
|
||||
$response->url=DOL_URL_ROOT.'/fourn/commande/list.php?statut=1,2,3';
|
||||
$response->url=DOL_URL_ROOT.'/fourn/commande/list.php?statut=1,2,3&mainmenu=commercial&leftmenu=orders_suppliers';
|
||||
$response->img=img_object($langs->trans("Orders"),"order");
|
||||
|
||||
while ($obj=$this->db->fetch_object($resql))
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
* Copyright (C) 2010-2015 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2014-2016 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015 Bahfir Abbes <bafbes@gmail.com>
|
||||
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
@ -652,7 +652,16 @@ class FactureFournisseur extends CommonInvoice
|
||||
|
||||
dol_syslog(get_class($this)."::update", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
|
||||
|
||||
if (!$resql) {
|
||||
$error++;
|
||||
|
||||
if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
|
||||
$this->errors[] = $langs->trans('ErrorRefAlreadyExists');
|
||||
} else {
|
||||
$this->errors[] = "Error ".$this->db->lasterror();
|
||||
}
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
@ -1438,7 +1447,7 @@ class FactureFournisseur extends CommonInvoice
|
||||
$response = new WorkboardResponse();
|
||||
$response->warning_delay=$conf->facture->fournisseur->warning_delay/60/60/24;
|
||||
$response->label=$langs->trans("SupplierBillsToPay");
|
||||
$response->url=DOL_URL_ROOT.'/fourn/facture/list.php?filtre=fac.fk_statut:1,paye:0';
|
||||
$response->url=DOL_URL_ROOT.'/fourn/facture/list.php?filtre=fac.fk_statut:1,paye:0&mainmenu=accountancy&leftmenu=suppliers_bills';
|
||||
$response->img=img_object($langs->trans("Bills"),"bill");
|
||||
|
||||
$facturestatic = new FactureFournisseur($this->db);
|
||||
|
||||
@ -433,7 +433,7 @@ class ProductFournisseur extends Product
|
||||
$sql.= " pfp.price, pfp.quantity, pfp.unitprice, pfp.remise_percent, pfp.remise, pfp.tva_tx, pfp.fk_availability, pfp.charges, pfp.unitcharges, pfp.info_bits, pfp.delivery_time_days";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price as pfp";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= " WHERE pfp.entity IN (".getEntity('product', 1).")";
|
||||
$sql.= " WHERE pfp.entity IN (".getEntity('productprice', 1).")";
|
||||
$sql.= " AND pfp.fk_soc = s.rowid";
|
||||
$sql.= " AND pfp.fk_product = ".$prodid;
|
||||
if (empty($sortfield)) $sql.= " ORDER BY s.nom, pfp.quantity, pfp.price";
|
||||
|
||||
@ -1006,7 +1006,6 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
$idprod = $productsupplier->find_min_price_product_fournisseur($lines[$i]->fk_product, $lines[$i]->qty);
|
||||
$res = $productsupplier->fetch($idProductFourn);
|
||||
|
||||
$result = $object->addline(
|
||||
$desc,
|
||||
@ -1017,7 +1016,7 @@ if (empty($reshook))
|
||||
$lines[$i]->localtax2_tx,
|
||||
$lines[$i]->fk_product,
|
||||
$productsupplier->product_fourn_price_id,
|
||||
$productsupplier->ref_fourn,
|
||||
$productsupplier->fourn_ref,
|
||||
$lines[$i]->remise_percent,
|
||||
'HT',
|
||||
0,
|
||||
|
||||
@ -386,6 +386,7 @@ if ($id > 0 || ! empty($ref))
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseurdet as l";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON l.fk_product=p.rowid";
|
||||
$sql.= " WHERE l.fk_commande = ".$commande->id;
|
||||
if(empty($conf->global->STOCK_SUPPORTS_SERVICES)) $sql.= " AND l.product_type = 0";
|
||||
$sql.= " GROUP BY p.ref, p.label, p.tobatch, l.rowid, l.fk_product, l.subprice, l.remise_percent"; // Calculation of amount dispatched is done per fk_product so we must group by fk_product
|
||||
$sql.= " ORDER BY p.ref, p.label";
|
||||
|
||||
|
||||
@ -238,8 +238,11 @@ if (empty($reshook))
|
||||
// Set supplier ref
|
||||
if ($action == 'setref_supplier' && $user->rights->fournisseur->commande->creer)
|
||||
{
|
||||
$result=$object->setValueFrom('ref_supplier',GETPOST('ref_supplier','alpha'));
|
||||
if ($result < 0) dol_print_error($db, $object->error);
|
||||
$object->ref_supplier = GETPOST('ref_supplier', 'alpha');
|
||||
|
||||
if ($object->update($user) < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
// payments conditions
|
||||
@ -1349,7 +1352,7 @@ if ($action == 'create')
|
||||
}
|
||||
else
|
||||
{
|
||||
print $form->select_company(GETPOST('socid','int'),'socid','s.fournisseur = 1',1);
|
||||
print $form->select_company(GETPOST('socid','int'),'socid','s.fournisseur = 1','SelectThirdParty');
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -225,10 +225,19 @@ if ($search_amount_all_tax != '')
|
||||
$sql .= natural_search('fac.total_ttc', $search_amount_all_tax, 1);
|
||||
}
|
||||
|
||||
if ($search_status != '')
|
||||
if ($search_status != '' && $search_status>=0)
|
||||
{
|
||||
$sql.= " AND fac.fk_statut = ".$search_status;
|
||||
}
|
||||
if ($filter && $filter != -1)
|
||||
{
|
||||
$aFilter = explode(',', $filter);
|
||||
foreach ($aFilter as $fil)
|
||||
{
|
||||
$filt = explode(':', $fil);
|
||||
$sql .= ' AND ' . trim($filt[0]) . ' = ' . trim($filt[1]);
|
||||
}
|
||||
}
|
||||
|
||||
$nbtotalofrecords = 0;
|
||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||
@ -266,7 +275,7 @@ if ($resql)
|
||||
if ($search_amount_no_tax) $param.='&search_amount_no_tax='.urlencode($search_amount_no_tax);
|
||||
if ($search_amount_all_tax) $param.='&search_amount_all_tax='.urlencode($search_amount_all_tax);
|
||||
if ($filter && $filter != -1) $param.='&filtre='.urlencode($filter);
|
||||
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
||||
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
||||
if ($search_status >= 0) $param.="&search_status=".$search_status;
|
||||
|
||||
print_barre_liste($langs->trans("BillsSuppliers").($socid?" $soc->name.":""),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords,'title_accountancy');
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* Copyright (C) 2012-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012-2016 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* 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
|
||||
@ -117,7 +118,7 @@ class Holiday extends CommonObject
|
||||
*/
|
||||
function create($user, $notrigger=0)
|
||||
{
|
||||
global $conf, $langs;
|
||||
global $conf;
|
||||
$error=0;
|
||||
|
||||
$now=dol_now();
|
||||
@ -137,7 +138,8 @@ class Holiday extends CommonObject
|
||||
$sql.= "statut,";
|
||||
$sql.= "fk_validator,";
|
||||
$sql.= "fk_type,";
|
||||
$sql.= "fk_user_create";
|
||||
$sql.= "fk_user_create,";
|
||||
$sql.= "entity";
|
||||
$sql.= ") VALUES (";
|
||||
$sql.= "'".$this->fk_user."',";
|
||||
$sql.= " '".$this->db->idate($now)."',";
|
||||
@ -148,7 +150,8 @@ class Holiday extends CommonObject
|
||||
$sql.= " '1',";
|
||||
$sql.= " '".$this->fk_validator."',";
|
||||
$sql.= " '".$this->fk_type."',";
|
||||
$sql.= " ".$user->id;
|
||||
$sql.= " ".$user->id.",";
|
||||
$sql.= " ".$conf->entity;
|
||||
$sql.= ")";
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
@ -617,6 +617,11 @@ if ($step == 4 && $datatoimport)
|
||||
$obj->separator = $separator;
|
||||
$obj->enclosure = $enclosure;
|
||||
}
|
||||
|
||||
$update = GETPOST('update');
|
||||
if(!empty($update)) {
|
||||
$array_match_file_to_database=array();
|
||||
}
|
||||
|
||||
// Load source fields in input file
|
||||
$fieldssource=array();
|
||||
@ -738,7 +743,7 @@ if ($step == 4 && $datatoimport)
|
||||
print '<input type="text" size="1" name="separator" value="'.htmlentities($separator).'"/>';
|
||||
print ' '.$langs->trans("Enclosure").' : ';
|
||||
print '<input type="text" size="1" name="enclosure" value="'.htmlentities($enclosure).'"/>';
|
||||
print '<input type="submit" value="'.$langs->trans('Update').'" class="button" />';
|
||||
print '<input name="update" type="submit" value="'.$langs->trans('Update').'" class="button" />';
|
||||
print '</form>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -107,7 +107,7 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 5
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 55, 5, '10.7','0','USt. Landwirtschaft', 0);
|
||||
|
||||
-- GREECE (id country=102)
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,localtax1,localtax1_type,localtax2,localtax2_type,recuperableonly,note,active) values (2462, 102, 23, 0, '0', 0, '0', 0, 'Κανονικός Φ.Π.Α.', 1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,localtax1,localtax1_type,localtax2,localtax2_type,recuperableonly,note,active) values (2462, 102, 24, 0, '0', 0, '0', 0, 'Κανονικός Φ.Π.Α.', 1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,localtax1,localtax1_type,localtax2,localtax2_type,recuperableonly,note,active) values (2463, 102, 0, 0, '0', 0, '0', 0, 'Μηδενικό Φ.Π.Α.', 1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,localtax1,localtax1_type,localtax2,localtax2_type,recuperableonly,note,active) values (2464, 102, 13, 0, '0', 0, '0', 0, 'Μειωμένος Φ.Π.Α.', 1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,localtax1,localtax1_type,localtax2,localtax2_type,recuperableonly,note,active) values (2465, 102, 6.5, 0, '0', 0, '0', 0, 'Υπερμειωμένος Φ.Π.Α.', 1);
|
||||
|
||||
@ -54,7 +54,7 @@ ALTER TABLE llx_askpricesupplier RENAME TO llx_supplier_proposal;
|
||||
ALTER TABLE llx_askpricesupplierdet RENAME TO llx_supplier_proposaldet;
|
||||
ALTER TABLE llx_askpricesupplier_extrafields RENAME TO llx_supplier_proposal_extrafields;
|
||||
ALTER TABLE llx_askpricesupplierdet_extrafields RENAME TO llx_supplier_proposaldet_extrafields;
|
||||
ALTER TABLE llx_supplier_proposaldet CHANGE COLUMN fk_asksupplierprice fk_supplier_proposal integer NOT NULL;
|
||||
ALTER TABLE llx_supplier_proposaldet CHANGE COLUMN fk_askpricesupplier fk_supplier_proposal integer NOT NULL;
|
||||
|
||||
-- Fix bad data
|
||||
update llx_opensurvey_sondage set format = 'D' where format = 'D+';
|
||||
@ -607,3 +607,7 @@ INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (14
|
||||
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (1482, 148, '7','0','VAT reduced rate',1);
|
||||
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (1483, 148, '5','0','VAT super-reduced rate', 1);
|
||||
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (1484, 148, '0','0','VAT Rate 0', 1);
|
||||
|
||||
-- VMYSQL4.1 ALTER TABLE llx_c_type_resource CHANGE COLUMN rowid rowid integer NOT NULL AUTO_INCREMENT;
|
||||
|
||||
ALTER TABLE llx_import_model MODIFY COLUMN type varchar(50);
|
||||
|
||||
@ -57,7 +57,33 @@ delete from llx_adherent_extrafields where fk_object not in (select rowid from l
|
||||
delete from llx_product_extrafields where fk_object not in (select rowid from llx_product);
|
||||
--delete from llx_societe_commerciaux where fk_soc not in (select rowid from llx_societe);
|
||||
|
||||
|
||||
-- Clean stocks
|
||||
|
||||
-- Reference for qty is llx_product_stock (detail in llx_product_batch may be not complete)
|
||||
-- qty in llx_product may be not up to date
|
||||
update llx_product_batch set batch = '' where batch = 'Non défini';
|
||||
update llx_product_batch set batch = '' where batch = 'Non défini';
|
||||
|
||||
DELETE FROM llx_product_stock WHERE reel = 0 AND rowid NOT IN (SELECT fk_product_stock FROM llx_product_batch as pb);
|
||||
|
||||
-- Merge splitted lines into one in table llx_product_batch
|
||||
DROP TABLE tmp_llx_product_batch;
|
||||
DROP TABLE tmp_llx_product_batch2;
|
||||
CREATE TABLE tmp_llx_product_batch AS select fk_product_stock, eatby, sellby, batch, SUM(qty) as qty, COUNT(rowid) as nb FROM llx_product_batch GROUP BY fk_product_stock, eatby, sellby, batch HAVING COUNT(rowid) > 1;
|
||||
CREATE TABLE tmp_llx_product_batch2 AS select pb.rowid, pb.fk_product_stock, pb.eatby, pb.sellby, pb.batch, pb.qty from llx_product_batch as pb, tmp_llx_product_batch as tpb where pb.fk_product_stock = tpb.fk_product_stock and COALESCE(pb.eatby, '') = COALESCE(tpb.eatby,'') and COALESCE(pb.sellby, '') = COALESCE(tpb.sellby, '') and pb.batch = tpb.batch;
|
||||
--select * from tmp_llx_product_batch;
|
||||
--select * from tmp_llx_product_batch2;
|
||||
DELETE FROM llx_product_batch WHERE rowid IN (select rowid FROM tmp_llx_product_batch2);
|
||||
INSERT INTO llx_product_batch(fk_product_stock, eatby, sellby, batch, qty) SELECT fk_product_stock, eatby, sellby, batch, qty FROM tmp_llx_product_batch;
|
||||
|
||||
DELETE FROM llx_product_stock WHERE reel = 0 AND rowid NOT IN (SELECT fk_product_stock FROM llx_product_batch as pb);
|
||||
DELETE FROM llx_product_batch WHERE qty = 0;
|
||||
|
||||
|
||||
-- Stock calculation on product
|
||||
UPDATE llx_product p SET p.stock= (SELECT SUM(ps.reel) FROM llx_product_stock ps WHERE ps.fk_product = p.rowid);
|
||||
|
||||
|
||||
-- Fix: delete category child with no category parent.
|
||||
drop table tmp_categorie;
|
||||
@ -112,9 +138,6 @@ insert into llx_c_actioncomm (id, code, type, libelle, module, position) values
|
||||
insert into llx_c_actioncomm (id, code, type, libelle, module, position) values ( 50, 'AC_OTH', 'system', 'Other' ,NULL, 5);
|
||||
|
||||
|
||||
-- Stock calculation on product
|
||||
UPDATE llx_product p SET p.stock= (SELECT SUM(ps.reel) FROM llx_product_stock ps WHERE ps.fk_product = p.rowid);
|
||||
|
||||
|
||||
-- VMYSQL4.1 DELETE T1 FROM llx_boxes_def as T1, llx_boxes_def as T2 where T1.entity = T2.entity AND T1.file = T2.file AND T1.note = T2.note and T1.rowid > T2.rowid;
|
||||
-- VPGSQL8.2 DELETE FROM llx_boxes_def as T1 WHERE rowid NOT IN (SELECT min(rowid) FROM llx_boxes_def GROUP BY file, entity, note);
|
||||
|
||||
@ -23,6 +23,6 @@ create table llx_import_model
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
fk_user integer DEFAULT 0 NOT NULL,
|
||||
label varchar(50) NOT NULL,
|
||||
type varchar(20) NOT NULL,
|
||||
type varchar(50) NOT NULL,
|
||||
field text NOT NULL
|
||||
)ENGINE=innodb;
|
||||
@ -199,6 +199,6 @@ OppStatusQUAL=المؤهل العلمى
|
||||
OppStatusPROPO=مقترح
|
||||
OppStatusNEGO=Negociation
|
||||
OppStatusPENDING=بانتظار
|
||||
OppStatusWIN=فاز
|
||||
OppStatusWON=فاز
|
||||
OppStatusLOST=ضائع
|
||||
Budget=Budget
|
||||
|
||||
@ -199,6 +199,6 @@ OppStatusQUAL=Qualification
|
||||
OppStatusPROPO=Proposal
|
||||
OppStatusNEGO=Negociation
|
||||
OppStatusPENDING=Pending
|
||||
OppStatusWIN=Won
|
||||
OppStatusWON=Won
|
||||
OppStatusLOST=Lost
|
||||
Budget=Budget
|
||||
|
||||
@ -199,6 +199,6 @@ OppStatusQUAL=Qualification
|
||||
OppStatusPROPO=Proposal
|
||||
OppStatusNEGO=Negociation
|
||||
OppStatusPENDING=Pending
|
||||
OppStatusWIN=Won
|
||||
OppStatusWON=Won
|
||||
OppStatusLOST=Lost
|
||||
Budget=Budget
|
||||
|
||||
@ -199,6 +199,6 @@ OppStatusQUAL=Qualificació
|
||||
OppStatusPROPO=Pressupost
|
||||
OppStatusNEGO=Negociació
|
||||
OppStatusPENDING=Pendent
|
||||
OppStatusWIN=Guanyat
|
||||
OppStatusWON=Guanyat
|
||||
OppStatusLOST=Perdut
|
||||
Budget=Budget
|
||||
|
||||
@ -199,6 +199,6 @@ OppStatusQUAL=Qualification
|
||||
OppStatusPROPO=Proposal
|
||||
OppStatusNEGO=Negociation
|
||||
OppStatusPENDING=Pending
|
||||
OppStatusWIN=Won
|
||||
OppStatusWON=Won
|
||||
OppStatusLOST=Lost
|
||||
Budget=Budget
|
||||
|
||||
@ -199,6 +199,6 @@ OppStatusQUAL=Qualification
|
||||
OppStatusPROPO=Proposal
|
||||
OppStatusNEGO=Negociation
|
||||
OppStatusPENDING=Pending
|
||||
OppStatusWIN=Won
|
||||
OppStatusWON=Won
|
||||
OppStatusLOST=Lost
|
||||
Budget=Budget
|
||||
|
||||
@ -199,6 +199,6 @@ OppStatusQUAL=Qualifikation
|
||||
OppStatusPROPO=Angebot
|
||||
OppStatusNEGO=Verhandlung
|
||||
OppStatusPENDING=Anstehend
|
||||
OppStatusWIN=Gewonnen
|
||||
OppStatusWON=Gewonnen
|
||||
OppStatusLOST=Verloren
|
||||
Budget=Budget
|
||||
|
||||
@ -1509,6 +1509,7 @@ MenuDeleted=Menu deleted
|
||||
TreeMenu=Tree menus
|
||||
Menus=Menus
|
||||
TreeMenuPersonalized=Personalized menus
|
||||
NotTopTreeMenuPersonalized=Personalized menus not linked to a top menu entry
|
||||
NewMenu=New menu
|
||||
MenuConf=Menus setup
|
||||
Menu=Selection of menu
|
||||
@ -1710,3 +1711,4 @@ TitleExampleForMaintenanceRelease=Example of message you can use to announce thi
|
||||
ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version %s is a major release with a lot of new features for both users and developers. You can download it from the download area of http://www.dolibarr.org portal (subdirectory Stable versions). You can read <a href="https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog">ChangeLog</a> for complete list of changes.
|
||||
ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so it contains only fixes of bugs. We recommend everybody using an older version to upgrade to this one. As any maintenance release, no new features, nor data structure change is present into this version. You can download it from the download area of http://www.dolibarr.org portal (subdirectory Stable versions). You can read <a href="https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog">ChangeLog</a> for complete list of changes.
|
||||
MultiPriceRuleDesc=When option "Several level of prices per product/service" is on, you can define different prices (one per price level) for each product. To save you time, you can enter here rule to have price for each level autocalculated according to price of first level, so you will have to enter only price for first level on each product. This page is here to save you time and can be usefull only if your prices for each leve are relative to first level. You can ignore this page in most cases.
|
||||
activateModuleDependNotSatisfied=Module "%s" depends on module "%s" that is missing, so module "%1$s" may not work correclty. Please install module "%2$s" or disable module "%1$s" if you want to be safe from any surprise
|
||||
|
||||
@ -321,8 +321,8 @@ PaymentConditionPT_5050=50%% in advance, 50%% on delivery
|
||||
FixAmount=Fix amount
|
||||
VarAmount=Variable amount (%% tot.)
|
||||
# PaymentType
|
||||
PaymentTypeVIR=Bank deposit
|
||||
PaymentTypeShortVIR=Bank deposit
|
||||
PaymentTypeVIR=Bank transfer
|
||||
PaymentTypeShortVIR=Bank transfer
|
||||
PaymentTypePRE=Bank's order
|
||||
PaymentTypeShortPRE=Bank's order
|
||||
PaymentTypeLIQ=Cash
|
||||
|
||||
@ -154,6 +154,7 @@ Save=Save
|
||||
SaveAs=Save As
|
||||
TestConnection=Test connection
|
||||
ToClone=Clone
|
||||
ConfirmCloneAction=Are you sure you want to clone this event ?
|
||||
ConfirmClone=Choose data you want to clone :
|
||||
NoCloneOptionsSpecified=No data to clone defined.
|
||||
Of=of
|
||||
|
||||
@ -124,6 +124,7 @@ Int=Int
|
||||
DateAndTime=Date and time
|
||||
PublicMemberCard=Member public card
|
||||
MemberNotOrNoMoreExpectedToSubscribe=Member not or no more expected to subscribe
|
||||
SubscriptionNotRecorded=Subscription not recorded
|
||||
AddSubscription=Create subscription
|
||||
ShowSubscription=Show subscription
|
||||
MemberModifiedInDolibarr=Member modified in Dolibarr
|
||||
|
||||
@ -157,11 +157,13 @@ StatsByNumberOfEntities=Statistics in number of referring entities
|
||||
NumberOfProposals=Number of proposals on last 12 month
|
||||
NumberOfCustomerOrders=Number of customer orders on last 12 month
|
||||
NumberOfCustomerInvoices=Number of customer invoices on last 12 month
|
||||
NumberOfSupplierProposals=Number of supplier proposals on last 12 month
|
||||
NumberOfSupplierOrders=Number of supplier orders on last 12 month
|
||||
NumberOfSupplierInvoices=Number of supplier invoices on last 12 month
|
||||
NumberOfUnitsProposals=Number of units on proposals on last 12 month
|
||||
NumberOfUnitsCustomerOrders=Number of units on customer orders on last 12 month
|
||||
NumberOfUnitsCustomerInvoices=Number of units on customer invoices on last 12 month
|
||||
NumberOfUnitsSupplierProposals=Number of units on supplier proposals on last 12 month
|
||||
NumberOfUnitsSupplierOrders=Number of units on supplier orders on last 12 month
|
||||
NumberOfUnitsSupplierInvoices=Number of units on supplier invoices on last 12 month
|
||||
EMailTextInterventionValidated=The intervention %s has been validated.
|
||||
|
||||
@ -45,8 +45,6 @@ LastProducts=Last products
|
||||
CardProduct0=Product card
|
||||
CardProduct1=Service card
|
||||
CardContract=Contract card
|
||||
Warehouse=Warehouse
|
||||
Warehouses=Warehouses
|
||||
WarehouseOpened=Warehouse open
|
||||
WarehouseClosed=Warehouse closed
|
||||
Stock=Stock
|
||||
@ -130,6 +128,7 @@ AssociatedProductsAbility=Activate the package feature
|
||||
AssociatedProducts=Package product
|
||||
AssociatedProductsNumber=Number of products composing this package product
|
||||
ParentProductsNumber=Number of parent packaging product
|
||||
ParentProducts=Parent products
|
||||
IfZeroItIsNotAVirtualProduct=If 0, this product is not a package product
|
||||
IfZeroItIsNotUsedByVirtualProduct=If 0, this product is not used by any package product
|
||||
EditAssociate=Associate
|
||||
|
||||
@ -190,6 +190,6 @@ OppStatusQUAL=Qualification
|
||||
OppStatusPROPO=Proposal
|
||||
OppStatusNEGO=Negociation
|
||||
OppStatusPENDING=Pending
|
||||
OppStatusWIN=Won
|
||||
OppStatusWON=Won
|
||||
OppStatusLOST=Lost
|
||||
Budget=Budget
|
||||
@ -199,6 +199,6 @@ OppStatusQUAL=Cualificación
|
||||
OppStatusPROPO=Presupuesto
|
||||
OppStatusNEGO=Negociación
|
||||
OppStatusPENDING=Pendiente
|
||||
OppStatusWIN=Ganado
|
||||
OppStatusWON=Ganado
|
||||
OppStatusLOST=Perdido
|
||||
Budget=Budget
|
||||
|
||||
@ -199,6 +199,6 @@ OppStatusQUAL=Qualification
|
||||
OppStatusPROPO=Proposal
|
||||
OppStatusNEGO=Negociation
|
||||
OppStatusPENDING=Pending
|
||||
OppStatusWIN=Won
|
||||
OppStatusWON=Won
|
||||
OppStatusLOST=Lost
|
||||
Budget=Budget
|
||||
|
||||
@ -199,6 +199,6 @@ OppStatusQUAL=Qualification
|
||||
OppStatusPROPO=Proposal
|
||||
OppStatusNEGO=Negociation
|
||||
OppStatusPENDING=Pending
|
||||
OppStatusWIN=Won
|
||||
OppStatusWON=Won
|
||||
OppStatusLOST=Lost
|
||||
Budget=Budget
|
||||
|
||||
@ -199,6 +199,6 @@ OppStatusQUAL=Qualification
|
||||
OppStatusPROPO=Proposal
|
||||
OppStatusNEGO=Negociation
|
||||
OppStatusPENDING=Pending
|
||||
OppStatusWIN=Won
|
||||
OppStatusWON=Won
|
||||
OppStatusLOST=Lost
|
||||
Budget=Budget
|
||||
|
||||
@ -199,6 +199,6 @@ OppStatusQUAL=Qualification
|
||||
OppStatusPROPO=Proposition
|
||||
OppStatusNEGO=Négociation
|
||||
OppStatusPENDING=En attente
|
||||
OppStatusWIN=Gagné
|
||||
OppStatusWON=Gagné
|
||||
OppStatusLOST=Perdu
|
||||
Budget=Budget
|
||||
|
||||
@ -199,6 +199,6 @@ OppStatusQUAL=Qualification
|
||||
OppStatusPROPO=Proposal
|
||||
OppStatusNEGO=Negociation
|
||||
OppStatusPENDING=Pending
|
||||
OppStatusWIN=Won
|
||||
OppStatusWON=Won
|
||||
OppStatusLOST=Lost
|
||||
Budget=Budget
|
||||
|
||||
@ -199,6 +199,6 @@ OppStatusQUAL=Qualification
|
||||
OppStatusPROPO=Proposal
|
||||
OppStatusNEGO=Negociation
|
||||
OppStatusPENDING=Pending
|
||||
OppStatusWIN=Won
|
||||
OppStatusWON=Won
|
||||
OppStatusLOST=Lost
|
||||
Budget=Budget
|
||||
|
||||
@ -199,6 +199,6 @@ OppStatusQUAL=Qualification
|
||||
OppStatusPROPO=Proposal
|
||||
OppStatusNEGO=Negociation
|
||||
OppStatusPENDING=Pending
|
||||
OppStatusWIN=Won
|
||||
OppStatusWON=Won
|
||||
OppStatusLOST=Lost
|
||||
Budget=Budget
|
||||
|
||||
@ -199,6 +199,6 @@ OppStatusQUAL=Qualification
|
||||
OppStatusPROPO=Proposal
|
||||
OppStatusNEGO=Negociation
|
||||
OppStatusPENDING=Pending
|
||||
OppStatusWIN=Won
|
||||
OppStatusWON=Won
|
||||
OppStatusLOST=Lost
|
||||
Budget=Budget
|
||||
|
||||
@ -199,6 +199,6 @@ OppStatusQUAL=Qualification
|
||||
OppStatusPROPO=Proposal
|
||||
OppStatusNEGO=Negociation
|
||||
OppStatusPENDING=Pending
|
||||
OppStatusWIN=Won
|
||||
OppStatusWON=Won
|
||||
OppStatusLOST=Lost
|
||||
Budget=Budget
|
||||
|
||||
@ -199,6 +199,6 @@ OppStatusQUAL=Qualificazione
|
||||
OppStatusPROPO=Proposta
|
||||
OppStatusNEGO=Negoziazione
|
||||
OppStatusPENDING=In attesa
|
||||
OppStatusWIN=Vinto
|
||||
OppStatusWON=Vinto
|
||||
OppStatusLOST=Perso
|
||||
Budget=Budget
|
||||
|
||||
@ -199,6 +199,6 @@ OppStatusQUAL=Qualification
|
||||
OppStatusPROPO=Proposal
|
||||
OppStatusNEGO=Negociation
|
||||
OppStatusPENDING=Pending
|
||||
OppStatusWIN=Won
|
||||
OppStatusWON=Won
|
||||
OppStatusLOST=Lost
|
||||
Budget=Budget
|
||||
|
||||
@ -199,6 +199,6 @@ OppStatusQUAL=Qualification
|
||||
OppStatusPROPO=Proposal
|
||||
OppStatusNEGO=Negociation
|
||||
OppStatusPENDING=Pending
|
||||
OppStatusWIN=Won
|
||||
OppStatusWON=Won
|
||||
OppStatusLOST=Lost
|
||||
Budget=Budget
|
||||
|
||||
@ -199,6 +199,6 @@ OppStatusQUAL=Qualification
|
||||
OppStatusPROPO=Proposal
|
||||
OppStatusNEGO=Negociation
|
||||
OppStatusPENDING=Pending
|
||||
OppStatusWIN=Won
|
||||
OppStatusWON=Won
|
||||
OppStatusLOST=Lost
|
||||
Budget=Budget
|
||||
|
||||
@ -199,6 +199,6 @@ OppStatusQUAL=Qualification
|
||||
OppStatusPROPO=Proposal
|
||||
OppStatusNEGO=Negociation
|
||||
OppStatusPENDING=Pending
|
||||
OppStatusWIN=Won
|
||||
OppStatusWON=Won
|
||||
OppStatusLOST=Lost
|
||||
Budget=Budget
|
||||
|
||||
@ -199,6 +199,6 @@ OppStatusQUAL=Qualification
|
||||
OppStatusPROPO=Proposal
|
||||
OppStatusNEGO=Negociation
|
||||
OppStatusPENDING=Pending
|
||||
OppStatusWIN=Won
|
||||
OppStatusWON=Won
|
||||
OppStatusLOST=Lost
|
||||
Budget=Budget
|
||||
|
||||
@ -199,6 +199,6 @@ OppStatusQUAL=Kvalifikācija
|
||||
OppStatusPROPO=Proposal
|
||||
OppStatusNEGO=Negociation
|
||||
OppStatusPENDING=Pending
|
||||
OppStatusWIN=Won
|
||||
OppStatusWON=Won
|
||||
OppStatusLOST=Lost
|
||||
Budget=Budget
|
||||
|
||||
@ -199,6 +199,6 @@ OppStatusQUAL=Qualification
|
||||
OppStatusPROPO=Proposal
|
||||
OppStatusNEGO=Negociation
|
||||
OppStatusPENDING=Pending
|
||||
OppStatusWIN=Won
|
||||
OppStatusWON=Won
|
||||
OppStatusLOST=Lost
|
||||
Budget=Budget
|
||||
|
||||
@ -199,6 +199,6 @@ OppStatusQUAL=Kvalifikasjon
|
||||
OppStatusPROPO=Tilbud
|
||||
OppStatusNEGO=Forhandling
|
||||
OppStatusPENDING=Venter
|
||||
OppStatusWIN=Vunnet
|
||||
OppStatusWON=Vunnet
|
||||
OppStatusLOST=Tapt
|
||||
Budget=Budget
|
||||
|
||||
@ -199,6 +199,6 @@ OppStatusQUAL=Qualification
|
||||
OppStatusPROPO=Proposal
|
||||
OppStatusNEGO=Negociation
|
||||
OppStatusPENDING=Pending
|
||||
OppStatusWIN=Won
|
||||
OppStatusWON=Won
|
||||
OppStatusLOST=Lost
|
||||
Budget=Budget
|
||||
|
||||
@ -199,6 +199,6 @@ OppStatusQUAL=Kwalifikacja
|
||||
OppStatusPROPO=Wniosek
|
||||
OppStatusNEGO=Negocjacje
|
||||
OppStatusPENDING=W oczekiwaniu
|
||||
OppStatusWIN=Won
|
||||
OppStatusWON=Won
|
||||
OppStatusLOST=Zagubiony
|
||||
Budget=Budget
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user