Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into dev…
Browse files Browse the repository at this point in the history
…elop-work-on-warehouse-status
  • Loading branch information
fappels committed Nov 30, 2016
2 parents 49442c0 + d86c393 commit 2d48071
Show file tree
Hide file tree
Showing 252 changed files with 4,970 additions and 2,304 deletions.
2 changes: 1 addition & 1 deletion ChangeLog
Expand Up @@ -39,7 +39,7 @@ Dolibarr better:
- Trigger name SUPPLIER_PROPOSAL_CREATE has been renamed into PROPOSAL_SUPPLIER_CREATE.
- A new paramater sqlfilters was introduced to allow filter on any fields int the REST API. Few old parameters,
no more required, were also removed. Use this new one if you were using one of them.

- The trigger that activate or close a contract line is run on a contract line, not on contract.


***** ChangeLog for 4.0.2 compared to 4.0.1 *****
Expand Down
7 changes: 4 additions & 3 deletions build/debian/README.howto
Expand Up @@ -73,7 +73,8 @@ Ex: https://alioth.debian.org/users/eldy-guest
# msgfmt -v -c -o /dev/null XX.po To have status of translation for language XX

# To check package integrity
# lintian --pedantic -E -I package.deb To test a package
# lintian --pedantic -E -I package.deb To test a binary package
# lintian --pedantic -E -I package.dsc To test a source package

# To manipulate packages
# dpkg -l List all packages
Expand Down Expand Up @@ -181,8 +182,8 @@ To test a package
> cp ../build-area/* /srv/chroot/unstable/tmp
> sudo schroot -c name_of_chroot
> cd /tmp
> lintian --pedantic -E -I dolibarr*.deb
> lintian --pedantic -E -I dolibarr*.dsc
> lintian --no-tag-display-limit --pedantic -E -I dolibarr*.deb
> lintian --no-tag-display-limit --pedantic -E -I dolibarr*.dsc
> dpkg -i dolibarr*.deb ou pour avoir des traces: dpkg -D77777 -i dolibarr*.deb
> apt-get install -f

Expand Down
11 changes: 8 additions & 3 deletions build/debian/source/lintian-overrides
@@ -1,5 +1,10 @@
# Remove warning, we want to keep both standard and minified sources.
dolibarr: source-contains-prebuilt-javascript-object htdocs/includes/jsgantt/*
dolibarr: source-contains-prebuilt-javascript-object htdocs/includes/jquery/*
# This is a textual data file
source-is-missing htdocs/includes/mobiledetect/mobiledetectlib/Mobile_Detect.json
dolibarr: source-contains-prebuilt-javascript-object htdocs/includes/jsgantt/*
dolibarr: source-contains-prebuilt-javascript-object htdocs/includes/jstz/*
# Those are false positives, the files are their own sources since
# they are not minified
source-is-missing htdocs/includes/jsgantt/jsgantt.js *
source-is-missing htdocs/includes/jquery/plugins/colorpicker/jquery.colorpicker.js *
source-is-missing htdocs/includes/jquery/plugins/select2/select2.js *
source-is-missing htdocs/includes/jquery/plugins/select2/select2_locale_ar.js *
7 changes: 7 additions & 0 deletions build/makepack-dolibarr.pl
Expand Up @@ -1145,6 +1145,9 @@
"$DESTI/package_rpm_generic/$FILENAMERPM"=>'Dolibarr installer for Fedora-Redhat-Mandriva-Opensuse (DoliRpm)',
"$DESTI/package_rpm_generic/$FILENAMERPMSRC"=>'none', # none means it won't be published on SF
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'Dolibarr installer for Debian-Ubuntu (DoliDeb)',
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_amd64.changes"=>'none', # none means it won't be published on SF
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.dsc"=>'none', # none means it won't be published on SF
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.gz"=>'none', # none means it won't be published on SF
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'none', # none means it won't be published on SF
"$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'Dolibarr installer for Windows (DoliWamp)',
"$DESTI/standard/$FILENAMETGZ.tgz"=>'Dolibarr ERP-CRM',
Expand All @@ -1155,6 +1158,10 @@
"$DESTI/package_rpm_generic/$FILENAMERPM"=>'package_rpm_generic',
"$DESTI/package_rpm_generic/$FILENAMERPMSRC"=>'package_rpm_generic',
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'package_debian-ubuntu',
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_amd64.changes"=>'package_debian-ubuntu',
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.dsc"=>'package_debian-ubuntu',
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.gz"=>'package_debian-ubuntu',
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'package_debian-ubuntu',
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'package_debian-ubuntu',
"$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'package_windows',
"$DESTI/standard/$FILENAMETGZ.tgz"=>'standard',
Expand Down
14 changes: 10 additions & 4 deletions dev/skeletons/skeleton_list.php
Expand Up @@ -52,9 +52,13 @@
$langs->load("mymodule");
$langs->load("other");

// Get parameters
$action=GETPOST('action','alpha');
$massaction=GETPOST('massaction','alpha');
$show_files=GETPOST('show_files','int');
$confirm=GETPOST('confirm','alpha');
$toselect = GETPOST('toselect', 'array');

$id = GETPOST('id','int');
$action = GETPOST('action','alpha');
$backtopage = GETPOST('backtopage');
$myparam = GETPOST('myparam','alpha');

Expand Down Expand Up @@ -212,7 +216,7 @@ function init_myfunc()
$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook
$sql.=$hookmanager->resPrint;
$sql.= " FROM ".MAIN_DB_PREFIX."mytable as t";
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."mytable_extrafields as ef on (u.rowid = ef.fk_object)";
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."mytable_extrafields as ef on (t.rowid = ef.fk_object)";
$sql.= " WHERE 1 = 1";
//$sql.= " WHERE u.entity IN (".getEntity('mytable',1).")";
if ($search_field1) $sql.= natural_search("field1",$search_field1);
Expand All @@ -239,7 +243,7 @@ function init_myfunc()
//$sql.= $db->plimit($conf->liste_limit+1, $offset);

// Count total nb of records
$nbtotalofrecords = 0;
$nbtotalofrecords = -1;
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$result = $db->query($sql);
Expand Down Expand Up @@ -329,6 +333,7 @@ function init_myfunc()
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields

print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";

// Fields title
Expand Down Expand Up @@ -531,6 +536,7 @@ function init_myfunc()
print $hookmanager->resPrint;

print '</table>'."\n";
print '</div>'."\n";

print '</form>'."\n";

Expand Down
26 changes: 13 additions & 13 deletions htdocs/accountancy/admin/account.php
Expand Up @@ -155,24 +155,24 @@
$sql .= " WHERE asy.rowid = " . $pcgver;

if (strlen(trim($search_account))) {
$sql .= " AND aa.account_number like '%" . $search_account . "%'";
$sql .= natural_search("aa.account_number", $search_account);
}
if (strlen(trim($search_label))) {
$sql .= " AND aa.label like '%" . $search_label . "%'";
$sql .= natural_search("aa.label", $search_label);
}
if (strlen(trim($search_accountparent))) {
$sql .= " AND aa.account_parent like '%" . $search_accountparent . "%'";
$sql .= natural_search("aa.account_parent", $search_accountparent);
}
if (strlen(trim($search_pcgtype))) {
$sql .= " AND aa.pcg_type like '%" . $search_pcgtype . "%'";
$sql .= natural_search("aa.pcg_type", $search_pcgtype);
}
if (strlen(trim($search_pcgsubtype))) {
$sql .= " AND aa.pcg_subtype like '%" . $search_pcgsubtype . "%'";
$sql .= natural_search("aa.pcg_subtype", $search_pcgsubtype);
}
$sql .= $db->order($sortfield, $sortorder);

// Count total nb of records
$nbtotalofrecords = 0;
$nbtotalofrecords = -1;
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$resql = $db->query($sql);
Expand All @@ -198,11 +198,9 @@

print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER["PHP_SELF"], $params, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy');

$i = 0;

print '<form method="GET" action="' . $_SERVER["PHP_SELF"] . '">';

// Box to select active chart of accoun
// Box to select active chart of account
$var = ! $var;
print $langs->trans("Selectchartofaccounts") . " : ";
print '<select class="flat" name="chartofaccounts" id="chartofaccounts">';
Expand Down Expand Up @@ -235,7 +233,7 @@
print '<a class="butAction" href="./categories.php">' . $langs->trans("ApplyMassCategories") . '</a>';
// print '<a class="butAction" href="./importaccounts.php">' . $langs->trans("ImportAccount") . '</a>';
// print '<a class="butAction" href="./productaccount.php">' . $langs->trans("CheckProductAccountancyCode") . '</a>';
print '<br/><br/>';
print '<br><br>';

print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
Expand Down Expand Up @@ -266,9 +264,11 @@
$accountstatic = new AccountingAccount($db);
$accountparent = new AccountingAccount($db);

while ( $i < min($num, $limit) ) {
$i = 0;
while ( $i < min($num, $limit) )
{
$obj = $db->fetch_object($resql);

$accountstatic->id = $obj->rowid;
$accountstatic->label = $obj->label;
$accountstatic->account_number = $obj->account_number;
Expand Down Expand Up @@ -318,7 +318,7 @@

print "</tr>\n";
$var = ! $var;
$i ++;
$i++;
}

print "</table>";
Expand Down
4 changes: 2 additions & 2 deletions htdocs/accountancy/admin/accountmodel.php
Expand Up @@ -1262,8 +1262,8 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')

$formadmin = new FormAdmin($db);
$formcompany = new FormCompany($db);
if (! empty($conf->accounting->enabled)) $formaccountancy = new FormVentilation($db);

$formaccountancy = new FormVentilation($db);
foreach ($fieldlist as $field => $value)
{
if ($fieldlist[$field] == 'country')
Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/admin/fiscalyear.php
Expand Up @@ -90,7 +90,7 @@
$sql.=$db->order($sortfield,$sortorder);

// Count total nb of records
$nbtotalofrecords = 0;
$nbtotalofrecords = -1;
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$result = $db->query($sql);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/admin/productaccount.php
Expand Up @@ -248,7 +248,7 @@
}
$sql .= $db->order($sortfield, $sortorder);

$nbtotalofrecords = 0;
$nbtotalofrecords = -1;
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$result = $db->query($sql);
Expand Down

0 comments on commit 2d48071

Please sign in to comment.