mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: ChangeLog dev/skeletons/skeleton_list.php htdocs/accountancy/class/html.formventilation.class.php htdocs/core/lib/cron.lib.php htdocs/core/tpl/admin_extrafields_add.tpl.php
This commit is contained in:
commit
ee252f549a
27
ChangeLog
27
ChangeLog
|
|
@ -33,6 +33,33 @@ check you make a fetch on object before calling the delete.
|
|||
It was not commonly used and usage generates some problems (cost price for margin calculation not entered, vat setting).
|
||||
Set constant PRODUCT_ADD_FORM_ADD_TO to retrieve it.
|
||||
|
||||
|
||||
|
||||
***** ChangeLog for 4.0.1 compared to 4.0.0 *****
|
||||
FIX #2853
|
||||
FIX #2991
|
||||
FIX #3128
|
||||
FIX: #5699
|
||||
FIX #5734
|
||||
FIX : #5776
|
||||
FIX alignement of intervention status
|
||||
FIX Clean of search fields
|
||||
FIX Creation of donation should go back on card after creation
|
||||
FIX Date visible on project overview
|
||||
FIX Execute a dedicated job from its id may results of launching other jobs too.
|
||||
FIX: Failed to export contact categories with contact extra fields
|
||||
FIX inversion customer/supplier price
|
||||
FIX link "back to list" was not visible.
|
||||
FIX Lost filter on opportunities
|
||||
FIX Mandatory field payment term was not css highlighted.
|
||||
FIX Menu users not visible on dolidroid.
|
||||
FIX SEC for HTB23302
|
||||
FIX The email test sender in email setup was broken
|
||||
FIX Translation of "Name" is not a good choice for floow-up.
|
||||
FIX Update of maxnbrun on job list failed.
|
||||
FIX Value of payment term and project are not set on correct default value when invoice generated from template.
|
||||
FIX: vat dictionary should allow enter and edit multiple values for localtaxes, separated by: (ex -19:-15)
|
||||
|
||||
***** ChangeLog for 4.0.0 compared to 3.9.* *****
|
||||
For users:
|
||||
NEW: Add recurring invoice feature and automatic generation of invoices.
|
||||
|
|
|
|||
|
|
@ -32,11 +32,33 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
|||
exit;
|
||||
}
|
||||
|
||||
require_once($path."../htdocs/master.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
||||
|
||||
// Main
|
||||
|
||||
/*
|
||||
* Main
|
||||
*/
|
||||
|
||||
if (empty($argv[1]))
|
||||
{
|
||||
print "Usage: ".$script_file." release=x.y.z\n";
|
||||
exit -1;
|
||||
}
|
||||
parse_str($argv[1]);
|
||||
|
||||
if ($release != DOL_VERSION)
|
||||
{
|
||||
print 'Error: release is not version declared into filefunc.in.php.'."\n";
|
||||
exit -1;
|
||||
}
|
||||
|
||||
//$outputfile=dirname(__FILE__).'/../htdocs/install/filelist-'.$release.'.xml';
|
||||
$outputfile=dirname(__FILE__).'/../htdocs/install/filelist.xml';
|
||||
$outputdir=dirname(__FILE__).'/../htdocs/install';
|
||||
print 'Delete current files '.$outputdir.'/filelist*.xml'."\n";
|
||||
dol_delete_file($outputdir.'/filelist*.xml',0,1,1);
|
||||
|
||||
$outputfile=$outputdir.'/filelist-'.$release.'.xml';
|
||||
$fp = fopen($outputfile,'w');
|
||||
fputs($fp, '<?xml version="1.0" encoding="UTF-8" ?>'."\n");
|
||||
fputs($fp, '<checksum_list version="'.$release.'">'."\n");
|
||||
|
|
@ -317,8 +317,13 @@ print "\n";
|
|||
if ($CHOOSEDTARGET{'-CHKSUM'})
|
||||
{
|
||||
print 'Create xml check file with md5 checksum with command php '.$SOURCE.'/build/generate_filecheck_xml.php release='.$MAJOR.'.'.$MINOR.'.'.$BUILD."\n";
|
||||
$ret=`php $SOURCE/build/generate_filecheck_xml.php release=$MAJOR.$MINOR.$BUILD`;
|
||||
$ret=`php $SOURCE/build/generate_filelist_xml.php release=$MAJOR.$MINOR.$BUILD`;
|
||||
print $ret."\n";
|
||||
# Copy to final dir
|
||||
$NEWDESTI=$DESTI;
|
||||
print "Copy \"$SOURCE/htdocs/install/filelist-$MAJOR.$MINOR.$BUILD.xml\" to $NEWDESTI/signatures/filelist-$MAJOR.$MINOR.$BUILD.xml\n";
|
||||
use File::Copy qw(copy);
|
||||
copy "$SOURCE/htdocs/install/filelist-$MAJOR.$MINOR.$BUILD.xml", "$NEWDESTI/signatures/filelist-$MAJOR.$MINOR.$BUILD.xml";
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1132,6 +1137,7 @@ if ($nboftargetok) {
|
|||
|
||||
print "\nList of files to publish (BUILD=$BUILD)\n";
|
||||
%filestoscansf=(
|
||||
"$DESTI/signatures/filelist-$MAJOR.$MINOR.$BUILD.xml"=>'signatures',
|
||||
"$DESTI/package_rpm_generic/$FILENAMERPM"=>'Dolibarr installer for Fedora-Redhat-Mandriva-Opensuse (DoliRpm)',
|
||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'Dolibarr installer for Debian-Ubuntu (DoliDeb)',
|
||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'none',
|
||||
|
|
@ -1140,6 +1146,7 @@ if ($nboftargetok) {
|
|||
"$DESTI/standard/$FILENAMETGZ.zip"=>'Dolibarr ERP-CRM'
|
||||
);
|
||||
%filestoscanstableasso=(
|
||||
"$DESTI/signatures/filelist-$MAJOR.$MINOR.$BUILD.xml"=>'signatures',
|
||||
"$DESTI/package_rpm_generic/$FILENAMERPM"=>'package_rpm_generic',
|
||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'package_debian-ubuntu',
|
||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'package_debian-ubuntu',
|
||||
|
|
|
|||
|
|
@ -43,13 +43,13 @@ $rowid = GETPOST('rowid', 'int');
|
|||
$cancel = GETPOST('cancel');
|
||||
|
||||
// Security check
|
||||
if (! $user->admin)
|
||||
accessforbidden();
|
||||
|
||||
|
||||
$object = new AccountingAccount($db);
|
||||
|
||||
// Action
|
||||
if ($action == 'add') {
|
||||
if ($action == 'add' && $user->rights->accounting->chartofaccount)
|
||||
{
|
||||
if (! $cancel) {
|
||||
$sql = 'SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid=' . $conf->global->CHARTOFACCOUNTS;
|
||||
|
||||
|
|
@ -97,7 +97,7 @@ if ($action == 'add') {
|
|||
}
|
||||
header("Location: account.php");
|
||||
exit;
|
||||
} else if ($action == 'edit') {
|
||||
} else if ($action == 'edit' && $user->rights->accounting->chartofaccount) {
|
||||
if (! $cancel) {
|
||||
$result = $object->fetch($id);
|
||||
|
||||
|
|
@ -145,7 +145,7 @@ if ($action == 'add') {
|
|||
header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id);
|
||||
exit();
|
||||
}
|
||||
} else if ($action == 'delete') {
|
||||
} else if ($action == 'delete' && $user->rights->accounting->chartofaccount) {
|
||||
$result = $object->fetch($id);
|
||||
|
||||
if (! empty($object->id)) {
|
||||
|
|
@ -329,14 +329,14 @@ if ($action == 'create') {
|
|||
print '<td colspan="2">' . $object->pcg_subtype . '</td></tr>';
|
||||
|
||||
// Active
|
||||
print '<tr><td>' . $langs->trans("Activated") . '</td>';
|
||||
print '<tr><td>' . $langs->trans("Status") . '</td>';
|
||||
print '<td colspan="2">';
|
||||
|
||||
if (empty($object->active)) {
|
||||
print $object->getLibStatut(4);
|
||||
/*if (empty($object->active)) {
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
} else {
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
}
|
||||
}*/
|
||||
|
||||
print '</td></tr>';
|
||||
|
||||
|
|
@ -350,13 +350,13 @@ if ($action == 'create') {
|
|||
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
if ($user->admin) {
|
||||
if (! empty($user->rights->accounting->chartofaccount)) {
|
||||
print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=update&id=' . $id . '">' . $langs->trans('Modify') . '</a>';
|
||||
} else {
|
||||
print '<a class="butActionRefused" href="#" title="' . dol_escape_htmltag($langs->trans("NotAllowed")) . '">' . $langs->trans('Modify') . '</a>';
|
||||
}
|
||||
|
||||
if ($user->admin) {
|
||||
if (! empty($user->rights->accounting->chartofaccount)) {
|
||||
print '<a class="butActionDelete" href="' . $_SERVER["PHP_SELF"] . '?action=delete&id=' . $id . '">' . $langs->trans('Delete') . '</a>';
|
||||
} else {
|
||||
print '<a class="butActionRefused" href="#" title="' . dol_escape_htmltag($langs->trans("NotAllowed")) . '">' . $langs->trans('Delete') . '</a>';
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ $formventilation = new FormVentilation($db);
|
|||
$formother = new FormOther($db);
|
||||
$form = new Form($db);
|
||||
|
||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
|
||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
|
||||
{
|
||||
$search_accountancy_code_start = '';
|
||||
$search_accountancy_code_end = '';
|
||||
|
|
|
|||
|
|
@ -276,7 +276,7 @@ if ($result < 0) {
|
|||
}
|
||||
|
||||
if ($action == 'delmouv') {
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?mvt_num=' . GETPOST('mvt_num'), $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delmouvconfirm', '', 0, 1);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?mvt_num=' . GETPOST('mvt_num'), $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvtPartial'), 'delmouvconfirm', '', 0, 1);
|
||||
print $formconfirm;
|
||||
}
|
||||
if ($action == 'delbookkeepingyear') {
|
||||
|
|
|
|||
|
|
@ -45,7 +45,8 @@ class AccountingAccount extends CommonObject
|
|||
var $label;
|
||||
var $fk_user_author;
|
||||
var $fk_user_modif;
|
||||
var $active;
|
||||
var $active; // duplicate with status
|
||||
var $status;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
|
@ -103,6 +104,7 @@ class AccountingAccount extends CommonObject
|
|||
$this->fk_user_author = $obj->fk_user_author;
|
||||
$this->fk_user_modif = $obj->fk_user_modif;
|
||||
$this->active = $obj->active;
|
||||
$this->status = $obj->active;
|
||||
|
||||
return $this->id;
|
||||
} else {
|
||||
|
|
@ -465,4 +467,61 @@ class AccountingAccount extends CommonObject
|
|||
return - 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retourne le libelle du statut d'un user (actif, inactif)
|
||||
*
|
||||
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
|
||||
* @return string Label of status
|
||||
*/
|
||||
function getLibStatut($mode=0)
|
||||
{
|
||||
return $this->LibStatut($this->status,$mode);
|
||||
}
|
||||
|
||||
/**
|
||||
* Renvoi le libelle d'un statut donne
|
||||
*
|
||||
* @param int $statut Id statut
|
||||
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
|
||||
* @return string Label of status
|
||||
*/
|
||||
function LibStatut($statut,$mode=0)
|
||||
{
|
||||
global $langs;
|
||||
$langs->load('users');
|
||||
|
||||
if ($mode == 0)
|
||||
{
|
||||
$prefix='';
|
||||
if ($statut == 1) return $langs->trans('Enabled');
|
||||
if ($statut == 0) return $langs->trans('Disabled');
|
||||
}
|
||||
if ($mode == 1)
|
||||
{
|
||||
if ($statut == 1) return $langs->trans('Enabled');
|
||||
if ($statut == 0) return $langs->trans('Disabled');
|
||||
}
|
||||
if ($mode == 2)
|
||||
{
|
||||
if ($statut == 1) return img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled');
|
||||
if ($statut == 0) return img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('Disabled');
|
||||
}
|
||||
if ($mode == 3)
|
||||
{
|
||||
if ($statut == 1) return img_picto($langs->trans('Enabled'),'statut4');
|
||||
if ($statut == 0) return img_picto($langs->trans('Disabled'),'statut5');
|
||||
}
|
||||
if ($mode == 4)
|
||||
{
|
||||
if ($statut == 1) return img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled');
|
||||
if ($statut == 0) return img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('Disabled');
|
||||
}
|
||||
if ($mode == 5)
|
||||
{
|
||||
if ($statut == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'),'statut4');
|
||||
if ($statut == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut5');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,17 +65,16 @@ class FormVentilation extends Form
|
|||
/**
|
||||
* Return list of accounts with label by chart of accounts
|
||||
*
|
||||
* @param string $selectid Preselected chart of accounts
|
||||
* @param string $htmlname Name of field in html form
|
||||
* @param int $showempty Add an empty field
|
||||
* @param array $event Event options
|
||||
* @param int $select_in $selectid value is a aa.rowid (0 default) or aa.account_number (1)
|
||||
* @param int $select_out set value returned by select 0=rowid (default), 1=account_number
|
||||
* @param int $aabase set accounting_account base class to display empty=all or from 1 to 8 will display only account beginning by this number
|
||||
*
|
||||
* @param string $selectid Preselected chart of accounts
|
||||
* @param string $htmlname Name of field in html form
|
||||
* @param int $showempty Add an empty field
|
||||
* @param array $event Event options
|
||||
* @param int $select_in selectid value is a aa.rowid (0 default) or aa.account_number (1)
|
||||
* @param int $select_out set value returned by select 0=rowid (default), 1=account_number
|
||||
* @param string $morecss More css non HTML object
|
||||
* @return string String with HTML select
|
||||
*/
|
||||
function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $aabase = '') {
|
||||
function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $morecss='maxwidth300 maxwidthonsmartphone') {
|
||||
global $conf;
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
|
|
@ -126,7 +125,7 @@ class FormVentilation extends Form
|
|||
$options[$select_value_out] = $label;
|
||||
}
|
||||
|
||||
$out .= Form::selectarray($htmlname, $options, $selected, $showempty, 0, 0, '', 0, 0, 0, '', 'maxwidth300');
|
||||
$out .= Form::selectarray($htmlname, $options, $selected, $showempty, 0, 0, '', 0, 0, 0, '', $morecss);
|
||||
$this->db->free($resql);
|
||||
return $out;
|
||||
}
|
||||
|
|
@ -322,15 +321,15 @@ class FormVentilation extends Form
|
|||
/**
|
||||
* Return HTML combo list of years existing into book keepping
|
||||
*
|
||||
* @param string $selected Preselected value
|
||||
* @param string $htmlname Name of HTML select object
|
||||
* @param int $useempty Affiche valeur vide dans liste
|
||||
* @param string $output_format (html/opton (for option html only)/array (to return options arrays
|
||||
* @param string $selected Preselected value
|
||||
* @param string $htmlname Name of HTML select object
|
||||
* @param int $useempty Affiche valeur vide dans liste
|
||||
* @param string $output_format Html/option (for option html only)/array (to return options arrays
|
||||
* @return string/array
|
||||
*/
|
||||
function selectjournal_accountancy_bookkepping($selected = '', $htmlname = 'journalid', $useempty = 0, $output_format = 'html')
|
||||
{
|
||||
global $conf;
|
||||
global $conf,$langs;
|
||||
|
||||
$out_array = array();
|
||||
|
||||
|
|
@ -349,7 +348,7 @@ class FormVentilation extends Form
|
|||
return -1;
|
||||
}
|
||||
while ($obj = $this->db->fetch_object($resql)) {
|
||||
$out_array[$obj->code_journal] = $obj->code_journal;
|
||||
$out_array[$obj->code_journal] = $obj->code_journal?$obj->code_journal:$langs->trans("NotDefined"); // TODO Not defined is accepted ? We should avoid this, shouldn't we ?
|
||||
}
|
||||
$this->db->free($resql);
|
||||
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ if ($action == 'validatehistory') {
|
|||
setEventMessages($db->lasterror(), null, 'errors');
|
||||
} else {
|
||||
$db->commit();
|
||||
setEventMessages($langs->trans('Dispatched'), null, 'mesgs');
|
||||
setEventMessages($langs->trans('AutomaticBindingDone'), null, 'mesgs');
|
||||
}
|
||||
} elseif ($action == 'fixaccountancycode') {
|
||||
$error = 0;
|
||||
|
|
@ -133,9 +133,11 @@ if ($action == 'validatehistory') {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader('', $langs->trans("CustomersVentilation"));
|
||||
|
||||
$textprevyear = '<a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current - 1) . '">' . img_previous() . '</a>';
|
||||
|
|
@ -143,11 +145,14 @@ $textnextyear = ' <a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_cur
|
|||
|
||||
print load_fiche_titre($langs->trans("CustomersVentilation") . " " . $textprevyear . " " . $langs->trans("Year") . " " . $year_start . " " . $textnextyear);
|
||||
|
||||
print '<b>' . $langs->trans("DescVentilCustomer") . '</b>';
|
||||
print $langs->trans("DescVentilCustomer") . '<br>';
|
||||
print $langs->trans("DescVentilMore", $langs->transnoentitiesnoconv("ValidateHistory"), $langs->transnoentitiesnoconv("ToDispatch")) . '<br>';
|
||||
print '<br>';
|
||||
print '<div class="inline-block divButAction">';
|
||||
print '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=validatehistory">' . $langs->trans("ValidateHistory") . '</a>';
|
||||
print '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=fixaccountancycode">' . $langs->trans("CleanFixHistory", $year_current) . '</a>';
|
||||
print '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=cleanaccountancycode">' . $langs->trans("CleanHistory", $year_current) . '</a>';
|
||||
print '<a class="butActionDelete" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=cleanaccountancycode">' . $langs->trans("CleanHistory", $year_current) . '</a>';
|
||||
// TODO Remove this. Should be done always.
|
||||
print '<a class="butActionDelete" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=fixaccountancycode">' . $langs->trans("CleanFixHistory", $year_current) . '</a>';
|
||||
print '</div>';
|
||||
|
||||
$sql = "SELECT count(*) FROM " . MAIN_DB_PREFIX . "facturedet as fd";
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ if ($result) {
|
|||
print_liste_field_titre($langs->trans("VATRate"), $_SERVER["PHP_SELF"], "fd.tva_tx", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Account"), $_SERVER["PHP_SELF"], "aa.account_number", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Country"), $_SERVER["PHP_SELF"], "co.label", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("IntracommunityVATNumber"), $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("VATIntra"), $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Ventilate") . '<br><label id="select-all">' . $langs->trans('All') . '</label>/<label id="unselect-all">' . $langs->trans('None') . '</label>', '', '', '', '', 'align="center"');
|
||||
print "</tr>\n";
|
||||
|
||||
|
|
@ -272,11 +272,11 @@ if ($result) {
|
|||
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_ref" value="' . $search_ref . '"></td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_label" value="' . $search_label . '"></td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat" size="15" name="search_desc" value="' . $search_desc . '"></td>';
|
||||
print '<td class="liste_titre" align="center"><input type="text" class="flat" size="8" name="search_amount" value="' . $search_amount . '"></td>';
|
||||
print '<td class="liste_titre" align="center"><input type="text" class="flat" size="5" name="search_vat" value="' . $search_vat . '">%</td>';
|
||||
print '<td class="liste_titre" align="right"><input type="text" class="flat" size="6" name="search_amount" value="' . $search_amount . '"></td>';
|
||||
print '<td class="liste_titre" align="right"><input type="text" class="flat" size="3" name="search_vat" value="' . $search_vat . '">%</td>';
|
||||
print '<td class="liste_titre" align="center"><input type="text" class="flat" size="10" name="search_account" value="' . $search_account . '"></td>';
|
||||
print '<td class="liste_titre" align="center"><input type="text" class="flat" size="10" name="search_country" value="' . $search_country . '"></td>';
|
||||
print '<td class="liste_titre" align="center"><input type="text" class="flat" size="10" name="search_tavintra" value="' . $search_tavintra . '"></td>';
|
||||
print '<td class="liste_titre" align="center"><input type="text" class="flat" name="search_country" value="' . $search_country . '"></td>';
|
||||
print '<td class="liste_titre" align="center"><input type="text" class="flat" name="search_tavintra" value="' . $search_tavintra . '"></td>';
|
||||
print '<td class="liste_titre" align="center"><input type="image" class="liste_titre" name="button_search" src="' . img_picto($langs->trans("Search"), 'search.png', '', '', 1) . '" value="' . dol_escape_htmltag($langs->trans("Search")) . '" title="' . dol_escape_htmltag($langs->trans("Search")) . '">';
|
||||
print '<input type="image" class="liste_titre" name="button_removefilter" src="' . img_picto($langs->trans("Search"), 'searchclear.png', '', '', 1) . '" value="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '" title="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '">';
|
||||
print "</td></tr>\n";
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ if ($action == 'validatehistory') {
|
|||
setEventMessages($db->lasterror(), null, 'errors');
|
||||
} else {
|
||||
$db->commit();
|
||||
setEventMessages($langs->trans('Dispatched'), null, 'mesgs');
|
||||
setEventMessages($langs->trans('AutomaticBindingDone'), null, 'mesgs');
|
||||
}
|
||||
} elseif ($action == 'fixaccountancycode') {
|
||||
$error = 0;
|
||||
|
|
@ -140,11 +140,15 @@ $textnextyear = ' <a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_cur
|
|||
|
||||
print load_fiche_titre($langs->trans("SuppliersVentilation") . " " . $textprevyear . " " . $langs->trans("Year") . " " . $year_start . " " . $textnextyear);
|
||||
|
||||
print '<b>' . $langs->trans("DescVentilSupplier") . '</b>';
|
||||
print $langs->trans("DescVentilSupplier") . '<br>';
|
||||
print $langs->trans("DescVentilMore", $langs->transnoentitiesnoconv("ValidateHistory"), $langs->transnoentitiesnoconv("ToDispatch")) . '<br>';
|
||||
print '<br>';
|
||||
|
||||
print '<div class="inline-block divButAction">';
|
||||
print '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=validatehistory">' . $langs->trans("ValidateHistory") . '</a>';
|
||||
print '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=fixaccountancycode">' . $langs->trans("CleanFixHistory", $year_current) . '</a>';
|
||||
print '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=cleanaccountancycode">' . $langs->trans("CleanHistory", $year_current) . '</a>';
|
||||
print '<a class="butActionDelete" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=cleanaccountancycode">' . $langs->trans("CleanHistory", $year_current) . '</a>';
|
||||
// TODO Remove this. Should be done always.
|
||||
print '<a class="butActionDelete" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=fixaccountancycode">' . $langs->trans("CleanFixHistory", $year_current) . '</a>';
|
||||
print '</div>';
|
||||
|
||||
$y = $year_current;
|
||||
|
|
|
|||
|
|
@ -223,9 +223,9 @@ if ($result) {
|
|||
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_ref" value="' . $search_ref . '"></td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_label" value="' . $search_label . '"></td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat" size="15" name="search_desc" value="' . $search_desc . '"></td>';
|
||||
print '<td class="liste_titre" align="center"><input type="text" class="flat" size="8" name="search_amount" value="' . $search_amount . '"></td>';
|
||||
print '<td class="liste_titre" align="center"><input type="text" class="flat" size="5" name="search_vat" value="' . $search_vat . '">%</td>';
|
||||
print '<td class="liste_titre" align="center"><input type="text" class="flat" size="15" name="search_account" value="' . $search_account . '"></td>';
|
||||
print '<td class="liste_titre" align="right"><input type="text" class="flat" size="6" name="search_amount" value="' . $search_amount . '"></td>';
|
||||
print '<td class="liste_titre" align="right"><input type="text" class="flat" size="3" name="search_vat" value="' . $search_vat . '">%</td>';
|
||||
print '<td class="liste_titre" align="center"><input type="text" class="flat" size="10" name="search_account" value="' . $search_account . '"></td>';
|
||||
print '<td class="liste_titre" colspan="2"> </td>';
|
||||
print '<td class="liste_titre" align="right">';
|
||||
$searchpitco=$form->showFilterAndCheckAddButtons(0);
|
||||
|
|
|
|||
|
|
@ -1238,6 +1238,7 @@ if ($id)
|
|||
{
|
||||
foreach ($fieldlist as $field => $value)
|
||||
{
|
||||
|
||||
$showfield=1;
|
||||
$align="left";
|
||||
$valuetoshow=$obj->{$fieldlist[$field]};
|
||||
|
|
@ -1374,20 +1375,18 @@ if ($id)
|
|||
$valuetoshow=$localtax_typeList[$valuetoshow];
|
||||
else
|
||||
$valuetoshow = '';
|
||||
$align="center";
|
||||
$align="right";
|
||||
}
|
||||
else if ($fieldlist[$field]=='localtax2_type') {
|
||||
if ($obj->localtax2 != 0)
|
||||
$valuetoshow=$localtax_typeList[$valuetoshow];
|
||||
else
|
||||
$valuetoshow = '';
|
||||
$align="center";
|
||||
$align="right";
|
||||
}
|
||||
else if ($fieldlist[$field]=='taux') {
|
||||
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
|
||||
if ($obj->localtax1 == 0)
|
||||
$valuetoshow = '';
|
||||
$align="right";
|
||||
$align="right";
|
||||
}
|
||||
else if (in_array($fieldlist[$field],array('recuperableonly')))
|
||||
{
|
||||
|
|
@ -1567,7 +1566,7 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
|||
} // For state page, we do not show the country input (we link to region, not country)
|
||||
print '<td>';
|
||||
$fieldname='country';
|
||||
print $form->select_country((! empty($obj->country_code)?$obj->country_code:(! empty($obj->country)?$obj->country:'')), $fieldname, '', 28, 'maxwidth300');
|
||||
print $form->select_country((! empty($obj->country_code)?$obj->country_code:(! empty($obj->country)?$obj->country:'')), $fieldname, '', 28, 'maxwidth200 maxwidthonsmartphone');
|
||||
print '</td>';
|
||||
}
|
||||
elseif ($fieldlist[$field] == 'country_id')
|
||||
|
|
@ -1689,7 +1688,7 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
|||
if (! empty($conf->accounting->enabled))
|
||||
{
|
||||
$accountancy_account = (! empty($obj->$fieldlist[$field]) ? $obj->$fieldlist[$field] : 0);
|
||||
print $formaccountancy->select_account($accountancy_account, $fieldlist[$field], 1, '', 1, 1);
|
||||
print $formaccountancy->select_account($accountancy_account, $fieldlist[$field], 1, '', 1, 1, 'maxwidth200 maxwidthonsmartphone');
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -929,7 +929,7 @@ class Propal extends CommonObject
|
|||
|
||||
for ($i=0;$i<$num;$i++)
|
||||
{
|
||||
// Reset fk_parent_line for no child products and special product
|
||||
// Reset fk_parent_line for line that are not child lines or special product
|
||||
if (($this->lines[$i]->product_type != 9 && empty($this->lines[$i]->fk_parent_line)) || $this->lines[$i]->product_type == 9) {
|
||||
$fk_parent_line = 0;
|
||||
}
|
||||
|
|
@ -945,7 +945,7 @@ class Propal extends CommonObject
|
|||
$this->lines[$i]->remise_percent,
|
||||
'HT',
|
||||
0,
|
||||
0,
|
||||
$this->lines[$i]->info_bits,
|
||||
$this->lines[$i]->product_type,
|
||||
$this->lines[$i]->rang,
|
||||
$this->lines[$i]->special_code,
|
||||
|
|
@ -1161,6 +1161,7 @@ class Propal extends CommonObject
|
|||
$clonedObj->ref = $modPropale->getNextValue($objsoc,$clonedObj);
|
||||
|
||||
// Create clone
|
||||
|
||||
$result=$clonedObj->create($user);
|
||||
if ($result < 0) $error++;
|
||||
else
|
||||
|
|
@ -3635,7 +3636,11 @@ class PropaleLigne extends CommonObjectLine
|
|||
if (empty($this->fk_fournprice)) $this->fk_fournprice=0;
|
||||
if (! is_numeric($this->qty)) $this->qty = 0;
|
||||
if (empty($this->pa_ht)) $this->pa_ht=0;
|
||||
|
||||
if (empty($this->multicurrency_subprice)) $this->multicurrency_subprice=0;
|
||||
if (empty($this->multicurrency_total_ht)) $this->multicurrency_total_ht=0;
|
||||
if (empty($this->multicurrency_total_vat)) $this->multicurrency_total_vat=0;
|
||||
if (empty($this->multicurrency_total_ttc)) $this->multicurrency_total_ttc=0;
|
||||
|
||||
// if buy price not defined, define buyprice as configured in margin admin
|
||||
if ($this->pa_ht == 0 && $pa_ht_isemptystring)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1599,7 +1599,14 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||
print '<tr>';
|
||||
print '<td><label for="incoterm_id">'.$form->textwithpicto($langs->trans("IncotermLabel"), $objectsrc->libelle_incoterms, 1).'</label></td>';
|
||||
print '<td colspan="3" class="maxwidthonsmartphone">';
|
||||
print $form->select_incoterms((!empty($objectsrc->fk_incoterms) ? $objectsrc->fk_incoterms : ''), (!empty($objectsrc->location_incoterms)?$objectsrc->location_incoterms:''));
|
||||
$incoterm_id = GETPOST('incoterm_id');
|
||||
$incoterm_location = GETPOST('location_incoterms');
|
||||
if (empty($incoterm_id))
|
||||
{
|
||||
$incoterm_id = (!empty($objectsrc->fk_incoterms) ? $objectsrc->fk_incoterms : $soc->fk_incoterms);
|
||||
$incoterm_location = (!empty($objectsrc->location_incoterms) ? $objectsrc->location_incoterms : $soc->location_incoterms);
|
||||
}
|
||||
print $form->select_incoterms($incoterm_id, $incoterm_location);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ class Commande extends CommonOrder
|
|||
if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->commande->creer))
|
||||
|| (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->commande->order_advance->validate))))
|
||||
{
|
||||
$this->error='ErrorPermissionDenied';
|
||||
$this->error='NotEnoughPermissions';
|
||||
dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2435,7 +2435,14 @@ if ($action == 'create')
|
|||
print '<tr>';
|
||||
print '<td><label for="incoterm_id">'.$form->textwithpicto($langs->trans("IncotermLabel"), $objectsrc->libelle_incoterms, 1).'</label></td>';
|
||||
print '<td colspan="2" class="maxwidthonsmartphone">';
|
||||
print $form->select_incoterms((!empty($objectsrc->fk_incoterms) ? $objectsrc->fk_incoterms : ''), (!empty($objectsrc->location_incoterms)?$objectsrc->location_incoterms:''));
|
||||
$incoterm_id = GETPOST('incoterm_id');
|
||||
$incoterm_location = GETPOST('location_incoterms');
|
||||
if (empty($incoterm_id))
|
||||
{
|
||||
$incoterm_id = (!empty($objectsrc->fk_incoterms) ? $objectsrc->fk_incoterms : $soc->fk_incoterms);
|
||||
$incoterm_location = (!empty($objectsrc->location_incoterms) ? $objectsrc->location_incoterms : $soc->location_incoterms);
|
||||
}
|
||||
print $form->select_incoterms($incoterm_id, $incoterm_location);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1105,12 +1105,12 @@ class CMailFile
|
|||
$_retVal = true; // Indicates if Object was created or not
|
||||
$server_response = '';
|
||||
|
||||
while ( substr($server_response,3,1) != ' ' )
|
||||
while (substr($server_response,3,1) != ' ')
|
||||
{
|
||||
if( !( $server_response = fgets($socket, 256) ) )
|
||||
if (! ($server_response = fgets($socket, 256)) )
|
||||
{
|
||||
$this->error="Couldn't get mail server response codes";
|
||||
$_retVal = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ if (! class_exists('MenuManager'))
|
|||
}
|
||||
$menumanager = new MenuManager($db, empty($user->societe_id)?0:1);
|
||||
$menumanager->loadMenu('all','all');
|
||||
|
||||
//var_dump($menumanager->tabMenu);exit;
|
||||
$menumanager->showmenu('jmobile');
|
||||
|
||||
print '</body>';
|
||||
|
|
|
|||
|
|
@ -100,10 +100,12 @@ function dol_print_cron_urls()
|
|||
print img_picto('','object_globe.png').' <a href="'.$url.'" target="_blank">'.$url."</a><br>\n";
|
||||
print '<br>';
|
||||
|
||||
|
||||
$logintouse = 'firstadmin';
|
||||
if ($user->admin) $logintouse = $user->login;
|
||||
|
||||
print '<u>'.$langs->trans("FileToLaunchCronJobs").':</u><br>';
|
||||
|
||||
$file='/scripts/cron/cron_run_jobs.php'.' '.(empty($conf->global->CRON_KEY)?'securitykey':''.$conf->global->CRON_KEY.'').' '.$user->login.' [cronjobid]';
|
||||
$file='/scripts/cron/cron_run_jobs.php'.' '.(empty($conf->global->CRON_KEY)?'securitykey':''.$conf->global->CRON_KEY.'').' '.$logintouse.' [cronjobid]';
|
||||
print '<textarea class="quatrevingtpercent">..'.$file."</textarea><br>\n";
|
||||
print '<br>';
|
||||
|
||||
|
|
@ -116,7 +118,7 @@ function dol_print_cron_urls()
|
|||
{
|
||||
print $langs->trans("CronExplainHowToRunUnix");
|
||||
print '<br>';
|
||||
print '<textarea class="quatrevingtpercent">*/5 * * * * pathtoscript/scripts/cron/cron_run_jobs.php '.(empty($conf->global->CRON_KEY)?'securitykey':''.$conf->global->CRON_KEY.'').' '.$user->login.' > '.DOL_DATA_ROOT.'/cron_run_jobs.php.log</textarea><br>';
|
||||
print '<textarea class="quatrevingtpercent">*/5 * * * * pathtoscript/scripts/cron/cron_run_jobs.php '.(empty($conf->global->CRON_KEY)?'securitykey':''.$conf->global->CRON_KEY.'').' '.$logintouse.' > '.DOL_DATA_ROOT.'/cron_run_jobs.php.log</textarea><br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -617,7 +617,7 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable
|
|||
// Security:
|
||||
// Disallow file with some extensions. We renamed them.
|
||||
// Car si on a mis le rep documents dans un rep de la racine web (pas bien), cela permet d'executer du code a la demande.
|
||||
if (preg_match('/\.htm|\.html|\.php|\.pl|\.cgi$/i',$dest_file))
|
||||
if (preg_match('/\.htm|\.html|\.php|\.pl|\.cgi$/i',$dest_file) && empty($conf->global->MAIN_DOCUMENT_IS_OUTSIDE_WEBROOT_SO_NOEXE_NOT_REQUIRED))
|
||||
{
|
||||
$file_name.= '.noexe';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5404,7 +5404,7 @@ function printCommonFooter($zone='private')
|
|||
|
||||
print '<!-- If page_y set, we set scollbar with it -->'."\n";
|
||||
print "page_y=getParameterByName('page_y', 0);";
|
||||
print "if (page_y > 0) $('html, body').scrollTop(page_y);";
|
||||
print "if (page_y > 0) $('html, body').scrollTop(page_y);\n";
|
||||
|
||||
print '<!-- Set handler to add page_y param on some a href links -->'."\n";
|
||||
print 'jQuery(".reposition").click(function() {
|
||||
|
|
|
|||
|
|
@ -434,7 +434,8 @@ function print_end_menu_array()
|
|||
|
||||
/**
|
||||
* Core function to output left menu eldy
|
||||
*
|
||||
* Fill &$menu (example with $forcemainmenu='home' $forceleftmenu='all', return left menu tree of Home)
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param array $menu_array_before Table of menu entries to show before entries of menu handler (menu->liste filled with menu->add)
|
||||
* @param array $menu_array_after Table of menu entries to show after entries of menu handler (menu->liste filled with menu->add)
|
||||
|
|
@ -442,7 +443,7 @@ function print_end_menu_array()
|
|||
* @param Menu $menu Object Menu to return back list of menu entries
|
||||
* @param int $noout Disable output (Initialise &$menu only).
|
||||
* @param string $forcemainmenu 'x'=Force mainmenu to mainmenu='x'
|
||||
* @param string $forceleftmenu 'all'=Force leftmenu to '' (= all)
|
||||
* @param string $forceleftmenu 'all'=Force leftmenu to '' (= all). If value come being '', we change it to value in session and 'none' if not efined in session.
|
||||
* @param array $moredata An array with more data to output
|
||||
* @return int nb of menu entries
|
||||
*/
|
||||
|
|
@ -586,7 +587,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||
$newmenu->add("/user/home.php?leftmenu=users", $langs->trans("MenuUsersAndGroups"), 0, $user->rights->user->user->lire, '', $mainmenu, 'users');
|
||||
if ($user->rights->user->user->lire)
|
||||
{
|
||||
if (! empty($leftmenu) && $leftmenu=="users")
|
||||
if (empty($leftmenu) || $leftmenu=="users")
|
||||
{
|
||||
$newmenu->add("", $langs->trans("Users"), 1, $user->rights->user->user->lire || $user->admin);
|
||||
$newmenu->add("/user/card.php?leftmenu=users&action=create", $langs->trans("NewUser"),2, $user->rights->user->user->creer || $user->admin, '', 'home');
|
||||
|
|
@ -597,6 +598,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||
$newmenu->add("/user/group/index.php?leftmenu=users", $langs->trans("ListOfGroups"), 2, ($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->read:$user->rights->user->user->lire) || $user->admin);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -105,6 +105,8 @@ class MenuManager
|
|||
$menuArbo = new Menubase($this->db,'eldy');
|
||||
$menuArbo->menuLoad($mainmenu, $leftmenu, $this->type_user, 'eldy', $tabMenu);
|
||||
$this->tabMenu=$tabMenu;
|
||||
|
||||
//if ($forcemainmenu == 'all') { var_dump($this->tabMenu); exit; }
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -150,8 +152,9 @@ class MenuManager
|
|||
|
||||
if ($mode == 'jmobile')
|
||||
{
|
||||
print_eldy_menu($this->db,$this->atarget,$this->type_user,$this->tabMenu,$this->menu,1,$mode);
|
||||
|
||||
print_eldy_menu($this->db,$this->atarget,$this->type_user,$this->tabMenu,$this->menu,1,$mode); // Fill this->menu that is empty with top menu
|
||||
|
||||
print '<!-- Generate menu list from menu handler '.$this->name.' -->'."\n";
|
||||
foreach($this->menu->liste as $key => $val) // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu'
|
||||
{
|
||||
|
|
@ -169,8 +172,9 @@ class MenuManager
|
|||
$tmpmainmenu=$val['mainmenu'];
|
||||
$tmpleftmenu='all';
|
||||
$submenu=new Menu();
|
||||
print_left_eldy_menu($this->db,$this->menu_array,$this->menu_array_after,$this->tabMenu,$submenu,1,$tmpmainmenu,$tmpleftmenu);
|
||||
$nexturl=dol_buildpath($submenu->liste[0]['url'],1);
|
||||
print_left_eldy_menu($this->db,$this->menu_array,$this->menu_array_after,$this->tabMenu,$submenu,1,$tmpmainmenu,$tmpleftmenu); // Fill $submenu (example with tmpmainmenu='home' tmpleftmenu='all', return left menu tree of Home)
|
||||
//if ($tmpmainmenu.'-'.$tmpleftmenu == 'home-all') { var_dump($submenu);exit; }
|
||||
$nexturl=dol_buildpath($submenu->liste[0]['url'],1);
|
||||
|
||||
$canonrelurl=preg_replace('/\?.*$/','',$relurl);
|
||||
$canonnexturl=preg_replace('/\?.*$/','',$nexturl);
|
||||
|
|
@ -194,6 +198,7 @@ class MenuManager
|
|||
print '</a>';
|
||||
print '</li>'."\n";
|
||||
}
|
||||
|
||||
foreach($submenu->liste as $key2 => $val2) // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu']
|
||||
{
|
||||
$showmenu=true;
|
||||
|
|
|
|||
|
|
@ -338,11 +338,6 @@ class pdf_crabe extends ModelePDFFactures
|
|||
$height_incoterms = 0;
|
||||
if ($conf->incoterm->enabled)
|
||||
{
|
||||
if (is_object($object->thirdparty))
|
||||
{
|
||||
$object->fk_incoterms=$object->thirdparty->fk_incoterms;
|
||||
$object->location_incoterms=$object->thirdparty->location_incoterms;
|
||||
}
|
||||
$desc_incoterms = $object->getIncotermsForPDF();
|
||||
if ($desc_incoterms)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -121,7 +121,14 @@ class mod_syslog_chromephp extends LogHandler implements LogHandlerInterface
|
|||
|
||||
if (! file_exists($conf->global->SYSLOG_CHROMEPHP_INCLUDEPATH.'/ChromePhp.php') && ! file_exists($conf->global->SYSLOG_CHROMEPHP_INCLUDEPATH.'/ChromePhp.class.php'))
|
||||
{
|
||||
$errors[] = $langs->trans("ErrorFailedToOpenFile", 'ChromePhp.class.php or ChromePhp.php');
|
||||
if (is_object($langs)) // $langs may not be defined yet.
|
||||
{
|
||||
$errors[] = $langs->trans("ErrorFailedToOpenFile", 'ChromePhp.class.php or ChromePhp.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
$errors[] = "ErrorFailedToOpenFile ChromePhp.class.php or ChromePhp.php";
|
||||
}
|
||||
}
|
||||
|
||||
return $errors;
|
||||
|
|
@ -151,7 +158,7 @@ class mod_syslog_chromephp extends LogHandler implements LogHandlerInterface
|
|||
$res = @include_once('ChromePhp.php');
|
||||
if (! $res) $res=@include_once('ChromePhp.class.php');
|
||||
set_include_path($oldinclude);
|
||||
|
||||
|
||||
ob_start(); // To be sure headers are not flushed until all page is completely processed
|
||||
if ($content['level'] == LOG_ERR) ChromePhp::error($content['message']);
|
||||
elseif ($content['level'] == LOG_WARNING) ChromePhp::warn($content['message']);
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@
|
|||
var unique = jQuery("#unique");
|
||||
var required = jQuery("#required");
|
||||
var default_value = jQuery("#default_value");
|
||||
var alwayseditable = jQuery("#alwayseditable");
|
||||
var list = jQuery("#list");
|
||||
<?php
|
||||
if((GETPOST('type') != "select") && (GETPOST('type') != "sellist"))
|
||||
{
|
||||
|
|
@ -49,22 +51,31 @@
|
|||
}
|
||||
?>
|
||||
|
||||
if (type == 'date') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
|
||||
if (type == 'date') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
|
||||
else if (type == 'datetime') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
|
||||
else if (type == 'double') { size.val('24,8').removeAttr('disabled'); unique.removeAttr('disabled'); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
|
||||
else if (type == 'int') { size.val('10').removeAttr('disabled'); unique.removeAttr('disabled'); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
|
||||
else if (type == 'text') { size.val('2000').removeAttr('disabled'); unique.prop('disabled', true).removeAttr('checked'); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
|
||||
else if (type == 'varchar') { size.val('255').removeAttr('disabled'); unique.removeAttr('disabled'); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
|
||||
else if (type == 'boolean') { size.val('').prop('disabled', true); unique.prop('disabled', true); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide();}
|
||||
else if (type == 'price') { size.val('').prop('disabled', true); unique.prop('disabled', true); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide();}
|
||||
else if (type == 'select') { size.val('').prop('disabled', true); unique.prop('disabled', true); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
||||
else if (type == 'link') { size.val('').prop('disabled', true); unique.prop('disabled', true); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").show();}
|
||||
else if (type == 'sellist') { size.val('').prop('disabled', true); unique.prop('disabled', true); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").show();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
||||
else if (type == 'radio') { size.val('').prop('disabled', true); unique.prop('disabled', true); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
||||
else if (type == 'checkbox') { size.val('').prop('disabled', true); unique.prop('disabled', true); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
||||
else if (type == 'chkbxlst') { size.val('').prop('disabled', true); unique.prop('disabled', true); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").show();jQuery("#helplink").hide();}
|
||||
else if (type == 'separate') { size.val('').prop('disabled', true); unique.prop('disabled', true); required.val('').prop('disabled', true); default_value.val('').prop('disabled', true); jQuery("#value_choice").hide();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
||||
else {size.val('').prop('disabled', true);required.removeAttr('disabled');default_value.removeAttr('disabled');}
|
||||
else if (type == 'double') { size.val('24,8').removeAttr('disabled'); unique.removeAttr('disabled'); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
|
||||
else if (type == 'int') { size.val('10').removeAttr('disabled'); unique.removeAttr('disabled'); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
|
||||
else if (type == 'text') { size.val('2000').removeAttr('disabled'); unique.prop('disabled', true).removeAttr('checked'); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
|
||||
else if (type == 'varchar') { size.val('255').removeAttr('disabled'); unique.removeAttr('disabled'); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
|
||||
else if (type == 'boolean') { size.val('').prop('disabled', true); unique.prop('disabled', true); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide();}
|
||||
else if (type == 'price') { size.val('').prop('disabled', true); unique.prop('disabled', true); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide();}
|
||||
else if (type == 'select') { size.val('').prop('disabled', true); unique.prop('disabled', true); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
||||
else if (type == 'link') { size.val('').prop('disabled', true); unique.prop('disabled', true); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").show();}
|
||||
else if (type == 'sellist') { size.val('').prop('disabled', true); unique.prop('disabled', true); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").show();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
||||
else if (type == 'radio') { size.val('').prop('disabled', true); unique.prop('disabled', true); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
||||
else if (type == 'checkbox') { size.val('').prop('disabled', true); unique.prop('disabled', true); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
||||
else if (type == 'chkbxlst') { size.val('').prop('disabled', true); unique.prop('disabled', true); required.removeAttr('disabled');default_value.removeAttr('disabled');jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").show();jQuery("#helplink").hide();}
|
||||
else if (type == 'separate') { size.val('').prop('disabled', true); unique.prop('disabled', true); required.val('').prop('disabled', true); default_value.val('').prop('disabled', true); jQuery("#value_choice").hide();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
||||
else { size.val('').prop('disabled', true); required.removeAttr('disabled'); default_value.removeAttr('disabled'); }
|
||||
|
||||
if (type == 'separate')
|
||||
{
|
||||
alwayseditable.val('').prop('disabled', true); list.val('').prop('disabled', true);
|
||||
}
|
||||
else
|
||||
{
|
||||
alwayseditable.val('').removeAttr('disabled'); list.val('').removeAttr('disabled');
|
||||
}
|
||||
}
|
||||
init_typeoffields('<?php echo GETPOST('type'); ?>');
|
||||
jQuery("#type").change(function() {
|
||||
|
|
@ -81,7 +92,7 @@
|
|||
|
||||
<table summary="listofattributes" class="border centpercent">
|
||||
<!-- Label -->
|
||||
<tr><td class="fieldrequired"><?php echo $langs->trans("Label"); ?></td><td class="valeur"><input type="text" name="label" size="40" value="<?php echo GETPOST('label'); ?>"></td></tr>
|
||||
<tr><td class="titlefield fieldrequired"><?php echo $langs->trans("Label"); ?></td><td class="valeur"><input type="text" name="label" size="40" value="<?php echo GETPOST('label'); ?>"></td></tr>
|
||||
<!-- Code -->
|
||||
<tr><td class="fieldrequired"><?php echo $langs->trans("AttributeCode"); ?></td><td class="valeur"><input type="text" name="attrname" id="attrname" size="10" value="<?php echo GETPOST('attrname'); ?>"> (<?php echo $langs->trans("AlphaNumOnlyLowerCharsAndNoSpace"); ?>)</td></tr>
|
||||
<!-- Type -->
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@
|
|||
var unique = jQuery("#unique");
|
||||
var required = jQuery("#required");
|
||||
var default_value = jQuery("#default_value");
|
||||
var alwayseditable = jQuery("#alwayseditable");
|
||||
var list = jQuery("#list");
|
||||
<?php
|
||||
if((GETPOST('type') != "select") && (GETPOST('type') != "sellist"))
|
||||
{
|
||||
|
|
@ -42,20 +44,29 @@
|
|||
|
||||
if (type == 'date') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
|
||||
else if (type == 'datetime') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
|
||||
else if (type == 'double') { size.removeAttr('disabled'); unique.removeAttr('disabled','disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
|
||||
else if (type == 'int') { size.removeAttr('disabled'); unique.removeAttr('disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
|
||||
else if (type == 'text') { size.removeAttr('disabled'); unique.prop('disabled', true).removeAttr('checked'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
|
||||
else if (type == 'varchar') { size.removeAttr('disabled'); unique.removeAttr('disabled','disabled'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
|
||||
else if (type == 'boolean') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide();}
|
||||
else if (type == 'price') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide();}
|
||||
else if (type == 'select') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
||||
else if (type == 'link') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").show();}
|
||||
else if (type == 'sellist') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").show();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
||||
else if (type == 'radio') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
||||
else if (type == 'checkbox') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
||||
else if (type == 'chkbxlst') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").show();jQuery("#helplink").hide();}
|
||||
else if (type == 'separate') { size.val('').prop('disabled', true); unique.prop('disabled', true); required.val('').prop('disabled', true); default_value.val('').prop('disabled', true); jQuery("#value_choice").hide();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
||||
else if (type == 'double') { size.removeAttr('disabled'); unique.removeAttr('disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
|
||||
else if (type == 'int') { size.removeAttr('disabled'); unique.removeAttr('disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
|
||||
else if (type == 'text') { size.removeAttr('disabled'); unique.prop('disabled', true).removeAttr('checked'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
|
||||
else if (type == 'varchar') { size.removeAttr('disabled'); unique.removeAttr('disabled'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
|
||||
else if (type == 'boolean') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide();}
|
||||
else if (type == 'price') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide();}
|
||||
else if (type == 'select') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
||||
else if (type == 'link') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").show();}
|
||||
else if (type == 'sellist') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").show();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
||||
else if (type == 'radio') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
||||
else if (type == 'checkbox') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
||||
else if (type == 'chkbxlst') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").show();jQuery("#helplink").hide();}
|
||||
else if (type == 'separate') { size.val('').prop('disabled', true); unique.prop('disabled', true); required.val('').prop('disabled', true); default_value.val('').prop('disabled', true); jQuery("#value_choice").hide();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
|
||||
else size.val('').prop('disabled', true);
|
||||
|
||||
if (type == 'separate')
|
||||
{
|
||||
alwayseditable.val('').prop('disabled', true); list.val('').prop('disabled', true);
|
||||
}
|
||||
else
|
||||
{
|
||||
alwayseditable.val('').removeAttr('disabled'); list.val('').removeAttr('disabled');
|
||||
}
|
||||
}
|
||||
init_typeoffields(jQuery("#type").val());
|
||||
jQuery("#type").change(function() {
|
||||
|
|
@ -107,7 +118,7 @@ elseif (($type== 'sellist') || ($type == 'chkbxlst') || ($type == 'link') )
|
|||
}
|
||||
?>
|
||||
<!-- Label -->
|
||||
<tr><td class="fieldrequired"><?php echo $langs->trans("Label"); ?></td><td class="valeur"><input type="text" name="label" size="40" value="<?php echo $extrafields->attribute_label[$attrname]; ?>"></td></tr>
|
||||
<tr><td class="titlefield fieldrequired"><?php echo $langs->trans("Label"); ?></td><td class="valeur"><input type="text" name="label" size="40" value="<?php echo $extrafields->attribute_label[$attrname]; ?>"></td></tr>
|
||||
<!-- Code -->
|
||||
<tr><td class="fieldrequired"><?php echo $langs->trans("AttributeCode"); ?></td><td class="valeur"><?php echo $attrname; ?></td></tr>
|
||||
<!-- Type -->
|
||||
|
|
|
|||
|
|
@ -724,7 +724,7 @@ INSERT INTO llx_c_lead_status(rowid,code,label,position,percent,active) VALUES (
|
|||
INSERT INTO llx_c_lead_status(rowid,code,label,position,percent,active) VALUES (3,'PROPO' ,'Proposal', 30, 40,1);
|
||||
INSERT INTO llx_c_lead_status(rowid,code,label,position,percent,active) VALUES (4,'NEGO' ,'Negotiation', 40, 60,1);
|
||||
INSERT INTO llx_c_lead_status(rowid,code,label,position,percent,active) VALUES (5,'PENDING','Pending', 50, 50,0);
|
||||
INSERT INTO llx_c_lead_status(rowid,code,label,position,percent,active) VALUES (6,'WIN' ,'Won', 60, 100,1);
|
||||
INSERT INTO llx_c_lead_status(rowid,code,label,position,percent,active) VALUES (6,'WON' ,'Won', 60, 100,1);
|
||||
INSERT INTO llx_c_lead_status(rowid,code,label,position,percent,active) VALUES (7,'LOST' ,'Lost', 70, 0,1);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -399,8 +399,8 @@ INSERT INTO llx_c_accounting_category (rowid, code, label, range_account, sens,
|
|||
INSERT INTO llx_c_accounting_category (rowid, code, label, range_account, sens, category_type, formula, position, fk_country, active) VALUES ( 3,'MARGE',"Marge commerciale", '', 0, 1, '1 + 2', '30', 1, 1);
|
||||
|
||||
UPDATE llx_accounting_account SET account_parent = '0' WHERE account_parent = '';
|
||||
-- VMYSQL4.1 ALTER TABLE llx_accounting_account MODIFY COLUMN account_parent integer DEFAULT 0;
|
||||
-- VPGSQL8.2 ALTER TABLE llx_accounting_account ALTER COLUMN account_parent TYPE integer USING account_parent::integer;
|
||||
-- VMYSQL4.1 ALTER TABLE llx_accounting_account MODIFY COLUMN account_parent varchar(32) DEFAULT '0';
|
||||
-- VPGSQL8.2 ALTER TABLE llx_accounting_account ALTER COLUMN account_parent SET DEFAULT '0';
|
||||
|
||||
CREATE TABLE llx_accounting_journal
|
||||
(
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ create table llx_accounting_account
|
|||
pcg_type varchar(20) NOT NULL,
|
||||
pcg_subtype varchar(20) NOT NULL,
|
||||
account_number varchar(32) NOT NULL,
|
||||
account_parent varchar(32) DEFAULT '', -- Hierarchic parent
|
||||
account_parent varchar(32) DEFAULT '0', -- Hierarchic parent
|
||||
label varchar(255) NOT NULL,
|
||||
fk_accounting_category integer DEFAULT 0,
|
||||
fk_user_author integer DEFAULT NULL,
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ NewAccount=New accounting account
|
|||
Create=Create
|
||||
CreateMvts=Create movement
|
||||
UpdateMvts=Modification of a movement
|
||||
WriteBookKeeping=Record accounts in general ledger
|
||||
WriteBookKeeping=Write records in general ledger
|
||||
Bookkeeping=General ledger
|
||||
AccountBalance=Account balance
|
||||
|
||||
|
|
@ -89,7 +89,8 @@ NotMatch=Not Set
|
|||
DeleteMvt=Delete general ledger lines
|
||||
DelYear=Year to delete
|
||||
DelJournal=Journal to delete
|
||||
ConfirmDeleteMvt=This will delete all line of of the general ledger for year and/or from a specifics journal
|
||||
ConfirmDeleteMvt=This will delete all lines of the general ledger for year and/or from a specifics journal
|
||||
ConfirmDeleteMvtPartial=This will delete the selected line(s) of the general ledger
|
||||
|
||||
DelBookKeeping=Delete the records of the general ledger
|
||||
|
||||
|
|
@ -116,17 +117,20 @@ Pcgtype=Class of account
|
|||
Pcgsubtype=Under class of account
|
||||
Accountparent=Root of the account
|
||||
|
||||
DescVentilCustomer=Consult here the annual breakdown accounting of your invoices customers
|
||||
TotalVente=Total turnover before tax
|
||||
TotalMarge=Total sales margin
|
||||
DescVentilDoneCustomer=Consult here the list of the lines of invoices customers and their accounting account
|
||||
DescVentilTodoCustomer=Ventilate your lines of customer invoice with an accounting account
|
||||
|
||||
DescVentilCustomer=Consult here the list of customer invoice lines binded (or not) to a product bookkeeping account
|
||||
DescVentilMore=In most cases, if you use predefined products or services and you set the account number on the product/service card, the application will be able to make all the binding between your invoice lines and the bookkeeping account of your chart of accounts, just in one click with the button <strong>"%s"</strong>. If account was not set on product/service cards or if you still has some lines not binded to any account, you will have to make a manual binding from the menu "<strong>%s</strong>".
|
||||
DescVentilDoneCustomer=Consult here the list of the lines of invoices customers and their product bookkeeping account
|
||||
DescVentilTodoCustomer=Bind your lines of customer invoice with a product bookkeeping account
|
||||
ChangeAccount=Change the accounting account for lines selected by the account:
|
||||
Vide=-
|
||||
DescVentilSupplier=Consult here the annual breakdown accounting of your invoices suppliers
|
||||
DescVentilDoneSupplier=Consult here the list of the lines of invoices supplier and their accounting account
|
||||
DescVentilSupplier=Consult here the list of supplier invoice lines binded or not yet binded to a product bookkeeping account
|
||||
DescVentilDoneSupplier=Consult here the list of the lines of invoices supplier and their bookkeeping account
|
||||
|
||||
ValidateHistory=Validate Automatically
|
||||
ValidateHistory=Bind Automatically
|
||||
AutomaticBindingDone=Automatic binding done
|
||||
|
||||
ErrorAccountancyCodeIsAlreadyUse=Error, you cannot delete this accounting account because it is used
|
||||
MvtNotCorrectlyBalanced=Mouvement not correctly balanced. Credit = %s. Debit = %s
|
||||
|
|
@ -160,7 +164,7 @@ OptionModeProductBuy=Mode purchases
|
|||
OptionModeProductSellDesc=Show all products with no accounting account defined for sales.
|
||||
OptionModeProductBuyDesc=Show all products with no accounting account defined for purchases.
|
||||
CleanFixHistory=Remove accountancy code from lines that not exists into charts of account
|
||||
CleanHistory=Reset all accountancy for selected year
|
||||
CleanHistory=Reset all bindings for selected year
|
||||
|
||||
## Dictionary
|
||||
Range=Range of accounting account
|
||||
|
|
@ -171,3 +175,8 @@ Formula=Formula
|
|||
ErrorNoAccountingCategoryForThisCountry=No accounting category are available for this country
|
||||
ExportNotSupported=The export format setuped is not supported into this page
|
||||
BookeppingLineAlreayExists=Lines already existing into bookeeping
|
||||
|
||||
|
||||
Binded=Lines binded
|
||||
To bind=Lines to bind
|
||||
|
||||
|
|
|
|||
|
|
@ -195,6 +195,8 @@ class Product extends CommonObject
|
|||
var $buyprice;
|
||||
public $fourn_pu;
|
||||
|
||||
public $fourn_price_base_type;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see ref_supplier
|
||||
|
|
@ -1321,7 +1323,7 @@ class Product extends CommonObject
|
|||
* This also set some properties on product like ->buyprice, ->fourn_pu, ...
|
||||
*
|
||||
* @param int $prodfournprice Id du tarif = rowid table product_fournisseur_price
|
||||
* @param double $qty Quantity asked
|
||||
* @param double $qty Quantity asked or -1 to get first entry found
|
||||
* @param int $product_id Filter on a particular product id
|
||||
* @param string $fourn_ref Filter on a supplier ref. 'none' to exclude ref in search.
|
||||
* @return int <-1 if KO, -1 if qty not enough, 0 if OK but nothing found, id_product if OK and found. May also initialize some properties like (->ref_supplier, buyprice, fourn_pu, vatrate_supplier...)
|
||||
|
|
@ -1344,7 +1346,7 @@ class Product extends CommonObject
|
|||
if ($resql)
|
||||
{
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
if ($obj && $obj->quantity > 0) // If found
|
||||
if ($obj && $obj->quantity > 0) // If we found a supplier prices from the id of supplier price
|
||||
{
|
||||
if (!empty($conf->dynamicprices->enabled) && !empty($obj->fk_supplier_price_expression))
|
||||
{
|
||||
|
|
@ -1362,7 +1364,8 @@ class Product extends CommonObject
|
|||
}
|
||||
}
|
||||
$this->buyprice = $obj->price; // deprecated
|
||||
$this->fourn_pu = $obj->price / $obj->quantity; // Prix unitaire du produit pour le fournisseur $fourn_id
|
||||
$this->fourn_pu = $obj->price / $obj->quantity; // Unit price of product of supplier
|
||||
$this->fourn_price_base_type = 'HT'; // Price base type
|
||||
$this->ref_fourn = $obj->ref_fourn; // deprecated
|
||||
$this->ref_supplier = $obj->ref_fourn; // Ref supplier
|
||||
$this->vatrate_supplier = $obj->tva_tx; // Vat ref supplier
|
||||
|
|
@ -1404,8 +1407,9 @@ class Product extends CommonObject
|
|||
}
|
||||
}
|
||||
$this->buyprice = $obj->price; // deprecated
|
||||
$this->fourn_qty = $obj->quantity; // min quantity for price
|
||||
$this->fourn_pu = $obj->price / $obj->quantity; // Prix unitaire du produit pour le fournisseur $fourn_id
|
||||
$this->fourn_qty = $obj->quantity; // min quantity for price for a virtual supplier
|
||||
$this->fourn_pu = $obj->price / $obj->quantity; // Unit price of product for a virtual supplier
|
||||
$this->fourn_price_base_type = 'HT'; // Price base type for a virtual supplier
|
||||
$this->ref_fourn = $obj->ref_supplier; // deprecated
|
||||
$this->ref_supplier = $obj->ref_supplier; // Ref supplier
|
||||
$this->vatrate_supplier = $obj->tva_tx; // Vat ref supplier
|
||||
|
|
|
|||
|
|
@ -770,7 +770,7 @@ class Project extends CommonObject
|
|||
|
||||
if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
{
|
||||
// TODO What to do if fk_opp_status is not code 'WIN' or 'LOST'
|
||||
// TODO What to do if fk_opp_status is not code 'WON' or 'LOST'
|
||||
}
|
||||
|
||||
dol_syslog(get_class($this)."::setClose", LOG_DEBUG);
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@ $sql.= ", cls.code as opp_status_code";
|
|||
// We'll need these fields in order to filter by categ
|
||||
if ($search_categ) $sql .= ", cs.fk_categorie, cs.fk_project";
|
||||
// Add fields for extrafields
|
||||
foreach ($extrafields->attribute_list as $key => $val) $sql.=",ef.".$key.' as options_'.$key;
|
||||
foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : '');
|
||||
// Add fields from hooks
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook
|
||||
|
|
@ -275,7 +275,7 @@ if ($search_opp_status)
|
|||
{
|
||||
if (is_numeric($search_opp_status) && $search_opp_status > 0) $sql .= " AND p.fk_opp_status = ".$db->escape($search_opp_status);
|
||||
if ($search_opp_status == 'all') $sql .= " AND p.fk_opp_status IS NOT NULL";
|
||||
if ($search_opp_status == 'openedopp') $sql .= " AND p.fk_opp_status IS NOT NULL AND p.fk_opp_status NOT IN (SELECT rowid FROM ".MAIN_DB_PREFIX."c_lead_status WHERE code IN ('WIN','LOST'))";
|
||||
if ($search_opp_status == 'openedopp') $sql .= " AND p.fk_opp_status IS NOT NULL AND p.fk_opp_status NOT IN (SELECT rowid FROM ".MAIN_DB_PREFIX."c_lead_status WHERE code IN ('WON','LOST'))";
|
||||
if ($search_opp_status == 'none') $sql .= " AND p.fk_opp_status IS NULL";
|
||||
}
|
||||
if ($search_public!='') $sql .= " AND p.public = ".$db->escape($search_public);
|
||||
|
|
@ -336,8 +336,8 @@ if ($resql)
|
|||
if ($search_label != '') $param.='&search_label='.$search_label;
|
||||
if ($search_societe != '') $param.='&search_societe='.$search_societe;
|
||||
if ($search_status >= 0) $param.='&search_status='.$search_status;
|
||||
if ((is_numeric($search_opp_status) && $search_opp_status >= 0) || in_array($search_opp_status, array('all','none'))) $param.='&search_opp_status='.urlencode($search_opp_status);
|
||||
if ((is_numeric($search_opp_percent) && $search_opp_percent >= 0) || in_array($search_opp_percent, array('all','none'))) $param.='&search_opp_percent='.urlencode($search_opp_percent);
|
||||
if ((is_numeric($search_opp_status) && $search_opp_status >= 0) || in_array($search_opp_status, array('all','openedopp','none'))) $param.='&search_opp_status='.urlencode($search_opp_status);
|
||||
if ((is_numeric($search_opp_percent) && $search_opp_percent >= 0) || in_array($search_opp_percent, array('all','openedopp','none'))) $param.='&search_opp_percent='.urlencode($search_opp_percent);
|
||||
if ($search_public != '') $param.='&search_public='.$search_public;
|
||||
if ($search_user > 0) $param.='&search_user='.$search_user;
|
||||
if ($search_sale > 0) $param.='&search_sale='.$search_sale;
|
||||
|
|
|
|||
|
|
@ -92,8 +92,8 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->projet->creer)
|
|||
$object->description = $_POST['description'];
|
||||
$object->fk_task_parent = $task_parent;
|
||||
$object->planned_workload = $planned_workload;
|
||||
$object->date_start = dol_mktime($_POST['dateohour'],$_POST['dateomin'],0,$_POST['dateomonth'],$_POST['dateoday'],$_POST['dateoyear'],'user');
|
||||
$object->date_end = dol_mktime($_POST['dateehour'],$_POST['dateemin'],0,$_POST['dateemonth'],$_POST['dateeday'],$_POST['dateeyear'],'user');
|
||||
$object->date_start = dol_mktime($_POST['dateohour'],$_POST['dateomin'],0,$_POST['dateomonth'],$_POST['dateoday'],$_POST['dateoyear']);
|
||||
$object->date_end = dol_mktime($_POST['dateehour'],$_POST['dateemin'],0,$_POST['dateemonth'],$_POST['dateeday'],$_POST['dateeyear']);
|
||||
$object->progress = $_POST['progress'];
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
|
|
|
|||
|
|
@ -586,7 +586,8 @@ if (empty($reshook))
|
|||
if (preg_match('/^idprod_([0-9]+)$/',GETPOST('idprodfournprice'), $reg))
|
||||
{
|
||||
$idprod=$reg[1];
|
||||
// Call to init properties of $productsupplier
|
||||
$res=$productsupplier->fetch($idprod);
|
||||
// Call to init properties of $productsupplier
|
||||
// So if a supplier price already exists for another thirdparty (first one found), we use it as reference price
|
||||
$productsupplier->get_buyprice(0, -1, $idprod, 'none'); // We force qty to -1 to be sure to find if a supplier price exist
|
||||
}
|
||||
|
|
@ -594,37 +595,35 @@ if (empty($reshook))
|
|||
{
|
||||
//$idprod=$productsupplier->get_buyprice(GETPOST('idprodfournprice'), $qty); // Just to see if a price exists for the quantity. Not used to found vat.
|
||||
$idprod=$productsupplier->get_buyprice(GETPOST('idprodfournprice'), -1); // We force qty to -1 to be sure to find if a supplier price exist
|
||||
$res=$productsupplier->fetch($idprod);
|
||||
}
|
||||
|
||||
|
||||
if ($idprod > 0)
|
||||
{
|
||||
$res=$productsupplier->fetch($idprod);
|
||||
|
||||
$pu_ht = $productsupplier->fourn_pu;
|
||||
$price_base_type = $productsupplier->fourn_price_base_type;
|
||||
$type = $productsupplier->type;
|
||||
$label = $productsupplier->label;
|
||||
|
||||
$desc = $productsupplier->description;
|
||||
if (trim($product_desc) != trim($desc)) $desc = dol_concatdesc($desc, $product_desc);
|
||||
|
||||
$type = $productsupplier->type;
|
||||
|
||||
$tva_tx = get_default_tva($object->thirdparty, $mysoc, $productsupplier->id, GETPOST('idprodfournprice'));
|
||||
$tva_npr = get_default_npr($object->thirdparty, $mysoc, $productsupplier->id, GETPOST('idprodfournprice'));
|
||||
if (empty($tva_tx)) $tva_npr=0;
|
||||
$localtax1_tx= get_localtax($tva_tx, 1, $mysoc, $object->thirdparty, $tva_npr);
|
||||
$localtax2_tx= get_localtax($tva_tx, 2, $mysoc, $object->thirdparty, $tva_npr);
|
||||
|
||||
|
||||
$result=$object->addline(
|
||||
$desc,
|
||||
$productsupplier->fourn_pu,
|
||||
$pu_ht,
|
||||
$qty,
|
||||
$tva_tx,
|
||||
$localtax1_tx,
|
||||
$localtax2_tx,
|
||||
$productsupplier->id,
|
||||
$remise_percent,
|
||||
$type,
|
||||
$productsupplier->price_ttc,
|
||||
$price_base_type,
|
||||
$pu_ttc,
|
||||
$tva_npr,
|
||||
$type,
|
||||
-1,
|
||||
|
|
@ -636,6 +635,7 @@ if (empty($reshook))
|
|||
$array_options,
|
||||
$ref_fourn
|
||||
);
|
||||
//var_dump($tva_tx);var_dump($productsupplier->fourn_pu);var_dump($price_base_type);exit;
|
||||
}
|
||||
if ($idprod == -99 || $idprod == 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -157,7 +157,8 @@ if(is_array($object->lines) && (count($object->lines)>0))
|
|||
$result=$cronjob->fetch($line->id);
|
||||
if ($result<0)
|
||||
{
|
||||
echo "Error cronjob->fetch: ".$cronjob->error;
|
||||
echo "Error cronjob->fetch: ".$cronjob->error."\n";
|
||||
echo "Failed to fetch job ".$line->id."\n";
|
||||
dol_syslog("cron_run_jobs.php::fetch Error ".$cronjob->error, LOG_ERR);
|
||||
exit(-1);
|
||||
}
|
||||
|
|
@ -165,7 +166,9 @@ if(is_array($object->lines) && (count($object->lines)>0))
|
|||
$result=$cronjob->run_jobs($userlogin);
|
||||
if ($result<0)
|
||||
{
|
||||
echo "Error cronjob->run_job: ".$cronjob->error;
|
||||
echo "Error cronjob->run_job: ".$cronjob->error."\n";
|
||||
echo "At least one job failed. Go on menu Home-Setup-Admin tools to see result for each job.\n";
|
||||
echo "You can also enable module Log if not yet enabled, run again and take a look into dolibarr.log file\n";
|
||||
dol_syslog("cron_run_jobs.php::run_jobs Error ".$cronjob->error, LOG_ERR);
|
||||
exit(-1);
|
||||
}
|
||||
|
|
@ -174,7 +177,8 @@ if(is_array($object->lines) && (count($object->lines)>0))
|
|||
$result=$cronjob->reprogram_jobs($userlogin, $now);
|
||||
if ($result<0)
|
||||
{
|
||||
echo "Error cronjob->reprogram_job: ".$cronjob->error;
|
||||
echo "Error cronjob->reprogram_job: ".$cronjob->error."\n";
|
||||
echo "Enable module Log if not yet enabled, run again and take a look into dolibarr.log file\n";
|
||||
dol_syslog("cron_run_jobs.php::reprogram_jobs Error ".$cronjob->error, LOG_ERR);
|
||||
exit(-1);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user