Merge branch 'develop' into new_branch_14_02_2019

This commit is contained in:
Laurent Destailleur 2019-02-19 13:26:35 +01:00 committed by GitHub
commit 86c9dbc218
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
73 changed files with 614 additions and 673 deletions

1
.github/CODEOWNERS vendored Normal file
View File

@ -0,0 +1 @@
htdocs/takepos @andreubisquerra

View File

@ -38,7 +38,7 @@ We officially support versions N, N 1 and N 2 for N the latest version a
Choose your base branch accordingly.
### General rules
Please don't edit the ChangeLog file. File will be generated from your commit messages during release process by the project manager.
Please don't edit the ChangeLog file. File will be generated from all commit messages during release process by the project manager.
### <a name="commits"></a>Commits
Use clear commit messages with the following structure:
@ -56,13 +56,15 @@ You can add it to your git configuration using:
git config --local commit.template .gitmessage
```
where
#### Keyword
In uppercase if you want to have the log comment appears into the generated ChangeLog file.
The keyword can be ommitted if your commit does not fit in any of the following categories:
- Fix: for a bug fix
- Close: for closing a referenced feature request
- New: for an unreferenced new feature (Opening a feature request and using close is prefered)
- Fix/FIX: for a bug fix
- New/NEW: for an unreferenced new feature (Opening a feature request and using close is prefered)
- Close/CLOSE: for closing a referenced feature request
#### Issuenum
If your commit fixes a referenced bug or feature request.
@ -85,14 +87,14 @@ This section can span multiple lines.
Try to keep lines under 120 characters.
#### Samples
#### Examples
<pre>
FIX|Fix #456 Short description (where #456 is number of bug fix, if it exists. In upper case to appear into ChangeLog)
or
CLOSE|Close #456 Short description (where #456 is number of feature request, if it exists. In upper case to appear into ChangeLog)
or
NEW|New Short description (In upper case to appear into ChangeLog, use this if you add a feature not tracked, otherwise use CLOSE #456)
or
CLOSE|Close #456 Short description (where #456 is number of feature request, if it exists. In upper case to appear into ChangeLog)
or
Short description (when the commit is not introducing feature nor closing a bug)
Long description (Can span accross multiple lines).
@ -104,13 +106,22 @@ When submitting a pull request, use same rule as [Commits](#commits) for the mes
If your pull request only contains one commit, GitHub will be smart enough to fill it for you.
Otherwise, please be a bit verbose about what you're providing.
Your Pull Request must pass the Continuous Integration checks.
Your Pull Request (PR) must pass the Continuous Integration checks.
Also, some code changes need a prior approbation:
* if you want to include a new external library (into htdocs/includes directory), please ask before to the project manager (@eldy) to see if such a library can be accepted.
* if you add a new table, you must first create a page on http://wiki.dolibarr.org/index.php/Category:Table_SQL (copy an existing page changing its name to see it into this index page). Than ask the project manager (@eldy) if the new data model you plan to add can be accepted as you suggest.
Once a PR has been submitted, you may need to wait for its integration. It is common that the project leader let the PR open for a long delay to allow
every developer discuss about the PR.
If your PR has errors reported by the Continuous Integration Platform, it means your PR is not valid and nothing will be done with it. It will be kept open to allow developers to fix this, or it may be closed several month later.
If the PR is valid, and is kept open for a long time, a tag will also be added on the PR to describe the status of your PR.
By putting your mouse on the tag, you will get a full explanation of the tag/status that explain why your PR has not been integrated yet.
Around 95% of submitted PR are reviewed and tagged. Even if this is one of the most important ratio in Open Source world, don't expect the core team
to reach the 100%. With the increasing popularity of Dolibarr, this ratio will probably decrease in future.
### Resources
[Developer documentation](http://wiki.dolibarr.org/index.php/Developer_documentation)
@ -120,9 +131,12 @@ The source language (en_US) is maintained in the repository. See the [Code](#cod
All other translations are managed online at [Transifex](https://www.transifex.com/dolibarr-association/dolibarr/).
Join an existing translation team or create your own and translate into the interface.
Translations done on transifex are available in the next major release.
Note: Sometimes, the source text (english) is modified. In such a case, the translation is reset. Transifex assume that if the original source
has changed, the translation is surely no more correct so must be done again. But old translation is not lost and you can use the tab "History"
to retreive all old translation of a source text, and restore the translation in one click with no need to retranslate it if there is no need to.
Your translations will be available in the next major release.
### Resources
[Translator documentation](http://wiki.dolibarr.org/index.php/Translator_documentation)
@ -131,5 +145,5 @@ Documentation
-------------
The project's documentation is maintained on the [Wiki](http://wiki.dolibarr.org/index.php).
*Note*: to help prevent spam, you need to create an account before being able to edit.
*Note*: to help prevent spam, you need to create an account before being able to edit. Everybody is welcome to contribute to its content.

View File

@ -361,12 +361,12 @@ if ($nboftargetok) {
}
if (! $BUILD || $BUILD eq '0-rc') # For a major version
{
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log `git rev-list --boundary '.$MAJOR.'.'.$MINOR.'..origin/develop | grep ^- | cut -c2- | head -n 1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log `git rev-list --boundary '.$MAJOR.'.'.$MINOR.'..origin/develop | grep ^- | cut -c2- | head -n 1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
}
else # For a maintenance release
{
#print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. | grep -v "Merge branch" | grep -v "Merge pull" | grep "^ " | sed -e "s/^[0-9a-z]* *//" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
#print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\'| sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. | grep -v "Merge branch" | grep -v "Merge pull" | grep "^ " | sed -e "s/^[0-9a-z]* *//" | grep -e \'^FIX\|NEW\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/CLOSE/NEW/g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
}
print "\n";

View File

@ -9,6 +9,10 @@ fi
FROM=$1-01-01
TO=$1-12-31
echo "Number of contributors for the year"
echo "git log --since $FROM --before $TO | grep ^Author | sort -u -f -i -b | wc -l"
git log --since $FROM --before $TO | grep ^Author | sort -u -f -i -b | wc -l
echo "Number of commit for the year"
git log --pretty='format:%cd' --date=format:'%Y' | uniq -c | awk '{print "Year: "$2", commits: "$1}' | grep "Year: $1"

View File

@ -424,10 +424,10 @@ foreach ($AdherentType as $key => $adhtype)
}
print '<tr class="liste_total">';
print '<td class="liste_total">'.$langs->trans("Total").'</td>';
print '<td class="liste_total" class="right">'.$SommeA.' '.$staticmember->LibStatut(-1, $adhtype->subscription, 0, 3).'</td>';
print '<td class="liste_total" class="right">'.$SommeB.' '.$staticmember->LibStatut(1, $adhtype->subscription, 0, 3).'</td>';
print '<td class="liste_total" class="right">'.$SommeC.' '.$staticmember->LibStatut(1, $adhtype->subscription, $now, 3).'</td>';
print '<td class="liste_total" class="right">'.$SommeD.' '.$staticmember->LibStatut(0, $adhtype->subscription, 0, 3).'</td>';
print '<td class="liste_total right">'.$SommeA.' '.$staticmember->LibStatut(-1, $adhtype->subscription, 0, 3).'</td>';
print '<td class="liste_total right">'.$SommeB.' '.$staticmember->LibStatut(1, $adhtype->subscription, 0, 3).'</td>';
print '<td class="liste_total right">'.$SommeC.' '.$staticmember->LibStatut(1, $adhtype->subscription, $now, 3).'</td>';
print '<td class="liste_total right">'.$SommeD.' '.$staticmember->LibStatut(0, $adhtype->subscription, 0, 3).'</td>';
print '</tr>';
print "</table>\n";

View File

@ -87,8 +87,8 @@ $arrayfields=array(
'c.dateadh'=>array('label'=>$langs->trans("DateSubscription"), 'checked'=>1, 'position'=>100),
'c.datef'=>array('label'=>$langs->trans("EndSubscription"), 'checked'=>1, 'position'=>101),
'd.amount'=>array('label'=>$langs->trans("Amount"), 'checked'=>1, 'position'=>102),
'd.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
'd.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500),
'c.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
'c.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500),
// 'd.statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000)
);
@ -367,13 +367,13 @@ $parameters=array('arrayfields'=>$arrayfields);
$reshook=$hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Date creation
if (! empty($arrayfields['d.datec']['checked']))
if (! empty($arrayfields['c.datec']['checked']))
{
print '<td class="liste_titre">';
print '</td>';
}
// Date modification
if (! empty($arrayfields['d.tms']['checked']))
if (! empty($arrayfields['c.tms']['checked']))
{
print '<td class="liste_titre">';
print '</td>';
@ -436,9 +436,9 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (! empty($arrayfields['d.datec']['checked'])) print_liste_field_titre($arrayfields['d.datec']['label'], $_SERVER["PHP_SELF"], "d.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
if (! empty($arrayfields['d.tms']['checked'])) print_liste_field_titre($arrayfields['d.tms']['label'], $_SERVER["PHP_SELF"], "d.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
if (! empty($arrayfields['c.datec']['checked'])) print_liste_field_titre($arrayfields['c.datec']['label'], $_SERVER["PHP_SELF"], "c.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
if (! empty($arrayfields['c.tms']['checked'])) print_liste_field_titre($arrayfields['c.tms']['label'], $_SERVER["PHP_SELF"], "c.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], '', '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
print "</tr>\n";
@ -553,7 +553,7 @@ while ($i < min($num, $limit))
$reshook=$hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Date creation
if (! empty($arrayfields['d.datec']['checked']))
if (! empty($arrayfields['c.datec']['checked']))
{
print '<td align="center" class="nowrap">';
print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser');
@ -561,7 +561,7 @@ while ($i < min($num, $limit))
if (! $i) $totalarray['nbfield']++;
}
// Date modification
if (! empty($arrayfields['d.tms']['checked']))
if (! empty($arrayfields['c.tms']['checked']))
{
print '<td align="center" class="nowrap">';
print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser');

View File

@ -5,7 +5,7 @@
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2014 Cedric GROSS <c.gross@kreiz-it.fr>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
*
* 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
@ -740,7 +740,7 @@ $db->close();
/**
* Show event line of a particular day for a user
*
* @param string $username Login
* @param User $username Login
* @param int $day Day
* @param int $month Month
* @param int $year Year

View File

@ -5,7 +5,7 @@
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2014 Cedric GROSS <c.gross@kreiz-it.fr>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
*
* 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
@ -888,7 +888,7 @@ $db->close();
/**
* Show event line of a particular day for a user
*
* @param string $username Login
* @param User $username Login
* @param int $day Day
* @param int $month Month
* @param int $year Year

View File

@ -7,8 +7,9 @@
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
* Copyright (C) 2015-2019 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2015 Marcos García <marcosgdf@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
* the Free Software Foundation; either version 3 of the License, or
@ -1327,12 +1328,6 @@ if ($object->id > 0)
show_contacts($conf, $langs, $db, $object, $_SERVER["PHP_SELF"].'?socid='.$object->id);
}
// Addresses list
if (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) && ! empty($conf->global->MAIN_REPEATADDRESSONEACHTAB))
{
show_addresses($conf, $langs, $db, $object, $_SERVER["PHP_SELF"].'?socid='.$object->id);
}
if (! empty($conf->global->MAIN_REPEATTASKONEACHTAB))
{
print load_fiche_titre($langs->trans("ActionsOnCompany"), '', '');

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2019 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -411,7 +411,7 @@ if ($socid > 0)
print load_fiche_titre($langs->trans("CustomerDiscounts"), '', '');
}
$sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx,";
$sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx, rc.multicurrency_amount_ht, rc.multicurrency_amount_tva, rc.multicurrency_amount_ttc,";
$sql.= " rc.datec as dc, rc.description,";
$sql.= " rc.fk_facture_source,";
$sql.= " u.login, u.rowid as user_id,";
@ -433,11 +433,19 @@ if ($socid > 0)
print '<tr class="liste_titre">';
print '<td class="widthdate">'.$langs->trans("Date").'</td>'; // Need 120+ for format with AM/PM
print '<td>'.$langs->trans("ReasonDiscount").'</td>';
print '<td width="150" class="nowrap">'.$langs->trans("ConsumedBy").'</td>';
print '<td width="120" class="right">'.$langs->trans("AmountHT").'</td>';
print '<td width="80" class="right">'.$langs->trans("VATRate").'</td>';
print '<td width="120" class="right">'.$langs->trans("AmountTTC").'</td>';
print '<td width="100" align="center">'.$langs->trans("DiscountOfferedBy").'</td>';
print '<td class="nowrap">'.$langs->trans("ConsumedBy").'</td>';
print '<td class="right">'.$langs->trans("AmountHT").'</td>';
if (! empty($conf->multicurrency->enabled))
{
print '<td class="right">'.$langs->trans("MulticurrencyAmountHT").'</td>';
}
print '<td class="right">'.$langs->trans("VATRate").'</td>';
print '<td class="right">'.$langs->trans("AmountTTC").'</td>';
if (! empty($conf->multicurrency->enabled))
{
print '<td class="right">'.$langs->trans("MulticurrencyAmountTTC").'</td>';
}
print '<td width="100" class="center">'.$langs->trans("DiscountOfferedBy").'</td>';
print '<td width="50">&nbsp;</td>';
print '</tr>';
@ -455,7 +463,7 @@ if ($socid > 0)
print '<td>'.dol_print_date($db->jdate($obj->dc), 'dayhour').'</td>';
if (preg_match('/\(CREDIT_NOTE\)/', $obj->description))
{
print '<td class="nowrap">';
print '<td class="minwidth100">';
$facturestatic->id=$obj->fk_facture_source;
$facturestatic->ref=$obj->ref;
$facturestatic->type=$obj->type;
@ -464,7 +472,7 @@ if ($socid > 0)
}
elseif (preg_match('/\(DEPOSIT\)/', $obj->description))
{
print '<td class="nowrap">';
print '<td class="minwidth100">';
$facturestatic->id=$obj->fk_facture_source;
$facturestatic->ref=$obj->ref;
$facturestatic->type=$obj->type;
@ -473,7 +481,7 @@ if ($socid > 0)
}
elseif (preg_match('/\(EXCESS RECEIVED\)/', $obj->description))
{
print '<td class="nowrap">';
print '<td class="minwidth100">';
$facturestatic->id=$obj->fk_facture_source;
$facturestatic->ref=$obj->ref;
$facturestatic->type=$obj->type;
@ -482,14 +490,22 @@ if ($socid > 0)
}
else
{
print '<td>';
print '<td class="minwidth100">';
print $obj->description;
print '</td>';
}
print '<td class="nowrap">'.$langs->trans("NotConsumed").'</td>';
print '<td class="right">'.price($obj->amount_ht).'</td>';
print '<td class="right">'.price2num($obj->tva_tx, 'MU').'%</td>';
if (! empty($conf->multicurrency->enabled))
{
print '<td class="right">'.price($obj->multicurrency_amount_ht).'</td>';
}
print '<td class="right">'.vatrate($obj->tva_tx, true).'</td>';
print '<td class="right">'.price($obj->amount_ttc).'</td>';
if (! empty($conf->multicurrency->enabled))
{
print '<td class="right">'.price($obj->multicurrency_amount_ttc).'</td>';
}
print '<td align="center">';
print '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"), 'user').' '.$obj->login.'</a>';
print '</td>';
@ -497,7 +513,7 @@ if ($socid > 0)
{
print '<td class="nowrap">';
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=split&remid='.$obj->rowid.($backtopage?'&backtopage='.urlencode($backtopage):'').'">'.img_split($langs->trans("SplitDiscount")).'</a>';
print ' &nbsp; ';
//print ' &nbsp; ';
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=remove&remid='.$obj->rowid.($backtopage?'&backtopage='.urlencode($backtopage):'').'">'.img_delete($langs->trans("RemoveDiscount")).'</a>';
print '</td>';
}
@ -550,7 +566,7 @@ if ($socid > 0)
/*
* Liste remises fixes fournisseur restant en cours (= liees a aucune facture ni ligne de facture)
*/
$sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx,";
$sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx, rc.multicurrency_amount_ht, rc.multicurrency_amount_tva, rc.multicurrency_amount_ttc,";
$sql.= " rc.datec as dc, rc.description,";
$sql.= " rc.fk_invoice_supplier_source,";
$sql.= " u.login, u.rowid as user_id,";
@ -572,11 +588,19 @@ if ($socid > 0)
print '<tr class="liste_titre">';
print '<td class="widthdate">'.$langs->trans("Date").'</td>'; // Need 120+ for format with AM/PM
print '<td>'.$langs->trans("ReasonDiscount").'</td>';
print '<td width="150" class="nowrap">'.$langs->trans("ConsumedBy").'</td>';
print '<td width="120" class="right">'.$langs->trans("AmountHT").'</td>';
print '<td width="80" class="right">'.$langs->trans("VATRate").'</td>';
print '<td width="120" class="right">'.$langs->trans("AmountTTC").'</td>';
print '<td width="100" align="center">'.$langs->trans("DiscountOfferedBy").'</td>';
print '<td class="nowrap">'.$langs->trans("ConsumedBy").'</td>';
print '<td class="right">'.$langs->trans("AmountHT").'</td>';
if (! empty($conf->multicurrency->enabled))
{
print '<td class="right">'.$langs->trans("MulticurrencyAmountHT").'</td>';
}
print '<td class="right">'.$langs->trans("VATRate").'</td>';
print '<td class="right">'.$langs->trans("AmountTTC").'</td>';
if (! empty($conf->multicurrency->enabled))
{
print '<td class="right">'.$langs->trans("MulticurrencyAmountTTC").'</td>';
}
print '<td width="100" class="center">'.$langs->trans("DiscountOfferedBy").'</td>';
print '<td width="50">&nbsp;</td>';
print '</tr>';
@ -594,7 +618,7 @@ if ($socid > 0)
print '<td>'.dol_print_date($db->jdate($obj->dc), 'dayhour').'</td>';
if (preg_match('/\(CREDIT_NOTE\)/', $obj->description))
{
print '<td class="nowrap">';
print '<td class="minwidth100">';
$facturefournstatic->id=$obj->fk_invoice_supplier_source;
$facturefournstatic->ref=$obj->ref;
$facturefournstatic->type=$obj->type;
@ -603,7 +627,7 @@ if ($socid > 0)
}
elseif (preg_match('/\(DEPOSIT\)/', $obj->description))
{
print '<td class="nowrap">';
print '<td class="minwidth100">';
$facturefournstatic->id=$obj->fk_invoice_supplier_source;
$facturefournstatic->ref=$obj->ref;
$facturefournstatic->type=$obj->type;
@ -612,7 +636,7 @@ if ($socid > 0)
}
elseif (preg_match('/\(EXCESS PAID\)/', $obj->description))
{
print '<td class="nowrap">';
print '<td class="minwidth100">';
$facturefournstatic->id=$obj->fk_invoice_supplier_source;
$facturefournstatic->ref=$obj->ref;
$facturefournstatic->type=$obj->type;
@ -621,22 +645,30 @@ if ($socid > 0)
}
else
{
print '<td>';
print '<td class="minwidth100">';
print $obj->description;
print '</td>';
}
print '<td class="nowrap">'.$langs->trans("NotConsumed").'</td>';
print '<td class="right">'.price($obj->amount_ht).'</td>';
print '<td class="right">'.price2num($obj->tva_tx, 'MU').'%</td>';
if (! empty($conf->multicurrency->enabled))
{
print '<td class="right">'.price($obj->multicurrency_amount_ht).'</td>';
}
print '<td class="right">'.vatrate($obj->tva_tx, true).'</td>';
print '<td class="right">'.price($obj->amount_ttc).'</td>';
print '<td align="center">';
if (! empty($conf->multicurrency->enabled))
{
print '<td class="right">'.price($obj->multicurrency_amount_ttc).'</td>';
}
print '<td class="center">';
print '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"), 'user').' '.$obj->login.'</a>';
print '</td>';
if ($user->rights->societe->creer || $user->rights->facture->creer)
{
print '<td class="nowrap">';
print '<td class="center nowrap">';
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=split&remid='.$obj->rowid.($backtopage?'&backtopage='.urlencode($backtopage):'').'">'.img_split($langs->trans("SplitDiscount")).'</a>';
print ' &nbsp; ';
//print ' &nbsp; ';
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=remove&remid='.$obj->rowid.($backtopage?'&backtopage='.urlencode($backtopage):'').'">'.img_delete($langs->trans("RemoveDiscount")).'</a>';
print '</td>';
}
@ -700,7 +732,7 @@ if ($socid > 0)
}
// Remises liees a lignes de factures
$sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx,";
$sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx, rc.multicurrency_amount_ht, rc.multicurrency_amount_tva, rc.multicurrency_amount_ttc,";
$sql.= " rc.datec as dc, rc.description, rc.fk_facture_line, rc.fk_facture,";
$sql.= " rc.fk_facture_source,";
$sql.= " u.login, u.rowid as user_id,";
@ -745,11 +777,19 @@ if ($socid > 0)
print '<tr class="liste_titre">';
print '<td class="widthdate">'.$langs->trans("Date").'</td>'; // Need 120+ for format with AM/PM
print '<td>'.$langs->trans("ReasonDiscount").'</td>';
print '<td width="150" class="nowrap">'.$langs->trans("ConsumedBy").'</td>';
print '<td width="120" class="right">'.$langs->trans("AmountHT").'</td>';
print '<td width="80" class="right">'.$langs->trans("VATRate").'</td>';
print '<td width="120" class="right">'.$langs->trans("AmountTTC").'</td>';
print '<td width="100" align="center">'.$langs->trans("Author").'</td>';
print '<td class="nowrap">'.$langs->trans("ConsumedBy").'</td>';
print '<td class="right">'.$langs->trans("AmountHT").'</td>';
if (! empty($conf->multicurrency->enabled))
{
print '<td class="right">'.$langs->trans("MulticurrencyAmountHT").'</td>';
}
print '<td class="right">'.$langs->trans("VATRate").'</td>';
print '<td class="right">'.$langs->trans("AmountTTC").'</td>';
if (! empty($conf->multicurrency->enabled))
{
print '<td class="right">'.$langs->trans("MulticurrencyAmountTTC").'</td>';
}
print '<td width="100" class="center">'.$langs->trans("Author").'</td>';
print '<td width="50">&nbsp;</td>';
print '</tr>';
@ -788,7 +828,7 @@ if ($socid > 0)
print '<td>'.dol_print_date($db->jdate($obj->dc), 'dayhour').'</td>';
if (preg_match('/\(CREDIT_NOTE\)/', $obj->description))
{
print '<td class="nowrap">';
print '<td class="minwidth100">';
$facturestatic->id=$obj->fk_facture_source;
$facturestatic->ref=$obj->ref;
$facturestatic->type=$obj->type;
@ -797,7 +837,7 @@ if ($socid > 0)
}
elseif (preg_match('/\(DEPOSIT\)/', $obj->description))
{
print '<td class="nowrap">';
print '<td class="minwidth100">';
$facturestatic->id=$obj->fk_facture_source;
$facturestatic->ref=$obj->ref;
$facturestatic->type=$obj->type;
@ -806,7 +846,7 @@ if ($socid > 0)
}
elseif (preg_match('/\(EXCESS RECEIVED\)/', $obj->description))
{
print '<td class="nowrap">';
print '<td class="minwidth100">';
$facturestatic->id=$obj->fk_facture_source;
$facturestatic->ref=$obj->ref;
$facturestatic->type=$obj->type;
@ -815,15 +855,23 @@ if ($socid > 0)
}
else
{
print '<td>';
print '<td class="minwidth100">';
print $obj->description;
print '</td>';
}
print '<td align="left" class="nowrap"><a href="'.DOL_URL_ROOT.'/compta/facture/card.php?facid='.$obj->rowid.'">'.img_object($langs->trans("ShowBill"), 'bill').' '.$obj->ref.'</a></td>';
print '<td class="left nowrap"><a href="'.DOL_URL_ROOT.'/compta/facture/card.php?facid='.$obj->rowid.'">'.img_object($langs->trans("ShowBill"), 'bill').' '.$obj->ref.'</a></td>';
print '<td class="right">'.price($obj->amount_ht).'</td>';
print '<td class="right">'.price2num($obj->tva_tx, 'MU').'%</td>';
if (! empty($conf->multicurrency->enabled))
{
print '<td class="right">'.price($obj->multicurrency_amount_ht).'</td>';
}
print '<td class="right">'.vatrate($obj->tva_tx, true).'</td>';
print '<td class="right">'.price($obj->amount_ttc).'</td>';
print '<td align="center">';
if (! empty($conf->multicurrency->enabled))
{
print '<td class="right">'.price($obj->multicurrency_amount_ttc).'</td>';
}
print '<td class="center">';
print '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"), 'user').' '.$obj->login.'</a>';
print '</td>';
print '<td>&nbsp;</td>';
@ -854,7 +902,7 @@ if ($socid > 0)
}
// Remises liees a lignes de factures
$sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx,";
$sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx, rc.multicurrency_amount_ht, rc.multicurrency_amount_tva, rc.multicurrency_amount_ttc,";
$sql.= " rc.datec as dc, rc.description, rc.fk_invoice_supplier_line, rc.fk_invoice_supplier,";
$sql.= " rc.fk_invoice_supplier_source,";
$sql.= " u.login, u.rowid as user_id,";
@ -899,11 +947,19 @@ if ($socid > 0)
print '<tr class="liste_titre">';
print '<td class="widthdate">'.$langs->trans("Date").'</td>'; // Need 120+ for format with AM/PM
print '<td>'.$langs->trans("ReasonDiscount").'</td>';
print '<td width="150" class="nowrap">'.$langs->trans("ConsumedBy").'</td>';
print '<td width="120" class="right">'.$langs->trans("AmountHT").'</td>';
print '<td width="80" class="right">'.$langs->trans("VATRate").'</td>';
print '<td width="120" class="right">'.$langs->trans("AmountTTC").'</td>';
print '<td width="100" align="center">'.$langs->trans("Author").'</td>';
print '<td class="nowrap">'.$langs->trans("ConsumedBy").'</td>';
print '<td class="right">'.$langs->trans("AmountHT").'</td>';
if (! empty($conf->multicurrency->enabled))
{
print '<td class="right">'.$langs->trans("MulticurrencyAmountHT").'</td>';
}
print '<td class="right">'.$langs->trans("VATRate").'</td>';
print '<td class="right">'.$langs->trans("AmountTTC").'</td>';
if (! empty($conf->multicurrency->enabled))
{
print '<td class="right">'.$langs->trans("MulticurrencyAmountTTC").'</td>';
}
print '<td width="100" class="center">'.$langs->trans("Author").'</td>';
print '<td width="50">&nbsp;</td>';
print '</tr>';
@ -942,7 +998,7 @@ if ($socid > 0)
print '<td>'.dol_print_date($db->jdate($obj->dc), 'dayhour').'</td>';
if (preg_match('/\(CREDIT_NOTE\)/', $obj->description))
{
print '<td class="nowrap">';
print '<td class="minwidth100">';
$facturefournstatic->id=$obj->fk_invoice_supplier_source;
$facturefournstatic->ref=$obj->ref;
$facturefournstatic->type=$obj->type;
@ -951,7 +1007,7 @@ if ($socid > 0)
}
elseif (preg_match('/\(DEPOSIT\)/', $obj->description))
{
print '<td class="nowrap">';
print '<td class="minwidth100">';
$facturefournstatic->id=$obj->fk_invoice_supplier_source;
$facturefournstatic->ref=$obj->ref;
$facturefournstatic->type=$obj->type;
@ -960,7 +1016,7 @@ if ($socid > 0)
}
elseif (preg_match('/\(EXCESS PAID\)/', $obj->description))
{
print '<td class="nowrap">';
print '<td class="minwidth100">';
$facturefournstatic->id=$obj->fk_invoice_supplier_source;
$facturefournstatic->ref=$obj->ref;
$facturefournstatic->type=$obj->type;
@ -969,14 +1025,22 @@ if ($socid > 0)
}
else
{
print '<td>';
print '<td class="minwidth100">';
print $obj->description;
print '</td>';
}
print '<td align="left" class="nowrap"><a href="'.DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$obj->rowid.'">'.img_object($langs->trans("ShowBill"), 'bill').' '.$obj->ref.'</a></td>';
print '<td class="left nowrap"><a href="'.DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$obj->rowid.'">'.img_object($langs->trans("ShowBill"), 'bill').' '.$obj->ref.'</a></td>';
print '<td class="right">'.price($obj->amount_ht).'</td>';
print '<td class="right">'.price2num($obj->tva_tx, 'MU').'%</td>';
if (! empty($conf->multicurrency->enabled))
{
print '<td class="right">'.price($obj->multicurrency_amount_ht).'</td>';
}
print '<td class="right">'.vatrate($obj->tva_tx, true).'</td>';
print '<td class="right">'.price($obj->amount_ttc).'</td>';
if (! empty($conf->multicurrency->enabled))
{
print '<td class="right">'.price($obj->multicurrency_amount_ttc).'</td>';
}
print '<td align="center">';
print '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"), 'user').' '.$obj->login.'</a>';
print '</td>';

View File

@ -727,24 +727,24 @@ if ($resql)
if (! empty($arrayfields['s.town']['checked'])) print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder);
if (! empty($arrayfields['s.zip']['checked'])) print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], 's.zip', '', $param, '', $sortfield, $sortorder);
if (! empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($arrayfields['state.nom']['label'], $_SERVER["PHP_SELF"], "state.nom", "", $param, '', $sortfield, $sortorder);
if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, 'align="center"', $sortfield, $sortorder);
if (! empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'], $_SERVER["PHP_SELF"], "typent.code", "", $param, 'align="center"', $sortfield, $sortorder);
if (! empty($arrayfields['c.date_commande']['checked'])) print_liste_field_titre($arrayfields['c.date_commande']['label'], $_SERVER["PHP_SELF"], 'c.date_commande', '', $param, 'align="center"', $sortfield, $sortorder);
if (! empty($arrayfields['c.date_delivery']['checked'])) print_liste_field_titre($arrayfields['c.date_delivery']['label'], $_SERVER["PHP_SELF"], 'c.date_livraison', '', $param, 'align="center"', $sortfield, $sortorder);
if (! empty($arrayfields['c.total_ht']['checked'])) print_liste_field_titre($arrayfields['c.total_ht']['label'], $_SERVER["PHP_SELF"], 'c.total_ht', '', $param, 'class="right"', $sortfield, $sortorder);
if (! empty($arrayfields['c.total_vat']['checked'])) print_liste_field_titre($arrayfields['c.total_vat']['label'], $_SERVER["PHP_SELF"], 'c.tva', '', $param, 'class="right"', $sortfield, $sortorder);
if (! empty($arrayfields['c.total_ttc']['checked'])) print_liste_field_titre($arrayfields['c.total_ttc']['label'], $_SERVER["PHP_SELF"], 'c.total_ttc', '', $param, 'class="right"', $sortfield, $sortorder);
if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, '', $sortfield, $sortorder, 'center ');
if (! empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'], $_SERVER["PHP_SELF"], "typent.code", "", $param, '', $sortfield, $sortorder, 'center ');
if (! empty($arrayfields['c.date_commande']['checked'])) print_liste_field_titre($arrayfields['c.date_commande']['label'], $_SERVER["PHP_SELF"], 'c.date_commande', '', $param, '', $sortfield, $sortorder, 'center ');
if (! empty($arrayfields['c.date_delivery']['checked'])) print_liste_field_titre($arrayfields['c.date_delivery']['label'], $_SERVER["PHP_SELF"], 'c.date_livraison', '', $param, '', $sortfield, $sortorder, 'center ');
if (! empty($arrayfields['c.total_ht']['checked'])) print_liste_field_titre($arrayfields['c.total_ht']['label'], $_SERVER["PHP_SELF"], 'c.total_ht', '', $param, '', $sortfield, $sortorder, 'right ');
if (! empty($arrayfields['c.total_vat']['checked'])) print_liste_field_titre($arrayfields['c.total_vat']['label'], $_SERVER["PHP_SELF"], 'c.tva', '', $param, '', $sortfield, $sortorder, 'right ');
if (! empty($arrayfields['c.total_ttc']['checked'])) print_liste_field_titre($arrayfields['c.total_ttc']['label'], $_SERVER["PHP_SELF"], 'c.total_ttc', '', $param, '', $sortfield, $sortorder, 'right ');
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
// Hook fields
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (! empty($arrayfields['c.datec']['checked'])) print_liste_field_titre($arrayfields['c.datec']['label'], $_SERVER["PHP_SELF"], "c.date_creation", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
if (! empty($arrayfields['c.tms']['checked'])) print_liste_field_titre($arrayfields['c.tms']['label'], $_SERVER["PHP_SELF"], "c.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
if (! empty($arrayfields['c.fk_statut']['checked'])) print_liste_field_titre($arrayfields['c.fk_statut']['label'], $_SERVER["PHP_SELF"], "c.fk_statut", "", $param, 'class="right"', $sortfield, $sortorder);
if (! empty($arrayfields['c.facture']['checked'])) print_liste_field_titre($arrayfields['c.facture']['label'], $_SERVER["PHP_SELF"], 'c.facture', '', $param, 'align="center"', $sortfield, $sortorder, '');
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', $param, 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
if (! empty($arrayfields['c.datec']['checked'])) print_liste_field_titre($arrayfields['c.datec']['label'], $_SERVER["PHP_SELF"], "c.date_creation", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
if (! empty($arrayfields['c.tms']['checked'])) print_liste_field_titre($arrayfields['c.tms']['label'], $_SERVER["PHP_SELF"], "c.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
if (! empty($arrayfields['c.fk_statut']['checked'])) print_liste_field_titre($arrayfields['c.fk_statut']['label'], $_SERVER["PHP_SELF"], "c.fk_statut", "", $param, '', $sortfield, $sortorder, 'right ');
if (! empty($arrayfields['c.facture']['checked'])) print_liste_field_titre($arrayfields['c.facture']['label'], $_SERVER["PHP_SELF"], 'c.facture', '', $param, '', $sortfield, $sortorder, 'center ');
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'maxwidthsearch center ');
print '</tr>'."\n";
$total=0;

View File

@ -243,7 +243,7 @@ if ($result && $action == "dl")
$log='date,type,ref,total,paid,filename,item_id'."\n";
$zipname = $dirfortmpfile.'/'.dol_print_date($date_start, 'dayrfc')."-".dol_print_date($date_stop, 'dayrfc').'_export.zip';
dol_delete_file(name);
dol_delete_file($zipname);
$zip = new ZipArchive;
$res = $zip->open($zipname, ZipArchive::OVERWRITE|ZipArchive::CREATE);

View File

@ -696,6 +696,7 @@ if (empty($reshook))
$db->begin();
$amount_ht = $amount_tva = $amount_ttc = array();
$multicurrency_amount_ht = $multicurrency_amount_tva = $multicurrency_amount_ttc = array();
// Loop on each vat rate
$i = 0;
@ -709,7 +710,7 @@ if (empty($reshook))
$multicurrency_amount_ht[$line->tva_tx] += $line->multicurrency_total_ht;
$multicurrency_amount_tva[$line->tva_tx] += $line->multicurrency_total_tva;
$multicurrency_amount_ttc[$line->tva_tx] += $line->multicurrency_total_ttc;
$i ++;
$i++;
}
}
@ -4671,6 +4672,13 @@ elseif ($id > 0 || ! empty($ref))
}
}
// POS Ticket
if (! empty($conf->takepos->enabled) && $object->module_source != '')
{
$receipt_url=DOL_URL_ROOT."/takepos/receipt.php";
print '<div class="inline-block divButAction"><a target="_blank" class="butAction" href="' . $receipt_url . '?facid=' . $object->id.'">' . $langs->trans('POSTicket') .'</a></div>';
}
// Classify paid
if ($object->statut == 1 && $object->paye == 0 && $usercanissuepayment && (($object->type != Facture::TYPE_CREDIT_NOTE && $object->type != Facture::TYPE_DEPOSIT && $resteapayer <= 0) || ($object->type == Facture::TYPE_CREDIT_NOTE && $resteapayer >= 0))
|| ($object->type == Facture::TYPE_DEPOSIT && $object->paye == 0 && $object->total_ttc > 0 && $resteapayer == 0 && $usercanissuepayment && empty($discount->id))

View File

@ -338,7 +338,7 @@ class Invoices extends DolibarrApi
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
}
$request_data = (object) $request_data;
$updateRes = $this->invoice->updateline(
$updateRes = $this->invoice->updateline(
$lineid,
$request_data->desc,
$request_data->subprice,
@ -362,7 +362,7 @@ class Invoices extends DolibarrApi
$request_data->situation_percent,
$request_data->fk_unit,
$request_data->multicurrency_subprice
);
);
if ($updateRes > 0) {
$result = $this->get($id);
@ -392,7 +392,7 @@ class Invoices extends DolibarrApi
throw new RestException(401);
}
$result = $this->facture->fetch($id);
$result = $this->invoice->fetch($id);
if(!$result) {
throw new RestException(404, 'Invoice not found');
@ -402,17 +402,17 @@ class Invoices extends DolibarrApi
throw new RestException(500, 'Availables types: BILLING, SHIPPING OR CUSTOMER');
}
if(!DolibarrApi::_checkAccessToResource('invoice', $this->facture->id)) {
if(!DolibarrApi::_checkAccessToResource('invoice', $this->invoice->id)) {
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
}
$result = $this->facture->add_contact($contactid, $type, 'external');
$result = $this->invoice->add_contact($contactid, $type, 'external');
if (!$result) {
throw new RestException(500, 'Error when added the contact');
}
return $this->facture;
return $this->_cleanObjectDatas($this->invoice);
}
/**
@ -434,23 +434,23 @@ class Invoices extends DolibarrApi
throw new RestException(401);
}
$result = $this->facture->fetch($id);
$result = $this->invoice->fetch($id);
if(!$result) {
if (!$result) {
throw new RestException(404, 'Invoice not found');
}
if(!DolibarrApi::_checkAccessToResource('invoice', $this->facture->id)) {
if (!DolibarrApi::_checkAccessToResource('invoice', $this->invoice->id)) {
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
}
$result = $this->facture->delete_contact($rowid);
$result = $this->invoice->delete_contact($rowid);
if (!$result) {
throw new RestException(500, 'Error when deleted the contact');
}
return $this->facture;
return $this->_cleanObjectDatas($this->invoice);
}
/**

View File

@ -253,11 +253,13 @@ if (empty($reshook))
$paiement->amounts = $amounts; // Array with all payments dispatching with invoice id
$paiement->multicurrency_amounts = $multicurrency_amounts; // Array with all payments dispatching
$paiement->paiementid = dol_getIdFromCode($db, GETPOST('paiementcode'), 'c_paiement', 'code', 'id', 1);
$paiement->num_paiement = GETPOST('num_paiement');
$paiement->note = GETPOST('comment');
$paiement->num_paiement = GETPOST('num_paiement', 'alpha');
$paiement->note = GETPOST('comment', 'alpha');
if (! $error)
{
// Create payment and update this->multicurrency_amounts if this->amounts filled or
// this->amounts if this->multicurrency_amounts filled.
$paiement_id = $paiement->create($user, (GETPOST('closepaidinvoices')=='on'?1:0), $thirdparty); // This include closing invoices and regenerating documents
if ($paiement_id < 0)
{
@ -635,7 +637,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
// Date
print '<td align="center">'.dol_print_date($db->jdate($objp->df), 'day')."</td>\n";
// Date Max Payment
// Due date
if ($objp->dlr > 0 )
{
print '<td align="center">';
@ -650,7 +652,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
}
else
{
print '<td align="center"><b>--</b></td>';
print '<td align="center"></td>';
}
// Currency
@ -673,12 +675,12 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
}
print '</td>';
// Multicurrency Price
// Multicurrency remain to pay
print '<td class="right">';
if ($objp->multicurrency_code && $objp->multicurrency_code != $conf->currency) print price($sign * $multicurrency_remaintopay);
print '</td>';
print '<td class="right">';
print '<td class="right nowraponall">';
// Add remind multicurrency amount
$namef = 'multicurrency_amount_'.$objp->facid;
@ -690,12 +692,12 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
{
if (!empty($conf->use_javascript_ajax))
print img_picto("Auto fill", 'rightarrow', "class='AutoFillAmout' data-rowname='".$namef."' data-value='".($sign * $multicurrency_remaintopay)."'");
print '<input type=hidden class="multicurrency_remain" name="'.$nameRemain.'" value="'.$multicurrency_remaintopay.'">';
print '<input type="text" size="8" class="multicurrency_amount" name="'.$namef.'" value="'.$_POST[$namef].'">';
print '<input type="text" class="maxwidth75 multicurrency_amount" name="'.$namef.'" value="'.$_POST[$namef].'">';
print '<input type="hidden" class="multicurrency_remain" name="'.$nameRemain.'" value="'.$multicurrency_remaintopay.'">';
}
else
{
print '<input type="text" size="8" name="'.$namef.'_disabled" value="'.$_POST[$namef].'" disabled>';
print '<input type="text" class="maxwidth75" name="'.$namef.'_disabled" value="'.$_POST[$namef].'" disabled>';
print '<input type="hidden" name="'.$namef.'" value="'.$_POST[$namef].'">';
}
}
@ -716,7 +718,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
//$test= price(price2num($objp->total_ttc - $paiement - $creditnotes - $deposits));
// Amount
print '<td class="right">';
print '<td class="right nowraponall">';
// Add remind amount
$namef = 'amount_'.$objp->facid;
@ -726,12 +728,12 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
{
if (!empty($conf->use_javascript_ajax))
print img_picto("Auto fill", 'rightarrow', "class='AutoFillAmout' data-rowname='".$namef."' data-value='".($sign * $remaintopay)."'");
print '<input type="text" class="maxwidth75 amount" name="'.$namef.'" value="'.dol_escape_htmltag(GETPOST($namef)).'">';
print '<input type="hidden" class="remain" name="'.$nameRemain.'" value="'.$remaintopay.'">';
print '<input type="text" size="8" class="amount" name="'.$namef.'" value="'.dol_escape_htmltag(GETPOST($namef)).'">';
}
else
{
print '<input type="text" size="8" name="'.$namef.'_disabled" value="'.dol_escape_htmltag(GETPOST($namef)).'" disabled>';
print '<input type="text" class="maxwidth75" name="'.$namef.'_disabled" value="'.dol_escape_htmltag(GETPOST($namef)).'" disabled>';
print '<input type="hidden" name="'.$namef.'" value="'.dol_escape_htmltag(GETPOST($namef)).'">';
}
print "</td>";

View File

@ -366,6 +366,7 @@ class Paiement extends CommonObject
if ($invoice->type == Facture::TYPE_DEPOSIT)
{
$amount_ht = $amount_tva = $amount_ttc = array();
$multicurrency_amount_ht = $multicurrency_amount_tva = $multicurrency_amount_ttc = array();
// Insert one discount by VAT rate category
$discount = new DiscountAbsolute($this->db);
@ -384,6 +385,9 @@ class Paiement extends CommonObject
$amount_ht[$line->tva_tx] += $line->total_ht;
$amount_tva[$line->tva_tx] += $line->total_tva;
$amount_ttc[$line->tva_tx] += $line->total_ttc;
$multicurrency_amount_ht[$line->tva_tx] += $line->multicurrency_total_ht;
$multicurrency_amount_tva[$line->tva_tx] += $line->multicurrency_total_tva;
$multicurrency_amount_ttc[$line->tva_tx] += $line->multicurrency_total_ttc;
$i++;
}
}
@ -392,6 +396,9 @@ class Paiement extends CommonObject
$discount->amount_ht = abs($amount_ht[$tva_tx]);
$discount->amount_tva = abs($amount_tva[$tva_tx]);
$discount->amount_ttc = abs($amount_ttc[$tva_tx]);
$discount->multicurrency_amount_ht = abs($multicurrency_amount_ht[$tva_tx]);
$discount->multicurrency_amount_tva = abs($multicurrency_amount_tva[$tva_tx]);
$discount->multicurrency_amount_ttc = abs($multicurrency_amount_ttc[$tva_tx]);
$discount->tva_tx = abs($tva_tx);
$result = $discount->create($user);
@ -1110,7 +1117,7 @@ class Paiement extends CommonObject
/**
* get the right way of payment
*
* @return string 'dolibarr' if standard comportment or paid in dolibarr currency, 'customer' if payment received from multicurrency inputs
* @return string 'dolibarr' if standard comportment or paid in main currency, 'customer' if payment received from multicurrency inputs
*/
function getWay()
{

View File

@ -1225,7 +1225,7 @@ else
// Other attributes
$cols = 3;
$parameyers=array('socid'=>$socid);
$parameters=array('socid'=>$socid);
include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
$object->load_ref_elements();

View File

@ -9,6 +9,7 @@
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2018 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
*
* 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
@ -81,7 +82,7 @@ $search_town=GETPOST('search_town', 'alpha');
$search_import_key=GETPOST("search_import_key", "alpha");
$search_country=GETPOST("search_country", 'intcomma');
if ($search_status=='') $search_status=1; // always display activ customer first
if ($search_status=='') $search_status=1; // always display active customer first
$optioncss = GETPOST('optioncss', 'alpha');
@ -400,15 +401,15 @@ $help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:M&oacute;dulo_Empresas';
llxHeader('', $title, $help_url);
$param='';
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
$param.='&begin='.urlencode($begin).'&view='.urlencode($view).'&userid='.urlencode($userid).'&contactname='.urlencode($sall);
$param.='&type='.urlencode($type).'&view='.urlencode($view);
if (!empty($search_categ)) $param.='&search_categ='.urlencode($search_categ);
if (!empty($search_categ_thirdparty)) $param.='&search_categ_thirdparty='.urlencode($search_categ_thirdparty);
if (!empty($search_categ_supplier)) $param.='&search_categ_supplier='.urlencode($search_categ_supplier);
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&amp;contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&amp;limit='.$limit;
$param.='&amp;begin='.urlencode($begin).'&amp;userid='.urlencode($userid).'&amp;contactname='.urlencode($sall);
$param.='&amp;type='.urlencode($type).'&amp;view='.urlencode($view);
if (!empty($search_categ)) $param.='&amp;search_categ='.urlencode($search_categ);
if (!empty($search_categ_thirdparty)) $param.='&amp;search_categ_thirdparty='.urlencode($search_categ_thirdparty);
if (!empty($search_categ_supplier)) $param.='&amp;search_categ_supplier='.urlencode($search_categ_supplier);
if ($sall != '') $param.='&amp;sall='.urlencode($sall);
if ($search_id > 0) $param.= "&search_id=".urlencode($search_id);
if ($search_id > 0) $param.= "&amp;search_id=".urlencode($search_id);
if ($search_lastname != '') $param.='&amp;search_lastname='.urlencode($search_lastname);
if ($search_firstname != '') $param.='&amp;search_firstname='.urlencode($search_firstname);
if ($search_societe != '') $param.='&amp;search_societe='.urlencode($search_societe);
@ -422,9 +423,9 @@ if ($search_phone_mobile != '') $param.='&amp;search_phone_mobile='.urlencode($s
if ($search_fax != '') $param.='&amp;search_fax='.urlencode($search_fax);
if ($search_email != '') $param.='&amp;search_email='.urlencode($search_email);
if ($search_status != '') $param.='&amp;search_status='.urlencode($search_status);
if ($search_priv == '0' || $search_priv == '1') $param.="&search_priv=".urlencode($search_priv);
if ($search_import_key != '') $param.='&search_import_key='.urlencode($search_import_key);
if ($optioncss != '') $param.='&optioncss='.$optioncss;
if ($search_priv == '0' || $search_priv == '1') $param.="&amp;search_priv=".urlencode($search_priv);
if ($search_import_key != '') $param.='&amp;search_import_key='.urlencode($search_import_key);
if ($optioncss != '') $param.='&amp;optioncss='.$optioncss;
// Add $param from extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
@ -572,7 +573,7 @@ if (! empty($arrayfields['p.town']['checked']))
// Country
if (! empty($arrayfields['country.code_iso']['checked']))
{
print '<td class="liste_titre" align="center">';
print '<td class="liste_titre center">';
print $form->select_country($search_country, 'search_country', '', 0, 'maxwidth100');
print '</td>';
}
@ -632,7 +633,7 @@ if (! empty($arrayfields['p.thirdparty']['checked']))
}
if (! empty($arrayfields['p.priv']['checked']))
{
print '<td class="liste_titre" align="center">';
print '<td class="liste_titre center">';
$selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate"));
print $form->selectarray('search_priv', $selectarray, $search_priv, 1);
print '</td>';
@ -697,17 +698,17 @@ if (! empty($arrayfields['p.skype']['checked'])) print_liste_field
if (! empty($arrayfields['p.twitter']['checked'])) print_liste_field_titre($arrayfields['p.twitter']['label'], $_SERVER["PHP_SELF"], "p.twitter", $begin, $param, '', $sortfield, $sortorder);
if (! empty($arrayfields['p.facebook']['checked'])) print_liste_field_titre($arrayfields['p.facebook']['label'], $_SERVER["PHP_SELF"], "p.facebook", $begin, $param, '', $sortfield, $sortorder);
if (! empty($arrayfields['p.thirdparty']['checked'])) print_liste_field_titre($arrayfields['p.thirdparty']['label'], $_SERVER["PHP_SELF"], "s.nom", $begin, $param, '', $sortfield, $sortorder);
if (! empty($arrayfields['p.priv']['checked'])) print_liste_field_titre($arrayfields['p.priv']['label'], $_SERVER["PHP_SELF"], "p.priv", $begin, $param, 'align="center"', $sortfield, $sortorder);
if (! empty($arrayfields['p.priv']['checked'])) print_liste_field_titre($arrayfields['p.priv']['label'], $_SERVER["PHP_SELF"], "p.priv", $begin, $param, '', $sortfield, $sortorder, 'center ');
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
// Hook fields
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (! empty($arrayfields['p.datec']['checked'])) print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
if (! empty($arrayfields['p.tms']['checked'])) print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
if (! empty($arrayfields['p.statut']['checked'])) print_liste_field_titre($arrayfields['p.statut']['label'], $_SERVER["PHP_SELF"], "p.statut", "", $param, 'align="center"', $sortfield, $sortorder);
if (! empty($arrayfields['p.import_key']['checked'])) print_liste_field_titre($arrayfields['p.import_key']['label'], $_SERVER["PHP_SELF"], "p.import_key", "", $param, 'align="center"', $sortfield, $sortorder);
if (! empty($arrayfields['p.datec']['checked'])) print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
if (! empty($arrayfields['p.tms']['checked'])) print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
if (! empty($arrayfields['p.statut']['checked'])) print_liste_field_titre($arrayfields['p.statut']['label'], $_SERVER["PHP_SELF"], "p.statut", "", $param, '', $sortfield, $sortorder, 'center ');
if (! empty($arrayfields['p.import_key']['checked'])) print_liste_field_titre($arrayfields['p.import_key']['label'], $_SERVER["PHP_SELF"], "p.import_key", "", $param, '', $sortfield, $sortorder, 'center ');
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
print "</tr>\n";
@ -787,7 +788,7 @@ while ($i < min($num, $limit))
// Country
if (! empty($arrayfields['country.code_iso']['checked']))
{
print '<td align="center">';
print '<td class="center">';
$tmparray=getCountry($obj->fk_pays, 'all');
print $tmparray['label'];
print '</td>';
@ -867,7 +868,7 @@ while ($i < min($num, $limit))
// Private/Public
if (! empty($arrayfields['p.priv']['checked']))
{
print '<td align="center">'.$contactstatic->LibPubPriv($obj->priv).'</td>';
print '<td class="center">'.$contactstatic->LibPubPriv($obj->priv).'</td>';
if (! $i) $totalarray['nbfield']++;
}
@ -880,7 +881,7 @@ while ($i < min($num, $limit))
// Date creation
if (! empty($arrayfields['p.datec']['checked']))
{
print '<td align="center">';
print '<td class="center">';
print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser');
print '</td>';
if (! $i) $totalarray['nbfield']++;
@ -888,7 +889,7 @@ while ($i < min($num, $limit))
// Date modification
if (! empty($arrayfields['p.tms']['checked']))
{
print '<td align="center">';
print '<td class="center">';
print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser');
print '</td>';
if (! $i) $totalarray['nbfield']++;
@ -896,7 +897,7 @@ while ($i < min($num, $limit))
// Status
if (! empty($arrayfields['p.statut']['checked']))
{
print '<td align="center">'.$contactstatic->getLibStatut(3).'</td>';
print '<td class="center">'.$contactstatic->getLibStatut(3).'</td>';
if (! $i) $totalarray['nbfield']++;
}
if (! empty($arrayfields['p.import_key']['checked']))
@ -908,7 +909,7 @@ while ($i < min($num, $limit))
}
// Action column
print '<td class="nowrap" align="center">';
print '<td class="nowrap center">';
if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
{
$selected=0;

View File

@ -53,10 +53,13 @@ class DiscountAbsolute
*/
public $fk_soc;
public $discount_type; // 0 => customer discount, 1 => supplier discount
public $amount_ht; //
public $discount_type; // 0 => customer discount, 1 => supplier discount
public $amount_ht; //
public $amount_tva; //
public $amount_ttc; //
public $multicurrency_amount_ht;
public $multicurrency_amount_tva;
public $multicurrency_amount_ttc;
public $tva_tx; // Vat rate
/**

View File

@ -669,7 +669,7 @@ class Form
*
* @param string $selected Id or Code or Label of preselected country
* @param string $htmlname Name of html select object
* @param string $htmloption Options html on select object
* @param string $htmloption More html options on select object
* @param integer $maxlength Max length for labels (0=no limit)
* @param string $morecss More css class
* @param string $usecodeaskey ''=Use id as key (default), 'code3'=Use code on 3 alpha as key, 'code2"=Use code on 2 alpha as key

View File

@ -2636,7 +2636,7 @@ function dol_print_ip($ip, $mode = 0)
* Return the IP of remote user.
* Take HTTP_X_FORWARDED_FOR (defined when using proxy)
* Then HTTP_CLIENT_IP if defined (rare)
* Then REMOTE_ADDR (not way to be modified by user but may be wrong if using proxy)
* Then REMOTE_ADDR (no way to be modified by user but may be wrong if user is using a proxy)
*
* @return string Ip of remote user.
*/
@ -2979,7 +2979,9 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'jabber','skype','twitter','facebook'
)
)) {
$fakey = $pictowithoutext;
$fa='fa';
if (! empty($conf->global->MAIN_USE_FONT_AWESOME_5)) $fa='fas';
$fakey = $pictowithoutext;
$facolor = ''; $fasize = '';
$marginleftonlyshort = 2;
if ($pictowithoutext == 'switch_off') {
@ -3074,6 +3076,10 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
elseif ($pictowithoutext == 'jabber') {
$fakey = 'fa-comment-o';
}
elseif ($pictowithoutext == 'skype') {
$fakey = 'fa-'.$pictowithoutext;
if (! empty($conf->global->MAIN_USE_FONT_AWESOME_5)) $fa = 'fab';
}
elseif ($pictowithoutext == 'split') {
$fakey = 'fa-code-fork';
}
@ -3095,8 +3101,6 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
}
$moreatt=trim($moreatt);
$fa='fa';
if (! empty($conf->global->MAIN_USE_FONT_AWESOME_5)) $fa='fas';
$enabledisablehtml = '<span class="' . $fa . ' ' . $fakey . ($marginleftonlyshort ? ($marginleftonlyshort == 1 ? ' marginleftonlyshort' : ' marginleftonly') : '');
$enabledisablehtml .= ' valignmiddle' . ($morecss ? ' ' . $morecss : '') . '" style="' . ($fasize ? ('font-size: ' . $fasize . ';') : '') . ($facolor ? (' color: ' . $facolor . ';') : '') . ($morestyle ? ' ' . $morestyle : '') . '"' . (($notitle || empty($titlealt)) ? '' : ' title="' . dol_escape_htmltag($titlealt) . '"') . ($moreatt ? ' ' . $moreatt : '') . '>';
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {

View File

@ -472,8 +472,8 @@ function show_stats_for_company($product, $socid)
function measuring_units_string($unit, $measuring_style = '')
{
global $langs, $db;
require_once DOL_DOCUMENT_ROOT.'/core/class/cmeasuringunits.class.php';
$measuringUnits= new CMeasuringUnits($db);
require_once DOL_DOCUMENT_ROOT.'/core/class/cunits.class.php';
$measuringUnits= new CUnits($db);
$result = $measuringUnits->fetchAll('', '', 0, 0, array(
't.code' => $unit,
't.unit_type' => $measuring_style,

View File

@ -351,48 +351,48 @@ class modProduct extends DolibarrModules
$this->import_convertvalue_array[$r] = array(
'p.weight_units' => array(
'rule' => 'fetchidfromcodeunits',
'classfile' => '/core/class/cmeasuringunits.class.php',
'class' => 'CMeasuringUnits',
'classfile' => '/core/class/cunits.class.php',
'class' => 'CUnits',
'method' => 'fetch',
'units' => 'weight',
'dict' => 'DictionaryMeasuringUnits'
),
'p.length_units' => array(
'rule' => 'fetchidfromcodeunits',
'classfile' => '/core/class/cmeasuringunits.class.php',
'class' => 'CMeasuringUnits',
'classfile' => '/core/class/cunits.class.php',
'class' => 'CUnits',
'method' => 'fetch',
'units' => 'size',
'dict' => 'DictionaryMeasuringUnits'
),
'p.width_units' => array(
'rule' => 'fetchidfromcodeunits',
'classfile' => '/core/class/cmeasuringunits.class.php',
'class' => 'CMeasuringUnits',
'classfile' => '/core/class/cunits.class.php',
'class' => 'CUnits',
'method' => 'fetch',
'units' => 'size',
'dict' => 'DictionaryMeasuringUnits'
),
'p.height_units' => array(
'rule' => 'fetchidfromcodeunits',
'classfile' => '/core/class/cmeasuringunits.class.php',
'class' => 'CMeasuringUnits',
'classfile' => '/core/class/cunits.class.php',
'class' => 'CUnits',
'method' => 'fetch',
'units' => 'size',
'dict' => 'DictionaryMeasuringUnits'
),
'p.surface_units' => array(
'rule' => 'fetchidfromcodeunits',
'classfile' => '/core/class/cmeasuringunits.class.php',
'class' => 'CMeasuringUnits',
'classfile' => '/core/class/cunits.class.php',
'class' => 'CUnits',
'method' => 'fetch',
'units' => 'surface',
'dict' => 'DictionaryMeasuringUnits'
),
'p.volume_units' => array(
'rule' => 'fetchidfromcodeunits',
'classfile' => '/core/class/cmeasuringunits.class.php',
'class' => 'CMeasuringUnits',
'classfile' => '/core/class/cunits.class.php',
'class' => 'CUnits',
'method' => 'fetch',
'units' => 'volume',
'dict' => 'DictionaryMeasuringUnits'

View File

@ -86,7 +86,7 @@ class modTakePos extends DolibarrModules
'tpl' => 0, // Set this to 1 if module overwrite template dir (core/tpl)
'barcode' => 0, // Set this to 1 if module has its own barcode directory (core/modules/barcode)
'models' => 0, // Set this to 1 if module has its own models directory (core/modules/xxx)
'hooks' => array('data'=>array('invoicecard'), 'entity'=>'0') // Set here all hooks context managed by module. To find available hook context, make a "grep -r '>initHooks(' *" on source code. You can also set hook context 'all'
'hooks' => array() // Set here all hooks context managed by module. To find available hook context, make a "grep -r '>initHooks(' *" on source code. You can also set hook context 'all'
);
// Data directories to create when module is enabled.

View File

@ -203,7 +203,7 @@ $langs->load("modulebuilder");
<?php dol_fiche_end(); ?>
<div align="center"><input type="submit" name="button" class="button" value="<?php echo $langs->trans("Save"); ?>">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<div class="center"><input type="submit" name="button" class="button" value="<?php echo $langs->trans("Save"); ?>">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="submit" name="button" class="button" value="<?php echo $langs->trans("Cancel"); ?>"></div>
</form>

View File

@ -266,7 +266,7 @@ else
<?php dol_fiche_end(); ?>
<div align="center"><input type="submit" name="button" class="button" value="<?php echo $langs->trans("Save"); ?>">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<div class="center"><input type="submit" name="button" class="button" value="<?php echo $langs->trans("Save"); ?>">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="submit" name="button" class="button" value="<?php echo $langs->trans("Cancel"); ?>"></div>
</form>

View File

@ -58,15 +58,15 @@ print '<td>'.$langs->trans("LabelOrTranslationKey").'</td>';
print '<td>'.$langs->trans("TranslationString").'</td>';
print '<td>'.$langs->trans("AttributeCode").'</td>';
print '<td>'.$langs->trans("Type").'</td>';
print '<td align="right">'.$langs->trans("Size").'</td>';
print '<td class="right">'.$langs->trans("Size").'</td>';
print '<td>'.$langs->trans("ComputedFormula").'</td>';
print '<td align="center">'.$langs->trans("Unique").'</td>';
print '<td align="center">'.$langs->trans("Required").'</td>';
print '<td align="center">'.$langs->trans("AlwaysEditable").'</td>';
print '<td align="center">'.$form->textwithpicto($langs->trans("Visible"), $langs->trans("VisibleDesc")).'</td>';
print '<td align="center">'.$form->textwithpicto($langs->trans("Totalizable"), $langs->trans("TotalizableDesc")).'</td>';
print '<td class="center">'.$langs->trans("Unique").'</td>';
print '<td class="center">'.$langs->trans("Required").'</td>';
print '<td class="center">'.$langs->trans("AlwaysEditable").'</td>';
print '<td class="center">'.$form->textwithpicto($langs->trans("Visible"), $langs->trans("VisibleDesc")).'</td>';
print '<td class="center">'.$form->textwithpicto($langs->trans("Totalizable"), $langs->trans("TotalizableDesc")).'</td>';
if ($conf->multicompany->enabled) {
print '<td align="center">'.$langs->trans("Entities").'</td>';
print '<td class="center">'.$langs->trans("Entities").'</td>';
}
print '<td width="80">&nbsp;</td>';
print "</tr>\n";
@ -86,15 +86,15 @@ if (is_array($extrafields->attributes[$elementtype]['type']) && count($extrafiel
print "<td>".$langs->trans($extrafields->attributes[$elementtype]['label'][$key])."</td>\n";
print "<td>".$key."</td>\n";
print "<td>".$type2label[$extrafields->attributes[$elementtype]['type'][$key]]."</td>\n";
print '<td align="right">'.$extrafields->attributes[$elementtype]['size'][$key]."</td>\n";
print '<td class="right">'.$extrafields->attributes[$elementtype]['size'][$key]."</td>\n";
print '<td>'.dol_trunc($extrafields->attributes[$elementtype]['computed'][$key], 20)."</td>\n";
print '<td align="center">'.yn($extrafields->attributes[$elementtype]['unique'][$key])."</td>\n";
print '<td align="center">'.yn($extrafields->attributes[$elementtype]['required'][$key])."</td>\n";
print '<td align="center">'.yn($extrafields->attributes[$elementtype]['alwayseditable'][$key])."</td>\n";
print '<td align="center">'.$extrafields->attributes[$elementtype]['list'][$key]."</td>\n";
print '<td align="center">'.yn($extrafields->attributes[$elementtype]['totalizable'][$key])."</td>\n";
print '<td class="center">'.yn($extrafields->attributes[$elementtype]['unique'][$key])."</td>\n";
print '<td class="center">'.yn($extrafields->attributes[$elementtype]['required'][$key])."</td>\n";
print '<td class="center">'.yn($extrafields->attributes[$elementtype]['alwayseditable'][$key])."</td>\n";
print '<td class="center">'.$extrafields->attributes[$elementtype]['list'][$key]."</td>\n";
print '<td class="center">'.yn($extrafields->attributes[$elementtype]['totalizable'][$key])."</td>\n";
if (! empty($conf->multicompany->enabled)) {
print '<td align="center">'.($extrafields->attributes[$elementtype]['entityid'][$key]==0?$langs->trans("All"):$extrafields->attributes[$elementtype]['entitylabel'][$key]).'</td>';
print '<td class="center">'.($extrafields->attributes[$elementtype]['entityid'][$key]==0?$langs->trans("All"):$extrafields->attributes[$elementtype]['entitylabel'][$key]).'</td>';
}
print '<td class="right nowraponall""><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'#formeditextrafield">'.img_edit().'</a>';
print "&nbsp; <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=$key\">".img_delete()."</a></td>\n";

View File

@ -53,10 +53,10 @@ print '<script type="text/javascript" language="javascript">
print '<form name="find_customer" id="find_customer" action="' . $_SERVER['PHP_SELF'] . '?id=' . $id . '" method="POST">' . "\n";
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">' . "\n";
print '<input type="hidden" name="action" value="">' . "\n";
print '<table class="border" width="100%">' . "\n";
print '<table class="border centpercent">' . "\n";
print '<tr>' . "\n";
print '<td colspan="3" align="right">' . "\n";
print '<td colspan="3" class="right">' . "\n";
print '<input type="button" name="addcontact" id="addcontact" value="' . $langs->trans('AdvTgtAddContact') . '" class="butAction"/>' . "\n";
@ -146,10 +146,13 @@ print '<script type="text/javascript" language="javascript">
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
}
print '</td><td>';
print $formadvtargetemaling->advMultiselectarray('cust_status', array (
print $formadvtargetemaling->advMultiselectarray(
'cust_status', array (
'0' => $langs->trans('ActivityCeased'),
'1' => $langs->trans('InActivity')
), $array_query['cust_status']);
),
$array_query['cust_status']
);
print '</td><td>' . "\n";
print '</td></tr>' . "\n";
@ -289,11 +292,15 @@ print $formadvtargetemaling->advMultiselectarray('cust_status', array (
print '</td><td>' . "\n";
print $form->textwithpicto('', $langs->trans("AdvTgtSearchDtHelp"), 1, 'help');
} elseif (($extrafields->attribute_type[$key] == 'boolean')) {
print $form->selectarray('options_' . $key, array (
print $form->selectarray(
'options_' . $key,
array (
'' => '',
'1' => $langs->trans('Yes'),
'0' => $langs->trans('No')
), $array_query['options_' . $key]);
),
$array_query['options_' . $key]
);
print '</td><td>' . "\n";
} elseif (($extrafields->attribute_type[$key] == 'select')) {
print $formadvtargetemaling->advMultiselectarray('options_' . $key, $extrafields->attribute_param[$key]['options'], $array_query['options_' . $key]);
@ -302,7 +309,6 @@ print $formadvtargetemaling->advMultiselectarray('cust_status', array (
print $formadvtargetemaling->advMultiselectarraySelllist('options_' . $key, $extrafields->attribute_param[$key]['options'], $array_query['options_' . $key]);
print '</td><td>' . "\n";
} else {
print '<table class="nobordernopadding"><tr>';
print '<td></td><td>';
if (is_array($array_query['options_' . $key])) {
@ -341,10 +347,14 @@ print $formadvtargetemaling->advMultiselectarray('cust_status', array (
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
}
print '</td><td>';
print $formadvtargetemaling->advMultiselectarray('contact_status', array (
print $formadvtargetemaling->advMultiselectarray(
'contact_status',
array (
'0' => $langs->trans('ActivityCeased'),
'1' => $langs->trans('InActivity')
), $array_query['contact_status']);
),
$array_query['contact_status']
);
print '</td><td>' . "\n";
print $form->textwithpicto('', $langs->trans("AdvTgtContactHelp"), 1, 'help');
print '</td></tr>' . "\n";
@ -390,11 +400,15 @@ print $formadvtargetemaling->advMultiselectarray('contact_status', array (
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
}
print '</td><td>' . "\n";
print $form->selectarray('contact_no_email', array (
print $form->selectarray(
'contact_no_email',
array (
'' => '',
'1' => $langs->trans('Yes'),
'0' => $langs->trans('No')
), $array_query['contact_no_email']);
),
$array_query['contact_no_email']
);
print '</td><td>' . "\n";
print '</td></tr>' . "\n";
@ -478,11 +492,15 @@ print $form->selectarray('contact_no_email', array (
print '</td><td>' . "\n";
print $form->textwithpicto('', $langs->trans("AdvTgtSearchDtHelp"), 1, 'help');
} elseif (($extrafields->attribute_type[$key] == 'boolean')) {
print $form->selectarray('options_' . $key . '_cnct', array (
print $form->selectarray(
'options_' . $key . '_cnct',
array (
'' => '',
'1' => $langs->trans('Yes'),
'0' => $langs->trans('No')
), $array_query['options_' . $key . '_cnct']);
),
$array_query['options_' . $key . '_cnct']
);
print '</td><td>' . "\n";
} elseif (($extrafields->attribute_type[$key] == 'select')) {
print $formadvtargetemaling->advMultiselectarray('options_' . $key . '_cnct', $extrafields->attribute_param[$key]['options'], $array_query['options_' . $key . '_cnct']);
@ -508,7 +526,7 @@ print $form->selectarray('contact_no_email', array (
}
print '<tr>' . "\n";
print '<td colspan="3" align="right">' . "\n";
print '<td colspan="3" class="right">' . "\n";
print '<input type="button" name="addcontact" id="addcontact" value="' . $langs->trans('AdvTgtAddContact') . '" class="butAction"/>' . "\n";

View File

@ -106,8 +106,8 @@ class InterfaceMailmanSpipsynchro extends DolibarrTriggers
$return=0;
if ($object->add_to_abo() < 0)
{
if (! empty($object->error)) $this->error=$object->error;
$this->errors=$object->errors;
if (! empty($object->error)) $this->errors[]=$object->error;
$return=-1;
}
else
@ -129,8 +129,8 @@ class InterfaceMailmanSpipsynchro extends DolibarrTriggers
{
if ($object->oldcopy->del_to_abo() < 0)
{
if (! empty($object->oldcopy->error)) $this->error=$object->oldcopy->error;
$this->errors=$object->oldcopy->errors;
if (! empty($object->oldcopy->error)) $this->errors[]=$object->oldcopy->error;
$return=-1;
}
else
@ -141,8 +141,8 @@ class InterfaceMailmanSpipsynchro extends DolibarrTriggers
// We add subscription if new email or new type (new type may means more mailing-list to subscribe)
if ($object->add_to_abo() < 0)
{
if (! empty($object->error)) $this->error=$object->error;
$this->errors=$object->errors;
if (! empty($object->error)) $this->errors[]=$object->error;
$return=-1;
}
else
@ -161,8 +161,8 @@ class InterfaceMailmanSpipsynchro extends DolibarrTriggers
// Remove from external tools (mailman, spip, etc...)
if ($object->del_to_abo() < 0)
{
if (! empty($object->error)) $this->error=$object->error;
$this->errors=$object->errors;
if (! empty($object->error)) $this->errors[]=$object->error;
$return=-1;
}
else

View File

@ -862,12 +862,6 @@ if ($object->id > 0)
show_contacts($conf, $langs, $db, $object, $_SERVER["PHP_SELF"].'?socid='.$object->id);
}
// Addresses list
if (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) && ! empty($conf->global->MAIN_REPEATADDRESSONEACHTAB))
{
$result=show_addresses($conf, $langs, $db, $object, $_SERVER["PHP_SELF"].'?socid='.$object->id);
}
if (! empty($conf->global->MAIN_REPEATTASKONEACHTAB))
{
print load_fiche_titre($langs->trans("ActionsOnCompany"), '', '');

View File

@ -160,3 +160,5 @@ INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VAL
INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('H', '3600','hour','h', 'time', 1);
INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('D','12960000','day','d', 'time', 1);
-- Default Warehouse id for a user
ALTER TABLE llx_user ADD COLUMN fk_warehouse INTEGER NULL;

View File

@ -35,6 +35,5 @@ create table llx_prelevement_facture_demande
number varchar(255),
cle_rib varchar(5),
ext_payment_id varchar(128),
ext_payment_site varchar(128),
ext_payment_site varchar(128)
)ENGINE=innodb;

View File

@ -99,5 +99,6 @@ create table llx_user
import_key varchar(14), -- import key
default_range integer,
default_c_exp_tax_cat integer
default_c_exp_tax_cat integer,
fk_warehouse integer
)ENGINE=innodb;

View File

@ -4470,6 +4470,7 @@ function migrate_delete_old_files($db, $langs, $conf)
'/societe/class/api_contact.class.php',
'/societe/class/api_thirdparty.class.php',
'/support/online.php',
'/takepos/class/actions_takepos.class.php'
);
foreach ($filetodeletearray as $filetodelete) {

View File

@ -1335,7 +1335,15 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
{
foreach($arrayofcss as $cssfile)
{
print '<!-- Includes CSS added by page -->'."\n".'<link rel="stylesheet" type="text/css" title="default" href="'.dol_buildpath($cssfile, 1);
if (preg_match('/^http/i', $cssfile))
{
$urltofile=$cssfile;
}
else
{
$urltofile=dol_buildpath($cssfile, 1);
}
print '<!-- Includes CSS added by page -->'."\n".'<link rel="stylesheet" type="text/css" title="default" href="'.$urltofile;
// We add params only if page is not static, because some web server setup does not return content type text/css if url has parameters and browser cache is not used.
if (!preg_match('/\.css$/i', $cssfile)) print $themeparam;
print '">'."\n";
@ -2140,6 +2148,7 @@ if (! function_exists("llxFooter"))
?>
<!-- Disabled. This creates a lot of regression. A better solution is to add a protection on submitted page to avoid action to be done twice.
<script type="text/javascript">
//Prevent from multiple form sending
$(function() {
@ -2150,6 +2159,7 @@ if (! function_exists("llxFooter"))
});
});
</script>
-->
<?php
}
}

View File

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<phpdoc>
<title>MyModule</title>
<parser>
<target>build/phpdoc</target>
<encoding>utf8</encoding>
<markers>
<item>TODO</item>
<item>FIXME</item>
</markers>
<extensions>
<extension>php</extension>
<extension>css</extension>
<extension>js</extension>
</extensions>
</parser>
<transformer>
<target>doc/code/phpdoc</target>
</transformer>
<transformations>
<template name="responsive"/>
</transformations>
<files>
<directory>.</directory>
<ignore>build/*</ignore>
<ignore>dev/*</ignore>
<ignore>doc/*</ignore>
<ignore>vendor/*</ignore>
</files>
</phpdoc>

View File

@ -318,8 +318,8 @@ class FormProduct
$measuring_units = array();
require_once DOL_DOCUMENT_ROOT . '/core/class/cmeasuringunits.class.php';
$measuringUnits = new CMeasuringUnits($db);
require_once DOL_DOCUMENT_ROOT . '/core/class/cunits.class.php';
$measuringUnits = new CUnits($db);
$result = $measuringUnits->fetchAll('', '', 0, 0, array(
't.unit_type' => $measuring_style,
't.active' => 1

View File

@ -263,7 +263,7 @@ if ($id > 0 || ! empty($ref))
// Other attributes
$cols = 3;
$parameyers=array('socid'=>$socid);
$parameters=array('socid'=>$socid);
include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
print '</table>';

View File

@ -545,7 +545,7 @@ if ($id > 0 || ! empty($ref))
// Other attributes
$cols = 3;
$parameyers=array('socid'=>$socid);
$parameters=array('socid'=>$socid);
include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
print '</table>';

View File

@ -428,7 +428,7 @@ if ($action == 'charge' && ! empty($conf->stripe->enabled))
'dol_version' => DOL_VERSION,
'dol_entity' => $conf->entity,
'dol_company' => $mysoc->name, // Usefull when using multicompany
'ipaddress'=>(empty($_SERVER['REMOTE_ADDR'])?'':$_SERVER['REMOTE_ADDR'])
'ipaddress'=> getUserRemoteIP()
);
if (! empty($thirdparty_id)) $metadata["dol_thirdparty_id"] = $thirdparty_id;
@ -602,7 +602,7 @@ $charge = \Stripe\Charge::create(array(
$_SESSION["FinalPaymentAmt"] = $amount;
$_SESSION["currencyCodeType"] = $currency;
$_SESSION["paymentType"] = '';
$_SESSION['ipaddress'] = $_SERVER['REMOTE_ADDR']; // Payer ip
$_SESSION['ipaddress'] = getUserRemoteIP(); // Payer ip
$_SESSION['payerID'] = is_object($customer)?$customer->id:'';
$_SESSION['TRANSACTIONID'] = is_object($charge)?$charge->id:'';

View File

@ -107,13 +107,14 @@ class FormResource
$out.= '<select id="'.$htmlname.'" class="flat minwidth200" name="'.$htmlname.'">'."\n";
if ($showempty) $out.= '<option value="-1">&nbsp;</option>'."\n";
$num = count($resourcestat->lines);
$num = 0;
if (is_array($resourcestat->lines)) $num = count($resourcestat->lines);
//var_dump($resourcestat->lines);
$i = 0;
if ($num)
{
while ( $i < $num)
while ($i < $num)
{
$resourceclass=ucfirst($resourcestat->lines[$i]->element);

View File

@ -103,13 +103,14 @@ class Contacts extends DolibarrApi
* @param string $sortorder Sort order
* @param int $limit Limit for list
* @param int $page Page number
* @param string $thirdparty_ids Thirdparty ids to filter contacts of. {@example '1' or '1,2,3'} {@pattern /^[0-9,]*$/i}
* @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')"
* @param string $thirdparty_ids Thirdparty ids to filter contacts of. {@example '1' or '1,2,3'} {@pattern /^[0-9,]*$/i}
* @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')"
* @param int $includecount Count and return also number of elements the contact is used as a link for
* @return array Array of contact objects
*
* @throws RestException
*/
function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids = '', $sqlfilters = '')
function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids = '', $sqlfilters = '', $includecount = 0)
{
global $db, $conf;
@ -182,8 +183,13 @@ class Contacts extends DolibarrApi
$contact_static = new Contact($db);
if ($contact_static->fetch($obj->rowid))
{
if ($includecount)
{
$contact_static->load_ref_elements();
}
$obj_ret[] = $this->_cleanObjectDatas($contact_static);
}
$i++;
}
}

View File

@ -163,12 +163,6 @@ if ($action != 'presend')
{
$result=show_contacts($conf, $langs, $db, $object, $_SERVER["PHP_SELF"].'?socid='.$object->id);
}
// Addresses list
if (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT))
{
$result=show_addresses($conf, $langs, $db, $object, $_SERVER["PHP_SELF"].'?socid='.$object->id);
}
}
// End of page

View File

@ -261,14 +261,14 @@ print '</td></tr>';
print '<tr class="oddeven"><td>';
print $langs->trans("BankAccount").'</td><td>';
print $form->select_comptes($conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS, 'STRIPE_BANK_ACCOUNT_FOR_PAYMENTS', 0, '', 1);
$form->select_comptes($conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS, 'STRIPE_BANK_ACCOUNT_FOR_PAYMENTS', 0, '', 1);
print '</td></tr>';
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // What is this for ?
{
print '<tr class="oddeven"><td>';
print $langs->trans("BankAccountForBankTransfer").'</td><td>';
print $form->select_comptes($conf->global->STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS, 'STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS', 0, '', 1);
$form->select_comptes($conf->global->STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS, 'STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS', 0, '', 1);
print '</td></tr>';
}

View File

@ -185,10 +185,12 @@ class Stripe extends CommonObject
}
elseif ($createifnotlinkedtostripe)
{
$ipaddress = getUserRemoteIP();
$dataforcustomer = array(
"email" => $object->email,
"description" => $object->name,
"metadata" => array('dol_id'=>$object->id, 'dol_version'=>DOL_VERSION, 'dol_entity'=>$conf->entity, 'ipaddress'=>(empty($_SERVER['REMOTE_ADDR'])?'':$_SERVER['REMOTE_ADDR']))
"metadata" => array('dol_id'=>$object->id, 'dol_version'=>DOL_VERSION, 'dol_entity'=>$conf->entity, 'ipaddress'=>$ipaddress)
);
$vatcleaned = $object->tva_intra ? $object->tva_intra : null;
@ -237,7 +239,7 @@ class Stripe extends CommonObject
return $customer;
}
/**
* Get the Stripe payment intent
*
@ -251,7 +253,7 @@ class Stripe extends CommonObject
*/
public function getPaymentIntent($object, $customer, $key = null, $status = 0, $usethirdpartyemailforreceiptemail = 0, $mode = 'automatic')
{
global $conf, $user;
global $conf, $user, $mysoc;
if (empty($object->id))
{
@ -302,34 +304,34 @@ class Stripe extends CommonObject
}
else //if ($createifnotlinkedtostripe)
{
$arrayzerounitcurrency=array('BIF', 'CLP', 'DJF', 'GNF', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'VND', 'VUV', 'XAF', 'XOF', 'XPF');
if (! in_array($object->multicurrency_code, $arrayzerounitcurrency)) $stripeamount=$object->multicurrency_total_ttc * 100;
else $stripeamount = $object->multicurrency_total_ttc;
$arrayzerounitcurrency=array('BIF', 'CLP', 'DJF', 'GNF', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'VND', 'VUV', 'XAF', 'XOF', 'XPF');
if (! in_array($object->multicurrency_code, $arrayzerounitcurrency)) $stripeamount=$object->multicurrency_total_ttc * 100;
else $stripeamount = $object->multicurrency_total_ttc;
$fee = round(($amount * ($conf->global->STRIPE_APPLICATION_FEE_PERCENT / 100) + $conf->global->STRIPE_APPLICATION_FEE) * 100);
if ($fee < ($conf->global->STRIPE_APPLICATION_FEE_MINIMAL * 100)) {
$fee = round($conf->global->STRIPE_APPLICATION_FEE_MINIMAL * 100);
}
$description=$object->element.$object->ref;
$description=$object->element.$object->ref;
$dataforintent = array(
"amount" => $stripeamount,
"currency" => $object->multicurrency_code,
"customer" => $customer,
"allowed_source_types" => ["card"],
"statement_descriptor" => dol_trunc(dol_trunc(dol_string_unaccent($mysoc->name), 8, 'right', 'UTF-8', 1).' '.$description, 22, 'right', 'UTF-8', 1), // 22 chars that appears on bank receipt
"customer" => $customer,
"allowed_source_types" => ["card"],
"statement_descriptor" => dol_trunc(dol_trunc(dol_string_unaccent($mysoc->name), 8, 'right', 'UTF-8', 1).' '.$description, 22, 'right', 'UTF-8', 1), // 22 chars that appears on bank receipt
"metadata" => array('dol_type'=>$object->element, 'dol_id'=>$object->id, 'dol_version'=>DOL_VERSION, 'dol_entity'=>$conf->entity, 'ipaddress'=>(empty($_SERVER['REMOTE_ADDR'])?'':$_SERVER['REMOTE_ADDR']))
);
if ($conf->entity!=$conf->global->STRIPECONNECT_PRINCIPAL && $fee>0)
{
$dataforintent["application_fee"] = $fee;
}
if ($societe->email && $usethirdpartyemailforreceiptemail)
{
$dataforintent["receipt_email"] = $societe->email;
}
if ($conf->entity!=$conf->global->STRIPECONNECT_PRINCIPAL && $fee>0)
{
$dataforintent["application_fee"] = $fee;
}
if ($societe->email && $usethirdpartyemailforreceiptemail)
{
$dataforintent["receipt_email"] = $societe->email;
}
try {
// Force to use the correct API key
@ -341,14 +343,14 @@ class Stripe extends CommonObject
} else {
$paymentintent = \Stripe\PaymentIntent::create($dataforintent, array("idempotency_key" => "$description","stripe_account" => $key));
}
$now=dol_now();
$now=dol_now();
$sql = "INSERT INTO " . MAIN_DB_PREFIX . "prelevement_facture_demande (fk_soc, date_demande, fk_user_demande, ext_payment_id, fk_facture, sourcetype, entity, ext_payment_site)";
$sql .= " VALUES ('".$object->socid."','".$this->db->idate($now)."', '0', '".$this->db->escape($paymentintent->id)."', ".$object->id.", '".$object->element."', " . $conf->entity . ", '" . $service . "')";
$resql = $this->db->query($sql);
if (! $resql)
{
$this->error = $this->db->lasterror();
dol_syslog(get_class($this) . "::PaymentIntent not insert with id=".$paymentintent->id);
dol_syslog(get_class($this) . "::PaymentIntent not insert with id=".$paymentintent->id);
}
}
catch(Exception $e)
@ -364,7 +366,7 @@ class Stripe extends CommonObject
return $paymentintent;
}
/**
* Get the Stripe card of a company payment mode (with option to create it on Stripe if not linked yet)
*
@ -395,7 +397,7 @@ class Stripe extends CommonObject
{
$obj = $this->db->fetch_object($resql);
$cardref = $obj->stripe_card_ref;
dol_syslog("************* cardref=".$cardref);
dol_syslog(get_class($this) . "::cardStripe cardref=".$cardref);
if ($cardref)
{
try {
@ -553,7 +555,7 @@ class Stripe extends CommonObject
{
if (preg_match('/acct_/i', $source))
{
$charge = \Stripe\Charge::create(array(
$charge = \Stripe\Charge::create(array(
"amount" => "$stripeamount",
"currency" => "$currency",
"statement_descriptor" => dol_trunc(dol_trunc(dol_string_unaccent($mysoc->name), 8, 'right', 'UTF-8', 1).' '.$description, 22, 'right', 'UTF-8', 1), // 22 chars that appears on bank receipt
@ -589,25 +591,25 @@ class Stripe extends CommonObject
}
$paymentarray = array(
"amount" => "$stripeamount",
"currency" => "$currency",
"statement_descriptor" => dol_trunc(dol_trunc(dol_string_unaccent($mysoc->name), 8, 'right', 'UTF-8', 1).' '.$description, 22, 'right', 'UTF-8', 1), // 22 chars that appears on bank receipt
"description" => "Stripe payment: ".$description,
"capture" => $capture,
"metadata" => $metadata,
"source" => "$source",
"customer" => "$customer"
);
if ($conf->entity!=$conf->global->STRIPECONNECT_PRINCIPAL && $fee>0)
{
$paymentarray["application_fee"] = $fee;
}
if ($societe->email && $usethirdpartyemailforreceiptemail)
{
$paymentarray["receipt_email"] = $societe->email;
}
"amount" => "$stripeamount",
"currency" => "$currency",
"statement_descriptor" => dol_trunc(dol_trunc(dol_string_unaccent($mysoc->name), 8, 'right', 'UTF-8', 1).' '.$description, 22, 'right', 'UTF-8', 1), // 22 chars that appears on bank receipt
"description" => "Stripe payment: ".$description,
"capture" => $capture,
"metadata" => $metadata,
"source" => "$source",
"customer" => "$customer"
);
if ($conf->entity!=$conf->global->STRIPECONNECT_PRINCIPAL && $fee>0)
{
$paymentarray["application_fee"] = $fee;
}
if ($societe->email && $usethirdpartyemailforreceiptemail)
{
$paymentarray["receipt_email"] = $societe->email;
}
$charge = \Stripe\Charge::create($paymentarray, array("idempotency_key" => "$ref","stripe_account" => "$account"));
$charge = \Stripe\Charge::create($paymentarray, array("idempotency_key" => "$ref","stripe_account" => "$account"));
}
if (isset($charge->id)) {}

View File

@ -1,87 +0,0 @@
<?php
/* Copyright (C) 2018 SuperAdmin
*
* 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
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file takepos/class/actions_takepos.class.php
* \ingroup takepos
* \brief Hooks of takepos module
*/
/**
* Class ActionsTakePos
*/
class ActionsTakePos
{
/**
* @var DoliDB Database handler.
*/
public $db;
/**
* @var string Error
*/
public $error = '';
/**
* @var array Errors
*/
public $errors = array();
/**
* @var array Hook results. Propagated to $hookmanager->resArray for later reuse
*/
public $results = array();
/**
* @var string String displayed by executeHook() immediately after return
*/
public $resprints;
/**
* Constructor
*
* @param DoliDB $db Database handler
*/
public function __construct($db)
{
$this->db = $db;
}
/**
* Overloading the doActions function : replacing the parent's function with the one below
*
* @param array() $parameters Hook metadatas (context, etc...)
* @param CommonObject $object The object to process (an invoice if you are in invoice module, a propale in propale's module, etc...)
* @param string $action Current action (if set). Generally create or edit or null
* @param HookManager $hookmanager Hook manager propagated to allow calling another hook
* @return int < 0 on error, 0 on success, 1 to replace standard code
*/
public function addMoreActionsButtons($parameters, &$object, &$action, $hookmanager)
{
global $conf, $user, $langs;
/* print_r($parameters); print_r($object); echo "action: " . $action; */
if (in_array($parameters['currentcontext'], array('invoicecard'))) // do something only for the context 'somecontext1' or 'somecontext2'
{
$receipt_url=DOL_URL_ROOT."/takepos/receipt.php";
$this->resprints = '<div class="inline-block divButAction"><a target="_blank" class="butAction" href="' . $receipt_url . '?facid=' . $object->id.'">' . $langs->trans('Ticket') .'</a></div>';
}
return 0; // or return 1 to replace standard code
}
}

View File

@ -78,7 +78,7 @@ if ($action == 'valid' && $user->rights->facture->creer)
$payment->datepaye=$now;
$payment->bank_account=$bankaccount;
$payment->amounts[$invoice->id]=$invoice->total_ttc;
if ($pay=="cash") $payment->paiementid=4;
elseif ($pay=="card") $payment->paiementid=6;
elseif ($pay=="cheque") $payment->paiementid=7;
@ -86,7 +86,7 @@ if ($action == 'valid' && $user->rights->facture->creer)
$payment->create($user);
$payment->addPaymentToBank($user, 'payment', '(CustomerInvoicePayment)', $bankaccount, '', '');
$invoice->set_paid($user);
}
@ -321,7 +321,8 @@ if ($placeid > 0) {
foreach($invoice->lines as $line)
{
print '<tr class="drag drop oddeven';
if ($line->special_code == "3") { print ' order';
if ($line->special_code == "3") {
print ' order';
}
print '" id="' . $line->rowid . '">';
print '<td align="left">' . $line->product_label . $line->desc . '</td>';
@ -334,7 +335,7 @@ if ($placeid > 0) {
print '</table>';
print '<p style="font-size:120%;" align="right"><b>'.$langs->trans('TotalTTC');
if($conf->global->TAKEPOS_BAR_RESTAURANT) print " ".$langs->trans('Place')." ".$place;
print ': '.price($invoice->total_ttc, 1, '', 1, - 1, - 1, $conf->currency).'&nbsp;</b></p>';

View File

@ -1,8 +0,0 @@
source 'https://rubygems.org'
gem 'jekyll', '~> 1.0'
gem 'safe_yaml', '~> 1.0.4'
gem 'sass', '~> 3.0'
gem 'less', '~> 2.5.0'
gem 'libv8', '~> 3.16.14.0'
gem 'therubyracer'

View File

@ -1,68 +0,0 @@
GEM
remote: https://rubygems.org/
specs:
blankslate (2.1.2.4)
classifier (1.3.4)
fast-stemmer (>= 1.0.0)
colorator (0.1)
commander (4.1.6)
highline (~> 1.6.11)
commonjs (0.2.7)
fast-stemmer (1.0.2)
ffi (1.9.10)
highline (1.6.21)
jekyll (1.5.1)
classifier (~> 1.3)
colorator (~> 0.1)
commander (~> 4.1.3)
liquid (~> 2.5.5)
listen (~> 1.3)
maruku (= 0.7.0)
pygments.rb (~> 0.5.0)
redcarpet (~> 2.3.0)
safe_yaml (~> 1.0)
toml (~> 0.1.0)
less (2.5.1)
commonjs (~> 0.2.7)
libv8 (3.16.14.15)
liquid (2.5.5)
listen (1.3.1)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
rb-kqueue (>= 0.2)
maruku (0.7.0)
parslet (1.5.0)
blankslate (~> 2.0)
posix-spawn (0.3.11)
pygments.rb (0.5.4)
posix-spawn (~> 0.3.6)
yajl-ruby (~> 1.1.0)
rb-fsevent (0.9.6)
rb-inotify (0.9.5)
ffi (>= 0.5.0)
rb-kqueue (0.2.4)
ffi (>= 0.5.0)
redcarpet (2.3.0)
ref (2.0.0)
safe_yaml (1.0.4)
sass (3.4.19)
therubyracer (0.12.2)
libv8 (~> 3.16.14.0)
ref
toml (0.1.2)
parslet (~> 1.5.0)
yajl-ruby (1.1.0)
PLATFORMS
ruby
DEPENDENCIES
jekyll (~> 1.0)
less (~> 2.5.0)
libv8 (~> 3.16.14.0)
safe_yaml (~> 1.0.4)
sass (~> 3.0)
therubyracer
BUNDLED WITH
1.13.2

View File

@ -146,6 +146,7 @@ llxHeader('', $langs->trans("UserSetup"), '', '', 0, 0, $arrayofjs, $arrayofcss)
print '<form name="extsitesconfig" action="'.$_SERVER["PHP_SELF"].'" method="post">';
print '<input type="hidden" name="id" value="'.$id.'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
$head=user_prepare_head($object);
@ -171,14 +172,14 @@ if ($selectedvalue==1) $selectedvalue=0; else $selectedvalue=1;
print '<div class="div-table-responsive">';
print "<table class=\"noborder\" width=\"100%\">";
print '<table class="noborder centpercent">';
print "<tr class=\"liste_titre\">";
print "<td>".$langs->trans("Parameter")."</td>";
print "<td>".$langs->trans("Name")."</td>";
print "<td>".$langs->trans("ExtSiteUrlAgenda").'<div class="hideonsmartphone">'." (".$langs->trans("Example").': http://yoursite/agenda/agenda.ics)</div></td>';
print "<td>".$form->textwithpicto($langs->trans("FixTZ"), $langs->trans("FillFixTZOnlyIfRequired"), 1).'</td>';
print '<td align="right">'.$langs->trans("Color").'</td>';
print '<td class="right">'.$langs->trans("Color").'</td>';
print "</tr>";
$i=1;

View File

@ -78,19 +78,18 @@ if ($action == 'add' && ! $cancel)
$account->userid = $object->id;
$account->bank = $_POST["bank"];
$account->label = $_POST["label"];
$account->courant = $_POST["courant"];
$account->clos = $_POST["clos"];
$account->code_banque = $_POST["code_banque"];
$account->code_guichet = $_POST["code_guichet"];
$account->number = $_POST["number"];
$account->cle_rib = $_POST["cle_rib"];
$account->bic = $_POST["bic"];
$account->iban = $_POST["iban"];
$account->domiciliation = $_POST["domiciliation"];
$account->proprio = $_POST["proprio"];
$account->owner_address = $_POST["owner_address"];
$account->bank = GETPOST('bank', 'alpha');
$account->label = GETPOST('label', 'alpha');
$account->courant = GETPOST('courant', 'alpha');
$account->code_banque = GETPOST('code_banque', 'alpha');
$account->code_guichet = GETPOST('code_guichet', 'alpha');
$account->number = GETPOST('number', 'alpha');
$account->cle_rib = GETPOST('cle_rib', 'alpha');
$account->bic = GETPOST('bic', 'alpha');
$account->iban = GETPOST('iban', 'alpha');
$account->domiciliation = GETPOST('domiciliation', 'alpha');
$account->proprio = GETPOST('proprio', 'alpha');
$account->owner_address = GETPOST('owner_address', 'alpha');
$result = $account->create($user);
@ -101,9 +100,8 @@ if ($action == 'add' && ! $cancel)
}
else
{
$url=DOL_URL_ROOT.'/user/bank.php?id='.$object->id.'&bankid='.$bankid;
header('Location: '.$url);
exit;
setEventMessages($langs->trans('RecordSaved'), null, 'mesgs');
$action = '';
}
}
@ -116,19 +114,18 @@ if ($action == 'update' && ! $cancel)
$account->userid = $object->id;
$account->bank = $_POST["bank"];
$account->label = $_POST["label"];
$account->courant = $_POST["courant"];
$account->clos = $_POST["clos"];
$account->code_banque = $_POST["code_banque"];
$account->code_guichet = $_POST["code_guichet"];
$account->number = $_POST["number"];
$account->cle_rib = $_POST["cle_rib"];
$account->bic = $_POST["bic"];
$account->iban = $_POST["iban"];
$account->domiciliation = $_POST["domiciliation"];
$account->proprio = $_POST["proprio"];
$account->owner_address = $_POST["owner_address"];
$account->bank = GETPOST('bank', 'alpha');
$account->label = GETPOST('label', 'alpha');
$account->courant = GETPOST('courant', 'alpha');
$account->code_banque = GETPOST('code_banque', 'alpha');
$account->code_guichet = GETPOST('code_guichet', 'alpha');
$account->number = GETPOST('number', 'alpha');
$account->cle_rib = GETPOST('cle_rib', 'alpha');
$account->bic = GETPOST('bic', 'alpha');
$account->iban = GETPOST('iban', 'alpha');
$account->domiciliation = GETPOST('domiciliation', 'alpha');
$account->proprio = GETPOST('proprio', 'alpha');
$account->owner_address = GETPOST('owner_address', 'alpha');
$result = $account->update($user);
@ -139,10 +136,9 @@ if ($action == 'update' && ! $cancel)
}
else
{
$url=DOL_URL_ROOT.'/user/bank.php?id='.$object->id.'&bankid='.$bankid;
header('Location: '.$url);
exit;
}
setEventMessages($langs->trans('RecordSaved'), null, 'mesgs');
$action = '';
}
}
@ -362,10 +358,10 @@ if ($action != 'edit' && $action != 'create') // If not bank account yet, $acco
{
$num = $db->num_rows($resql);
print '<table class="noborder" width="100%">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastHolidays", ($num<=$MAXLIST?"":$MAXLIST)).'</td><td align="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/holiday/list.php?id='.$object->id.'">'.$langs->trans("AllHolidays").' <span class="badge">'.$num.'</span></a></td>';
print '<td colspan="4"><table class="nobordernopadding centpercent"><tr><td>'.$langs->trans("LastHolidays", ($num<=$MAXLIST?"":$MAXLIST)).'</td><td align="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/holiday/list.php?id='.$object->id.'">'.$langs->trans("AllHolidays").' <span class="badge">'.$num.'</span></a></td>';
print '</tr></table></td>';
print '</tr>';
@ -382,9 +378,9 @@ if ($action != 'edit' && $action != 'create') // If not bank account yet, $acco
$nbopenedday=num_open_day($db->jdate($objp->date_debut), $db->jdate($objp->date_fin), 0, 1, $objp->halfday);
print $holiday->getNomUrl(1);
print '</td><td align="right" width="80px">'.dol_print_date($db->jdate($objp->date_debut), 'day')."</td>\n";
print '<td align="right" style="min-width: 60px">'.$nbopenedday.' '.$langs->trans('DurationDays').'</td>';
print '<td align="right" style="min-width: 60px" class="nowrap">'.$holiday->LibStatut($objp->statut, 5).'</td></tr>';
print '</td><td class="right" width="80px">'.dol_print_date($db->jdate($objp->date_debut), 'day')."</td>\n";
print '<td class="right" style="min-width: 60px">'.$nbopenedday.' '.$langs->trans('DurationDays').'</td>';
print '<td class="right" style="min-width: 60px" class="nowrap">'.$holiday->LibStatut($objp->statut, 5).'</td></tr>';
$i++;
}
$db->free($resql);
@ -418,10 +414,10 @@ if ($action != 'edit' && $action != 'create') // If not bank account yet, $acco
{
$num = $db->num_rows($resql);
print '<table class="noborder" width="100%">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastExpenseReports", ($num<=$MAXLIST?"":$MAXLIST)).'</td><td align="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/expensereport/list.php?id='.$object->id.'">'.$langs->trans("AllExpenseReports").' <span class="badge">'.$num.'</span></a></td>';
print '<td colspan="4"><table class="nobordernopadding centpercent"><tr><td>'.$langs->trans("LastExpenseReports", ($num<=$MAXLIST?"":$MAXLIST)).'</td><td align="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/expensereport/list.php?id='.$object->id.'">'.$langs->trans("AllExpenseReports").' <span class="badge">'.$num.'</span></a></td>';
print '</tr></table></td>';
print '</tr>';
@ -437,9 +433,9 @@ if ($action != 'edit' && $action != 'create') // If not bank account yet, $acco
$exp->fk_type = $objp->fk_type;
print $exp->getNomUrl(1);
print '</td><td align="right" width="80px">'.dol_print_date($db->jdate($objp->date_debut), 'day')."</td>\n";
print '<td align="right" style="min-width: 60px">'.price($objp->total_ttc).'</td>';
print '<td align="right" style="min-width: 60px" class="nowrap">'.$exp->LibStatut($objp->fk_statut, 5).'</td></tr>';
print '</td><td class="right" width="80px">'.dol_print_date($db->jdate($objp->date_debut), 'day')."</td>\n";
print '<td class="right" style="min-width: 60px">'.price($objp->total_ttc).'</td>';
print '<td class="right nowrap" style="min-width: 60px">'.$exp->LibStatut($objp->fk_statut, 5).'</td></tr>';
$i++;
}
$db->free($resql);
@ -466,9 +462,9 @@ if ($action != 'edit' && $action != 'create') // If not bank account yet, $acco
if ($user->rights->user->user->creer)
{
if ($account->id > 0)
print '<a class="butAction" href="bank.php?id='.$object->id.'&bankid='.$account->id.'&action=edit">'.$langs->trans("Edit").'</a>';
print '<a class="butAction" href="bank.php?id='.$object->id.'&bankid='.$account->id.'&action=edit">'.$langs->trans("Edit").'</a>';
else
print '<a class="butAction" href="bank.php?id='.$object->id.'&bankid='.$account->id.'&action=create">'.$langs->trans("Create").'</a>';
print '<a class="butAction" href="bank.php?id='.$object->id.'&bankid='.$account->id.'&action=create">'.$langs->trans("Create").'</a>';
}
print '</div>';
@ -547,7 +543,7 @@ if ($id && ($action == 'edit' || $action == 'create' ) && $user->rights->user->u
dol_fiche_end();
print '<div align="center">';
print '<div class="center">';
print '<input class="button" value="'.$langs->trans("Modify").'" type="submit">';
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
print '<input class="button" name="cancel" value="'.$langs->trans("Cancel").'" type="submit">';

View File

@ -13,8 +13,8 @@
* Copyright (C) 2015 Ari Elbaz (elarifr) <github@accedinfo.com>
* Copyright (C) 2015-2018 Charlene Benke <charlie@patas-monkey.com>
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018 David Beniamine <David.Beniamine@Tetras-Libre.fr>
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018 David Beniamine <David.Beniamine@Tetras-Libre.fr>
*
* 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
@ -724,7 +724,7 @@ if ($action == 'create' || $action == 'adduserldap')
print '<form name="add_user_ldap" action="'.$_SERVER["PHP_SELF"].'" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table width="100%" class="border"><tr>';
print '<table class="border centpercent"><tr>';
print '<td width="160">';
print $langs->trans("LDAPUsers");
print '</td>';
@ -735,7 +735,7 @@ if ($action == 'create' || $action == 'adduserldap')
print $form->selectarray('users', $liste, '', 1);
print ajax_combobox('users');
}
print '</td><td align="center">';
print '</td><td class="center">';
print '<input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans('Get')).'"'.(count($liste)?'':' disabled').'>';
print '</td></tr></table>';
print '</form>';
@ -1231,7 +1231,7 @@ if ($action == 'create' || $action == 'adduserldap')
dol_fiche_end();
print '<div align="center">';
print '<div class="center">';
print '<input class="button" value="'.$langs->trans("CreateUser").'" name="create" type="submit">';
//print '&nbsp; &nbsp; &nbsp;';
//print '<input value="'.$langs->trans("Cancel").'" class="button" type="submit" name="cancel">';
@ -1596,7 +1596,7 @@ else
print '<div class="fichehalfright"><div class="ficheaddleft">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border tableforfield" width="100%">';
print '<table class="border tableforfield centpercent">';
// Color user
if (! empty($conf->agenda->enabled))
@ -1864,7 +1864,7 @@ else
if (empty($reshook))
{
print '<tr class="liste_titre"><th class="liste_titre">'.$langs->trans("Groups").'</th>'."\n";
print '<th class="liste_titre" align="right">';
print '<th class="liste_titre right">';
if ($caneditgroup)
{
print $form->select_dolgroups('', 'group', 1, $exclude, 0, '', '', $object->entity);
@ -1892,7 +1892,7 @@ else
print img_object($langs->trans("ShowGroup"), "group").' '.$group->name;
}
print '</td>';
print '<td align="right">';
print '<td class="right">';
if ($caneditgroup)
{
print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=removegroup&amp;group='.$group->id.'">';
@ -1935,7 +1935,7 @@ else
dol_fiche_head($head, 'user', $title, 0, 'user');
print '<table width="100%" class="border">';
print '<table class="border centpercent">';
// Ref/ID
if (! empty($conf->global->MAIN_SHOW_TECHNICAL_ID))
@ -2485,7 +2485,7 @@ else
}
// Signature
print "<tr>".'<td class="tdtop">'.$langs->trans("Signature").'</td>';
print '<tr><td class="tdtop">'.$langs->trans("Signature").'</td>';
print '<td>';
if ($caneditfield)
{
@ -2614,7 +2614,7 @@ else
dol_fiche_end();
print '<div align="center">';
print '<div class="center">';
print '<input value="'.$langs->trans("Save").'" class="button" type="submit" name="save">';
print '&nbsp; &nbsp; &nbsp;';
print '<input value="'.$langs->trans("Cancel").'" class="button" type="submit" name="cancel">';

View File

@ -110,7 +110,7 @@ if ($id > 0)
// Edit mode
if ($action == 'edit')
{
print '<table class="border" width="100%">';
print '<table class="border centpercent">';
if ($user->admin)
{
@ -150,7 +150,7 @@ if ($id > 0)
else // View mode
{
print '<table class="border" width="100%">';
print '<table class="border centpercent">';
if (! empty($user->admin))
{
@ -190,7 +190,7 @@ if ($id > 0)
if ($action == 'edit')
{
print '<div align="center"><input class="button" type="submit" value="'.$langs->trans("Save").'">';
print '<div class="center"><input class="button" type="submit" value="'.$langs->trans("Save").'">';
print '&nbsp;&nbsp;&nbsp;&nbsp&nbsp;';
print '<input class="button" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">';
print '</div>';

View File

@ -149,7 +149,7 @@ if ($object->id)
}
print '<table class="border" width="100%">';
print '<table class="border centpercent">';
// Login
print '<tr><td class="titlefield">'.$langs->trans("Login").'</td><td class="valeur">'.$object->login.'&nbsp;</td></tr>';

View File

@ -46,13 +46,13 @@ if (! empty($conf->global->MAIN_USE_ADVANCED_PERMS))
// Load translation files required by page
$langs->loadLangs(array('users', 'other'));
$id = GETPOST('id', 'int');
$action = GETPOST('action', 'alpha');
$cancel = GETPOST('cancel', 'aZ09');
$confirm = GETPOST('confirm', 'alpha');
$contextpage=GETPOST('contextpage', 'aZ')?GETPOST('contextpage', 'aZ'):'groupcard'; // To manage different context of search
$id = GETPOST('id', 'int');
$action = GETPOST('action', 'alpha');
$cancel = GETPOST('cancel', 'aZ09');
$confirm = GETPOST('confirm', 'alpha');
$contextpage = GETPOST('contextpage', 'aZ')?GETPOST('contextpage', 'aZ'):'groupcard'; // To manage different context of search
$userid = GETPOST('user', 'int');
$userid = GETPOST('user', 'int');
// Security check
$result = restrictedArea($user, 'user', $id, 'usergroup&usergroup', 'user');
@ -274,7 +274,7 @@ if ($action == 'create')
dol_fiche_head('', '', '', 0, '');
print '<table class="border" width="100%">';
print '<table class="border centpercent">';
print "<tr>";
print '<td class="fieldrequired titlefield">'.$langs->trans("Name").'</td>';
@ -359,7 +359,7 @@ else
print '<div class="fichecenter">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border" width="100%">';
print '<table class="border centpercent">';
// Name (already in dol_banner, we keep it to have the GlobalGroup picto, but we should move it in dol_banner)
if (! empty($conf->mutlicompany->enabled))
@ -456,13 +456,13 @@ else
/*
* Group members
*/
print '<table class="noborder" width="100%">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td class="liste_titre">'.$langs->trans("Login").'</td>';
print '<td class="liste_titre">'.$langs->trans("Lastname").'</td>';
print '<td class="liste_titre">'.$langs->trans("Firstname").'</td>';
print '<td class="liste_titre" width="5" align="center">'.$langs->trans("Status").'</td>';
print '<td class="liste_titre" width="5" align="right">&nbsp;</td>';
print '<td class="liste_titre center" width="5">'.$langs->trans("Status").'</td>';
print '<td class="liste_titre right" width="5">&nbsp;</td>';
print "</tr>\n";
if (! empty($object->members))
@ -480,8 +480,8 @@ else
print '</td>';
print '<td>'.$useringroup->lastname.'</td>';
print '<td>'.$useringroup->firstname.'</td>';
print '<td align="center">'.$useringroup->getLibStatut(3).'</td>';
print '<td align="right">';
print '<td class="center">'.$useringroup->getLibStatut(3).'</td>';
print '<td class="right">';
if (! empty($user->admin)) {
print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=removeuser&amp;user='.$useringroup->id.'">';
print img_picto($langs->trans("RemoveFromGroup"), 'unlink');
@ -542,7 +542,7 @@ else
dol_fiche_head($head, 'group', $title, 0, 'group');
print '<table class="border" width="100%">';
print '<table class="border centpercent">';
print '<tr><td class="titlefield fieldrequired">'.$langs->trans("Name").'</td>';
print '<td class="valeur"><input class="minwidth300" type="text" name="group" value="'.dol_escape_htmltag($object->name).'">';
print "</td></tr>\n";

View File

@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006-2017 Regis Houssin <regis.houssin@inodbox.com>
/* Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006-2017 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
*
* 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
@ -110,7 +111,7 @@ dol_banner_tab($object, 'id', $linback, $user->rights->user->user->lire || $user
print '<div class="fichecenter">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border" width="100%">';
print '<table class="border centpercent">';
// Name (already in dol_banner, we keep it to have the GlobalGroup picto, but we should move it in dol_banner)
if (! empty($conf->mutlicompany->enabled))
@ -167,7 +168,7 @@ if ($conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap') print "<br>\n";
// Affichage attributs LDAP
print load_fiche_titre($langs->trans("LDAPInformationsForThisGroup"));
print '<table width="100%" class="noborder">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("LDAPAttributes").'</td>';

View File

@ -1,8 +1,9 @@
<?php
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2018 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2011 Herve Prot <herve.prot@symeos.com>
* Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2018 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2011 Herve Prot <herve.prot@symeos.com>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
*
* 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
@ -134,7 +135,7 @@ if ($resql)
$i = 0;
$param="&search_group=".urlencode($search_group)."&amp;sall=".urlencode($sall);
$param="&amp;search_group=".urlencode($search_group)."&amp;sall=".urlencode($sall);
if ($optioncss != '') $param.='&amp;optioncss='.$optioncss;
$text = $langs->trans("ListOfGroups");
@ -178,11 +179,11 @@ if ($resql)
//multicompany
if(! empty($conf->multicompany->enabled) && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1)
{
print_liste_field_titre("Entity", $_SERVER["PHP_SELF"], "g.entity", $param, "", 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("Entity", $_SERVER["PHP_SELF"], "g.entity", $param, "", '', $sortfield, $sortorder, 'center ');
}
print_liste_field_titre("NbOfUsers", $_SERVER["PHP_SELF"], "nb", $param, "", 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("NbOfPermissions", $_SERVER["PHP_SELF"], "nbpermissions", $param, "", 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("DateCreationShort", $_SERVER["PHP_SELF"], "g.datec", $param, "", 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("NbOfUsers", $_SERVER["PHP_SELF"], "nb", $param, "", '', $sortfield, $sortorder, 'center ');
print_liste_field_titre("NbOfPermissions", $_SERVER["PHP_SELF"], "nbpermissions", $param, "", '', $sortfield, $sortorder, 'center ');
print_liste_field_titre("DateCreationShort", $_SERVER["PHP_SELF"], "g.datec", $param, "", '', $sortfield, $sortorder, 'center ');
print "</tr>\n";
$grouptemp = new UserGroup($db);
@ -207,11 +208,11 @@ if ($resql)
if (! empty($conf->multicompany->enabled) && is_object($mc) && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1)
{
$mc->getInfo($obj->entity);
print '<td align="center">'.$mc->label.'</td>';
print '<td class="center">'.$mc->label.'</td>';
}
print '<td align="center">'.$obj->nb.'</td>';
print '<td align="center">'.$obj->nbpermissions.'</td>';
print '<td align="right" class="nowrap">'.dol_print_date($db->jdate($obj->datec), "dayhour").'</td>';
print '<td class="center">'.$obj->nb.'</td>';
print '<td class="center">'.$obj->nbpermissions.'</td>';
print '<td class="right nowrap">'.dol_print_date($db->jdate($obj->datec), "dayhour").'</td>';
print "</tr>\n";
$i++;
}

View File

@ -201,7 +201,7 @@ if ($object->id > 0)
* Ecran ajout/suppression permission
*/
print '<table class="border" width="100%">';
print '<table class="border centpercent">';
// Name (already in dol_banner, we keep it to have the GlobalGroup picto, but we should move it in dol_banner)
if (! empty($conf->mutlicompany->enabled))
@ -228,18 +228,18 @@ if ($object->id > 0)
$reshook=$hookmanager->executeHooks('insertExtraHeader', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
print '<table width="100%" class="noborder">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Module").'</td>';
if ($caneditperms)
{
print '<td align="center" class="nowrap">';
print '<td class="center nowrap">';
print '<a class="reposition" title="'.dol_escape_htmltag($langs->trans("All")).'" alt="'.dol_escape_htmltag($langs->trans("All")).'" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=addrights&amp;entity='.$entity.'&amp;module=allmodules">'.$langs->trans("All")."</a>";
print '/';
print '<a class="reposition" title="'.dol_escape_htmltag($langs->trans("None")).'" alt="'.dol_escape_htmltag($langs->trans("None")).'" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delrights&amp;entity='.$entity.'&amp;module=allmodules">'.$langs->trans("None")."</a>";
print '</td>';
}
print '<td align="center" width="24">&nbsp;</td>';
print '<td class="center" width="24">&nbsp;</td>';
print '<td>'.$langs->trans("Permissions").'</td>';
print '</tr>';
@ -280,7 +280,7 @@ if ($object->id > 0)
print '<tr class="oddeven trforbreak">';
print '<td class="nowrap">'.img_object('', $picto, 'class="inline-block pictoobjectwidth"').' '.$objMod->getName();
print '<a name="'.$objMod->getName().'">&nbsp;</a></td>';
print '<td align="center" class="nowrap">';
print '<td class="center nowrap">';
if ($caneditperms)
{
print '<a title='.$langs->trans("All").' alt='.$langs->trans("All").' href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=addrights&amp;entity='.$entity.'&amp;module='.$obj->module.'#'.$objMod->getName().'">'.$langs->trans("All")."</a>";
@ -304,9 +304,9 @@ if ($object->id > 0)
// Own permission by group
if ($caneditperms)
{
print '<td align="center"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delrights&amp;entity='.$entity.'&amp;rights='.$obj->id.'">'.img_edit_remove($langs->trans("Remove")).'</a></td>';
print '<td class="center"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delrights&amp;entity='.$entity.'&amp;rights='.$obj->id.'">'.img_edit_remove($langs->trans("Remove")).'</a></td>';
}
print '<td align="center">';
print '<td class="center">';
print img_picto($langs->trans("Active"), 'tick');
print '</td>';
}
@ -315,7 +315,7 @@ if ($object->id > 0)
// Do not own permission
if ($caneditperms)
{
print '<td align="center"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=addrights&amp;entity='.$entity.'&amp;rights='.$obj->id.'">'.img_edit_add($langs->trans("Add")).'</a></td>';
print '<td class="center"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=addrights&amp;entity='.$entity.'&amp;rights='.$obj->id.'">'.img_edit_add($langs->trans("Add")).'</a></td>';
}
print '<td>&nbsp</td>';
}
@ -325,7 +325,7 @@ if ($object->id > 0)
// Do not own permission
if ($caneditperms)
{
print '<td align="center"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=addrights&amp;entity='.$entity.'&amp;rights='.$obj->id.'">'.img_edit_add($langs->trans("Add")).'</a></td>';
print '<td class="center"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=addrights&amp;entity='.$entity.'&amp;rights='.$obj->id.'">'.img_edit_add($langs->trans("Add")).'</a></td>';
}
print '<td>&nbsp</td>';
}

View File

@ -63,7 +63,10 @@ $canadduser=(! empty($user->admin) || $user->rights->user->user->creer);
$form = new Form($db);
$arrayofjs=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.js', '/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js');
$arrayofjs = array(
'/includes/jquery/plugins/jquerytreeview/jquery.treeview.js',
'/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js',
);
$arrayofcss=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css');
llxHeader('', $langs->trans("ListOfUsers"). ' - '.$langs->trans("HierarchicView"), '', '', 0, 0, $arrayofjs, $arrayofcss);
@ -162,16 +165,16 @@ print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="mode" value="'.$mode.'">';
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
print '<table class="liste nohover" width="100%">';
print '<table class="liste nohover centpercent">';
print '<tr class="liste_titre_filter">';
print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre">&nbsp;</td>';
// Status
print '<td class="liste_titre" align="right">';
print '<td class="liste_titre right">';
print $form->selectarray('search_statut', array('-1'=>'','1'=>$langs->trans('Enabled')), $search_statut);
print '</td>';
print '<td class="liste_titre" align="right">';
print '<td class="liste_titre right">';
$searchpicto=$form->showFilterAndCheckAddButtons(0);
print $searchpicto;
print '</td>';

View File

@ -63,7 +63,7 @@ llxHeader();
print load_fiche_titre($langs->trans("MenuUsersAndGroups"));
//print '<table border="0" width="100%" class="notopnoleftnoright">';
//print '<table class="noborder centpercent notopnoleftnoright">';
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
print '<div class="fichecenter"><div class="fichethirdleft">';
@ -71,7 +71,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
// Search User
print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table class="noborder nohover" width="100%">';
print '<table class="noborder nohover centpercent">';
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Search").'</td></tr>';
print '<tr><td>';
print $langs->trans("User").':</td><td><input class="flat inputsearch" type="text" name="search_user" size="18"></td></tr>';
@ -123,7 +123,7 @@ $resql=$db->query($sql);
if ($resql)
{
$num = $db->num_rows($resql);
print '<table class="noborder" width="100%">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre"><td colspan="4">'.$langs->trans("LastUsersCreated", min($num, $max)).'</td>';
print '<td class="right"><a class="commonlink" href="'.DOL_URL_ROOT.'/user/list.php?sortfield=u.datec&sortorder=DESC">'.$langs->trans("FullList").'</td>';
print '</tr>';
@ -194,8 +194,8 @@ if ($resql)
print ($entitystring?' ('.$entitystring.')':'');
print '</td>';
print '<td align="right">'.dol_print_date($db->jdate($obj->datec), 'dayhour').'</td>';
print '<td align="right">';
print '<td class="right">'.dol_print_date($db->jdate($obj->datec), 'dayhour').'</td>';
print '<td class="right">';
print $fuserstatic->getLibStatut(3);
print '</td>';
@ -238,7 +238,7 @@ if ($canreadperms)
$colspan=1;
if (! empty($conf->multicompany->enabled)) $colspan++;
$num = $db->num_rows($resql);
print '<table class="noborder" width="100%">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre"><td colspan="'.$colspan.'">'.$langs->trans("LastGroupsCreated", ($num ? $num : $max)).'</td>';
print '<td class="right"><a class="commonlink" href="'.DOL_URL_ROOT.'/user/group/list.php?sortfield=g.datec&sortorder=DESC">'.$langs->trans("FullList").'</td>';
print '</tr>';
@ -269,7 +269,7 @@ if ($canreadperms)
print $mc->label;
print '</td>';
}
print '<td class="nowrap" align="right">'.dol_print_date($db->jdate($obj->datec), 'dayhour').'</td>';
print '<td class="nowrap right">'.dol_print_date($db->jdate($obj->datec), 'dayhour').'</td>';
print "</tr>";
$i++;
}

View File

@ -106,7 +106,7 @@ dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $use
print '<div class="fichecenter">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border" width="100%">';
print '<table class="border centpercent">';
// Login
print '<tr><td class="titlefield">'.$langs->trans("Login").'</td>';
@ -172,7 +172,7 @@ if ($conf->global->LDAP_SYNCHRO_ACTIVE == 'dolibarr2ldap') print "<br>\n";
// Affichage attributs LDAP
print load_fiche_titre($langs->trans("LDAPInformationsForThisUser"));
print '<table width="100%" class="noborder">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("LDAPAttributes").'</td>';

View File

@ -266,22 +266,22 @@ if ($num == 1 && ! empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) &&
llxHeader('', $langs->trans("ListOfUsers"));
$param='';
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
if ($sall != '') $param.='&sall='.urlencode($sall);
if ($search_user != '') $param.="&search_user=".urlencode($search_user);
if ($search_login != '') $param.="&search_login=".urlencode($search_login);
if ($search_lastname != '') $param.="&search_lastname=".urlencode($search_lastname);
if ($search_firstname != '') $param.="&search_firstname=".urlencode($search_firstname);
if ($search_gender != '') $param.="&search_gender=".urlencode($search_gender);
if ($search_employee != '') $param.="&search_employee=".urlencode($search_employee);
if ($search_accountancy_code != '') $param.="&search_accountancy_code=".urlencode($search_accountancy_code);
if ($search_email != '') $param.="&search_email=".urlencode($search_email);
if ($search_supervisor > 0) $param.="&search_supervisor=".urlencode($search_supervisor);
if ($search_statut != '') $param.="&search_statut=".urlencode($search_statut);
if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss);
if ($mode != '') $param.='&mode='.urlencode($mode);
if ($search_categ > 0) $param.="&search_categ=".urlencode($search_categ);
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&amp;contextpage='.urlencode($contextpage);
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&amp;limit='.urlencode($limit);
if ($sall != '') $param.='&amp;sall='.urlencode($sall);
if ($search_user != '') $param.="&amp;search_user=".urlencode($search_user);
if ($search_login != '') $param.="&amp;search_login=".urlencode($search_login);
if ($search_lastname != '') $param.="&amp;search_lastname=".urlencode($search_lastname);
if ($search_firstname != '') $param.="&amp;search_firstname=".urlencode($search_firstname);
if ($search_gender != '') $param.="&amp;search_gender=".urlencode($search_gender);
if ($search_employee != '') $param.="&amp;search_employee=".urlencode($search_employee);
if ($search_accountancy_code != '') $param.="&amp;search_accountancy_code=".urlencode($search_accountancy_code);
if ($search_email != '') $param.="&amp;search_email=".urlencode($search_email);
if ($search_supervisor > 0) $param.="&amp;search_supervisor=".urlencode($search_supervisor);
if ($search_statut != '') $param.="&amp;search_statut=".urlencode($search_statut);
if ($optioncss != '') $param.='&amp;optioncss='.urlencode($optioncss);
if ($mode != '') $param.='&amp;mode='.urlencode($mode);
if ($search_categ > 0) $param.="&amp;search_categ=".urlencode($search_categ);
// Add $param from extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
@ -435,12 +435,12 @@ if (! empty($arrayfields['u.tms']['checked']))
if (! empty($arrayfields['u.statut']['checked']))
{
// Status
print '<td class="liste_titre" align="center">';
print '<td class="liste_titre center">';
print $form->selectarray('search_statut', array('-1'=>'','0'=>$langs->trans('Disabled'),'1'=>$langs->trans('Enabled')), $search_statut);
print '</td>';
}
// Action column
print '<td class="liste_titre" align="right">';
print '<td class="liste_titre right">';
$searchpicto=$form->showFilterAndCheckAddButtons(0);
print $searchpicto;
print '</td>';
@ -459,18 +459,18 @@ if (! empty($arrayfields['u.email']['checked'])) print_liste_field_titr
if (! empty($arrayfields['u.fk_soc']['checked'])) print_liste_field_titre("Company", $_SERVER['PHP_SELF'], "u.fk_soc", $param, "", "", $sortfield, $sortorder);
if (! empty($arrayfields['u.entity']['checked'])) print_liste_field_titre("Entity", $_SERVER['PHP_SELF'], "u.entity", $param, "", "", $sortfield, $sortorder);
if (! empty($arrayfields['u.fk_user']['checked'])) print_liste_field_titre("HierarchicalResponsible", $_SERVER['PHP_SELF'], "u.fk_user", $param, "", "", $sortfield, $sortorder);
if (! empty($arrayfields['u.datelastlogin']['checked'])) print_liste_field_titre("LastConnexion", $_SERVER['PHP_SELF'], "u.datelastlogin", $param, "", 'align="center"', $sortfield, $sortorder);
if (! empty($arrayfields['u.datepreviouslogin']['checked'])) print_liste_field_titre("PreviousConnexion", $_SERVER['PHP_SELF'], "u.datepreviouslogin", $param, "", 'align="center"', $sortfield, $sortorder);
if (! empty($arrayfields['u.datelastlogin']['checked'])) print_liste_field_titre("LastConnexion", $_SERVER['PHP_SELF'], "u.datelastlogin", $param, "", '', $sortfield, $sortorder, 'center ');
if (! empty($arrayfields['u.datepreviouslogin']['checked'])) print_liste_field_titre("PreviousConnexion", $_SERVER['PHP_SELF'], "u.datepreviouslogin", $param, "", '', $sortfield, $sortorder, 'center ');
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
// Hook fields
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (! empty($arrayfields['u.datec']['checked'])) print_liste_field_titre("DateCreationShort", $_SERVER["PHP_SELF"], "u.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
if (! empty($arrayfields['u.tms']['checked'])) print_liste_field_titre("DateModificationShort", $_SERVER["PHP_SELF"], "u.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
if (! empty($arrayfields['u.statut']['checked'])) print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "u.statut", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
if (! empty($arrayfields['u.datec']['checked'])) print_liste_field_titre("DateCreationShort", $_SERVER["PHP_SELF"], "u.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
if (! empty($arrayfields['u.tms']['checked'])) print_liste_field_titre("DateModificationShort", $_SERVER["PHP_SELF"], "u.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
if (! empty($arrayfields['u.statut']['checked'])) print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "u.statut", "", $param, '', $sortfield, $sortorder, 'center ');
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
print "</tr>\n";
@ -616,13 +616,13 @@ while ($i < min($num, $limit))
// Date last login
if (! empty($arrayfields['u.datelastlogin']['checked']))
{
print '<td class="nowrap" align="center">'.dol_print_date($db->jdate($obj->datelastlogin), "dayhour").'</td>';
print '<td class="nowrap center">'.dol_print_date($db->jdate($obj->datelastlogin), "dayhour").'</td>';
if (! $i) $totalarray['nbfield']++;
}
// Date previous login
if (! empty($arrayfields['u.datepreviouslogin']['checked']))
{
print '<td class="nowrap" align="center">'.dol_print_date($db->jdate($obj->datepreviouslogin), "dayhour").'</td>';
print '<td class="nowrap center">'.dol_print_date($db->jdate($obj->datepreviouslogin), "dayhour").'</td>';
if (! $i) $totalarray['nbfield']++;
}
@ -635,7 +635,7 @@ while ($i < min($num, $limit))
// Date creation
if (! empty($arrayfields['u.datec']['checked']))
{
print '<td align="center">';
print '<td class="center">';
print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser');
print '</td>';
if (! $i) $totalarray['nbfield']++;
@ -643,7 +643,7 @@ while ($i < min($num, $limit))
// Date modification
if (! empty($arrayfields['u.tms']['checked']))
{
print '<td align="center">';
print '<td class="center">';
print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser');
print '</td>';
if (! $i) $totalarray['nbfield']++;
@ -652,7 +652,7 @@ while ($i < min($num, $limit))
if (! empty($arrayfields['u.statut']['checked']))
{
$userstatic->statut=$obj->statut;
print '<td align="center">'.$userstatic->getLibStatut(3).'</td>';
print '<td class="center">'.$userstatic->getLibStatut(3).'</td>';
if (! $i) $totalarray['nbfield']++;
}
// Action column

View File

@ -239,7 +239,7 @@ if ($result > 0)
$type=array('email'=>$langs->trans("EMail"));
print $form->selectarray("typeid", $type);
print '</td>';
print '<td align="right"><input type="submit" class="button" value="'.$langs->trans("Add").'"></td>';
print '<td class="right"><input type="submit" class="button" value="'.$langs->trans("Add").'"></td>';
print '</tr>';
}
else
@ -326,7 +326,7 @@ if ($result > 0)
if ($obj->type == 'email') print $langs->trans("Email");
if ($obj->type == 'sms') print $langs->trans("SMS");
print '</td>';
print '<td align="right"><a href="card.php?id='.$id.'&action=delete&actid='.$obj->rowid.'">'.img_delete().'</a></td>';
print '<td class="right"><a href="card.php?id='.$id.'&amp;action=delete&amp;actid='.$obj->rowid.'">'.img_delete().'</a></td>';
print '</tr>';
$i++;
}
@ -449,7 +449,7 @@ if ($result > 0)
print_liste_field_titre("Action", $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder);
print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "n.type", '', $param, '', $sortfield, $sortorder);
//print_liste_field_titre("Object",$_SERVER["PHP_SELF"],"",'',$param,'"',$sortfield,$sortorder);
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "n.daten", '', $param, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "n.daten", '', $param, '', $sortfield, $sortorder, 'right ');
print '</tr>';
if ($num)
@ -494,7 +494,7 @@ if ($result > 0)
}
print '</td>';*/
// print
print'<td align="right">'.dol_print_date($db->jdate($obj->daten), 'dayhour').'</td>';
print'<td class="right">'.dol_print_date($db->jdate($obj->daten), 'dayhour').'</td>';
print '</tr>';
$i++;
}

View File

@ -296,7 +296,7 @@ if ($action == 'edit')
// AGENDA_DEFAULT_VIEW
print '<tr class="oddeven">'."\n";
print '<td>'.$langs->trans("AGENDA_DEFAULT_VIEW").'</td>'."\n";
print '<td align="center">&nbsp;</td>'."\n";
print '<td class="center">&nbsp;</td>'."\n";
print '<td class="nowrap" width="20%"><input class="oddeven" name="check_AGENDA_DEFAULT_VIEW" id="check_AGENDA_DEFAULT_VIEW" type="checkbox" '.(! empty($object->conf->AGENDA_DEFAULT_VIEW)?" checked":"");
print empty($dolibarr_main_demo)?'':' disabled="disabled"'; // Disabled for demo
print '> '.$langs->trans("UsePersonalValue").'</td>';
@ -370,7 +370,7 @@ else
// AGENDA_DEFAULT_VIEW
print '<tr class="oddeven">'."\n";
print '<td>'.$langs->trans("AGENDA_DEFAULT_VIEW").'</td>'."\n";
print '<td align="center">&nbsp;</td>'."\n";
print '<td class="center">&nbsp;</td>'."\n";
print '<td class="nowrap" width="20%"><input class="oddeven" type="checkbox" disabled '.(! empty($object->conf->AGENDA_DEFAULT_VIEW)?" checked":"").'> '.$langs->trans("UsePersonalValue").'</td>';
print '<td>'."\n";
$tmplist=array(''=>'&nbsp;', 'show_list'=>$langs->trans("ViewList"), 'show_month'=>$langs->trans("ViewCal"), 'show_week'=>$langs->trans("ViewWeek"), 'show_day'=>$langs->trans("ViewDay"), 'show_peruser'=>$langs->trans("ViewPerUser"));

View File

@ -45,9 +45,9 @@ $action=GETPOST('action', 'alpha');
$mode=$dolibarr_main_authentication;
if (! $mode) $mode='http';
$username = GETPOST('username', 'alpha');
$passwordhash = GETPOST('passwordhash', 'alpha');
$conf->entity = (GETPOST('entity', 'int') ? GETPOST('entity', 'int') : 1);
$username = GETPOST('username', 'alpha');
$passwordhash = GETPOST('passwordhash', 'alpha');
$conf->entity = (GETPOST('entity', 'int') ? GETPOST('entity', 'int') : 1);
// Instantiate hooks of thirdparty module only if not already define
$hookmanager->initHooks(array('passwordforgottenpage'));

View File

@ -264,13 +264,13 @@ if (($caneditperms && empty($objMod->rights_admin_allowed)) || empty($object->ad
{
if ($caneditperms)
{
print '<td align="center" class="nowrap">';
print '<td class="center nowrap">';
print '<a class="reposition" title="'.dol_escape_htmltag($langs->trans("All")).'" alt="'.dol_escape_htmltag($langs->trans("All")).'" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=addrights&amp;entity='.$entity.'&amp;module=allmodules">'.$langs->trans("All")."</a>";
print '/';
print '<a class="reposition" title="'.dol_escape_htmltag($langs->trans("None")).'" alt="'.dol_escape_htmltag($langs->trans("None")).'" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delrights&amp;entity='.$entity.'&amp;module=allmodules">'.$langs->trans("None")."</a>";
print '</td>';
}
print '<td align="center" width="24">&nbsp;</td>';
print '<td class="center" width="24">&nbsp;</td>';
}
print '<td>'.$langs->trans("Permissions").'</td>';
print '</tr>'."\n";
@ -316,7 +316,7 @@ if ($result)
{
if ($caneditperms)
{
print '<td align="center" class="nowrap">';
print '<td class="center nowrap">';
print '<a class="reposition" title="'.dol_escape_htmltag($langs->trans("All")).'" alt="'.dol_escape_htmltag($langs->trans("All")).'" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=addrights&amp;entity='.$entity.'&amp;module='.$obj->module.'">'.$langs->trans("All")."</a>";
print '/';
print '<a class="reposition" title="'.dol_escape_htmltag($langs->trans("None")).'" alt="'.dol_escape_htmltag($langs->trans("None")).'" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delrights&amp;entity='.$entity.'&amp;module='.$obj->module.'">'.$langs->trans("None")."</a>";
@ -344,9 +344,9 @@ if ($result)
{
if ($caneditperms)
{
print '<td align="center">'.img_picto($langs->trans("Administrator"), 'star').'</td>';
print '<td class="center">'.img_picto($langs->trans("Administrator"), 'star').'</td>';
}
print '<td align="center" class="nowrap">';
print '<td class="center nowrap">';
print img_picto($langs->trans("Active"), 'tick');
print '</td>';
}
@ -354,9 +354,9 @@ if ($result)
{
if ($caneditperms)
{
print '<td align="center"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delrights&amp;entity='.$entity.'&amp;rights='.$obj->id.'">'.img_edit_remove($langs->trans("Remove")).'</a></td>';
print '<td class="center"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delrights&amp;entity='.$entity.'&amp;rights='.$obj->id.'">'.img_edit_remove($langs->trans("Remove")).'</a></td>';
}
print '<td align="center" class="nowrap">';
print '<td class="center nowrap">';
print img_picto($langs->trans("Active"), 'tick');
print '</td>';
}
@ -367,11 +367,11 @@ if ($result)
{
if ($caneditperms)
{
print '<td align="center">';
print '<td class="center">';
print $form->textwithtooltip($langs->trans("Inherited"), $langs->trans("PermissionInheritedFromAGroup"));
print '</td>';
}
print '<td align="center" class="nowrap">';
print '<td class="center nowrap">';
print img_picto($langs->trans("Active"), 'tick');
print '</td>';
}
@ -380,7 +380,7 @@ if ($result)
// Do not own permission
if ($caneditperms)
{
print '<td align="center"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=addrights&amp;entity='.$entity.'&amp;rights='.$obj->id.'">'.img_edit_add($langs->trans("Add")).'</a></td>';
print '<td class="center"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=addrights&amp;entity='.$entity.'&amp;rights='.$obj->id.'">'.img_edit_add($langs->trans("Add")).'</a></td>';
}
print '<td>&nbsp</td>';
}
@ -390,7 +390,7 @@ if ($result)
// Do not own permission
if ($caneditperms)
{
print '<td align="center"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=addrights&amp;entity='.$entity.'&amp;rights='.$obj->id.'">'.img_edit_add($langs->trans("Add")).'</a></td>';
print '<td class="center"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=addrights&amp;entity='.$entity.'&amp;rights='.$obj->id.'">'.img_edit_add($langs->trans("Add")).'</a></td>';
}
print '<td>&nbsp</td>';
}

View File

@ -52,22 +52,22 @@ print load_fiche_titre($title, $linkback, 'title_setup');
dol_fiche_head(array(), 'general', $tab, 0, 'product');
print '<form method="post">';
print '<table class="noborder" width="100%">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Parameters").'</td>'."\n";
print '<td align="right" width="60">'.$langs->trans("Value").'</td>'."\n";
print '<td width="80">&nbsp;</td></tr>'."\n";
print '<th>'.$langs->trans("Parameters").'</td>'."\n";
print '<th class="right" width="60">'.$langs->trans("Value").'</td>'."\n";
print '<th width="80">&nbsp;</td></tr>'."\n";
print '<tr class="oddeven"><td>'.$langs->trans('HideProductCombinations').'</td><td>';
print $form->selectyesno("PRODUIT_ATTRIBUTES_HIDECHILD", $conf->global->PRODUIT_ATTRIBUTES_HIDECHILD, 1).'</td></tr>';
print '<tr class="oddeven"><td>'.$langs->trans('CombinationsSeparator').'</td>';
if(isset($conf->global->PRODUIT_ATTRIBUTES_SEPARATOR)) {
if (isset($conf->global->PRODUIT_ATTRIBUTES_SEPARATOR)) {
$separator = $conf->global->PRODUIT_ATTRIBUTES_SEPARATOR;
} else {
$separator = "_";
}
print '<td align="right"><input size="3" type="text" class="flat" name="PRODUIT_ATTRIBUTES_SEPARATOR" value="'.$separator.'"></td></tr>';
print '<td class="right"><input size="3" type="text" class="flat" name="PRODUIT_ATTRIBUTES_SEPARATOR" value="'.$separator.'"></td></tr>';
print '</table>';
print '<br><div style="text-align: center"><input type="submit" value="'.$langs->trans('Save').'" class="button"></div>';
print '<br><div class="center"><input type="submit" value="'.$langs->trans('Save').'" class="button"></div>';
print '</form>';
// End of page

View File

@ -266,7 +266,7 @@ print $form->formconfirm(
<?php if ($action == 'edit_value' && ($valueid == $attrval->id)): ?>
<td><input type="text" name="ref" value="<?php echo $attrval->ref ?>"></td>
<td><input type="text" name="value" value="<?php echo $attrval->value ?>"></td>
<td style="text-align: right">
<td class="right">
<input type="submit" value="<?php echo $langs->trans('Save') ?>" class="button">
&nbsp; &nbsp;
<input type="submit" name="cancel" value="<?php echo $langs->trans('Cancel') ?>" class="button">
@ -274,7 +274,7 @@ print $form->formconfirm(
<?php else: ?>
<td><?php echo dol_htmlentities($attrval->ref) ?></td>
<td><?php echo dol_htmlentities($attrval->value) ?></td>
<td style="text-align: right">
<td class="right">
<a href="card.php?id=<?php echo $object->id ?>&action=edit_value&valueid=<?php echo $attrval->id ?>"><?php echo img_edit() ?></a>
<a href="card.php?id=<?php echo $object->id ?>&action=delete_value&valueid=<?php echo $attrval->id ?>"><?php echo img_delete() ?></a>
</td>

View File

@ -111,12 +111,12 @@ class ProductCombination2ValuePair
public function fetchByFkCombination($fk_combination)
{
$sql = "SELECT
c.rowid,
c2v.fk_prod_attr_val,
c2v.fk_prod_attr,
c2v.fk_prod_combination
FROM ".MAIN_DB_PREFIX."product_attribute c LEFT JOIN ".MAIN_DB_PREFIX."product_attribute_combination2val c2v ON c.rowid = c2v.fk_prod_attr
WHERE c2v.fk_prod_combination = ".(int) $fk_combination;
c.rowid,
c2v.fk_prod_attr_val,
c2v.fk_prod_attr,
c2v.fk_prod_combination
FROM ".MAIN_DB_PREFIX."product_attribute c LEFT JOIN ".MAIN_DB_PREFIX."product_attribute_combination2val c2v ON c.rowid = c2v.fk_prod_attr
WHERE c2v.fk_prod_combination = ".(int) $fk_combination;
$sql .= $this->db->order('c.rang', 'asc');

View File

@ -502,9 +502,9 @@ if (! empty($id) || ! empty($ref))
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="id" value="'.dol_escape_htmltag($id).'">'."\n";
print '<input type="hidden" name="action" value="' . (($valueid > 0) ? "update" : "create") .'">'."\n";
if($valueid > 0) {
print '<input type="hidden" name="valueid" value="' . $valueid .'">'."\n";
}
if($valueid > 0) {
print '<input type="hidden" name="valueid" value="' . $valueid .'">'."\n";
}
print dol_fiche_head();
@ -641,7 +641,7 @@ if (! empty($id) || ! empty($ref))
}
} elseif ($action === 'copy') {
print $form->formconfirm(
print $form->formconfirm(
'combinations.php?id='.$id,
$langs->trans('CloneCombinationsProduct'),
$langs->trans('ConfirmCloneProductCombinations'),
@ -795,8 +795,8 @@ print $form->formconfirm(
</td>
<td class="right"><?php echo ($currcomb->variation_price >= 0 ? '+' : '').price($currcomb->variation_price).($currcomb->variation_price_percentage ? ' %' : '') ?></td>
<?php if ($object->isProduct()) print '<td class="right">'.($currcomb->variation_weight >= 0 ? '+' : '').price($currcomb->variation_weight).' '.measuring_units_string($prodstatic->weight_units, 'weight').'</td>'; ?>
<td style="text-align: center;"><?php echo $prodstatic->getLibStatut(2, 0) ?></td>
<td style="text-align: center;"><?php echo $prodstatic->getLibStatut(2, 1) ?></td>
<td class="center;"><?php echo $prodstatic->getLibStatut(2, 0) ?></td>
<td class="center;"><?php echo $prodstatic->getLibStatut(2, 1) ?></td>
<td class="right">
<a class="paddingleft paddingright" href="<?php echo dol_buildpath('/variants/combinations.php?id='.$id.'&action=edit&valueid='.$currcomb->id, 2) ?>"><?php echo img_edit() ?></a>
<a class="paddingleft paddingright" href="<?php echo dol_buildpath('/variants/combinations.php?id='.$id.'&action=delete&valueid='.$currcomb->id, 2) ?>"><?php echo img_delete() ?></a>

View File

@ -77,7 +77,7 @@ print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
?>
<table class="border" style="width: 100%">
<table class="border centpercent">
<tr>
<td class="titlefield fieldrequired"><label for="ref"><?php echo $langs->trans('Ref') ?></label></td>
<td><input type="text" id="ref" name="ref" value="<?php echo $ref ?>"></td>

View File

@ -116,17 +116,17 @@ $forcereloadpage=empty($conf->global->MAIN_FORCE_RELOAD_PAGE)?0:1;
<tr class="liste_titre nodrag nodrop">
<th class="liste_titre"><?php print $langs->trans('Ref') ?></th>
<th class="liste_titre"><?php print $langs->trans('Label') ?></th>
<th class="liste_titre" align="right"><?php print $langs->trans('NbOfDifferentValues') ?></th>
<th class="liste_titre" align="right"><?php print $langs->trans('NbProducts') ?></th>
<th class="liste_titre right"><?php print $langs->trans('NbOfDifferentValues') ?></th>
<th class="liste_titre right"><?php print $langs->trans('NbProducts') ?></th>
<th class="liste_titre" colspan="2"></th>
</tr>
<?php foreach ($variants as $key => $attribute): ?>
<tr id="row-<?php echo $attribute->id ?>" class="drag drop oddeven">
<td><a href="card.php?id=<?php echo $attribute->id ?>"><?php echo dol_htmlentities($attribute->ref) ?></a></td>
<td><a href="card.php?id=<?php echo $attribute->id ?>"><?php echo dol_htmlentities($attribute->label) ?></a></td>
<td align="right"><?php echo $attribute->countChildValues() ?></td>
<td align="right"><?php echo $attribute->countChildProducts() ?></td>
<td style="text-align: right">
<td class="right"><?php echo $attribute->countChildValues() ?></td>
<td class="right"><?php echo $attribute->countChildProducts() ?></td>
<td class="right">
<a href="card.php?id=<?php echo $attribute->id ?>&action=edit"><?php echo img_edit() ?></a>
<a href="card.php?id=<?php echo $attribute->id ?>&action=delete"><?php echo img_delete() ?></a>
</td>
@ -151,4 +151,4 @@ $forcereloadpage=empty($conf->global->MAIN_FORCE_RELOAD_PAGE)?0:1;
// End of page
llxFooter();
$db->close();
$db->close();