Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop

This commit is contained in:
florian HENRY 2017-01-23 08:30:20 +01:00
commit 7d7f1bf9ed
1320 changed files with 3686 additions and 85275 deletions

View File

@ -12,6 +12,7 @@ php:
- '5.5'
- '5.6'
- '7.0'
- '7.1'
- nightly
addons:
@ -50,6 +51,7 @@ env:
matrix:
fast_finish: true
allow_failures:
- php: 7.1
- php: nightly
# FIXME
#- env: DB=postgresql
@ -96,7 +98,7 @@ install:
if [ "$TRAVIS_PHP_VERSION" = '5.3' ] || [ "$TRAVIS_PHP_VERSION" = '5.4' ] || [ "$TRAVIS_PHP_VERSION" = '5.5' ]; then
composer -n require phpunit/phpunit ^4
fi
if [ "$TRAVIS_PHP_VERSION" = '5.6' ] || [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
if [ "$TRAVIS_PHP_VERSION" = '5.6' ] || [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
composer -n require phpunit/phpunit ^5
fi
echo
@ -136,7 +138,7 @@ before_script:
echo 'extension = apc.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
echo
echo "Enabling Memcached for PHP <= 5.4"
# Documentation says it should be available for all PHP versions but it's not for 5.5 and 5.6, 7.0 and nightly!
# Documentation says it should be available for all PHP versions but it's not for 5.5 and 5.6, 7.0, 7.1 and nightly!
echo 'extension = memcached.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
fi
phpenv rehash
@ -208,7 +210,7 @@ before_script:
echo "Setting up Apache + FPM"
# enable php-fpm
cp ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.conf.default ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.conf
if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
# Copy the included pool
cp ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.d/www.conf
fi

View File

@ -151,6 +151,9 @@ Dolibarr better:
no more required, were also removed. Use this new one if you were using one of them.
- The trigger that activate or close a contract line is run on a contract line, not on contract.
Dolibarr 5.0 was frozen before PHP 7.1 was released. Unit tests are successful on PHP 7.1 but we don't have enough
feedback to confirm all application is compatible. Current officiel supported PHP versions are PHP 5.3 to 7.0.
***** ChangeLog for 4.0.3 to 4.0.2 *****
FIX: #5853 $conf->global->$calc==0 || $conf->global->$calc==1

View File

@ -54,19 +54,10 @@ Pour mettre a jour Dolibarr depuis une vieille version vers celle ci:
- Ecraser les vieux fichiers dans le vieux repertoire 'dolibarr' par les fichiers
fournis dans ce nouveau package.
- Si vous venez d'une version x.y.z vers x.y.w (seul le 3eme chiffre varie),
il n'y a pas besoin de migration de données.
- Si vous venez d'une beta ou d'un version x.y.z vers une autre ou les numeros x
ou y varient, vous devez appelez la page "install/" de migration dans votre
navigateur (ceci doit se faire automatiquement au premier accès de l'application).
Ce sera une URL du genre:
http://localhost/dolibarr/htdocs/install/index.php
ou
http://yourdolibarrhost/install/index.php
- Au prochain accès, Dolibarr proposera la page de "mise a jour" des données (si necessaire).
Si un fichier install.lock existe pour vérouiller le processus de mise à jour, il sera demandé de le supprimer manuellement (vous devriez trouver le fichier install.lock dans le répertoire utilisé pour stocker les documents générés ou transféré sur le serveur. Dans la plupart des cas, c'est le répertoire appelé "documents")
Ensuite, choisir l'option de "mise a jour" en rapport avec votre cas.
Note: Le processus de migration peut etre lance plusieurs fois sans risque.
*Note: Le processus de migration peut etre lancé manuellement et plusieurs fois, sans risque, en appelant la page /install/*
## CE QUI EST NOUVEAU
@ -86,11 +77,13 @@ Voir fichier ChangeLog.
- Gestion des factures clients/fournisseurs et paiements
- Gestion des virements bancaires SEPA
- Gestion des comptes bancaires
- Agenda partagé
- Calendrier/Agenda partagé (avec export ical, vcal)
- Suivi des opportunités et/ou projets (suivi de rentabilité incluant les factures, notes de frais, temps consommé valorisé, ...)
- Gestion de contrats de services
- Gestion de stock
- Gestion des expéditions
- Gestion des demandes de congès
- Gestion des notes de frais
- GED (Gestion Electronique de Documents)
- EMailings de masse
- Réalisation de sondages

View File

@ -26,6 +26,16 @@ Other licenses apply for some included dependencies. See [COPYRIGHT](https://git
Releases can be downloaded from [official website](https://www.dolibarr.org/).
### Install from composer
If you do not already have Composer installed, you may do so by following the instructions at getcomposer.org. On Linux and Mac OS X, you'll run the following commands:
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
On Windows, you'll download and run https://getcomposer.org/Composer-Setup.exe
composer create-project dolibarr/dolibarr erp
### Simple setup
If you have low technical skills and you're looking to install Dolibarr ERP/CRM in few clicks, you can use one of the packaged versions:
@ -60,10 +70,10 @@ You can use a Web server and a supported database (MariaDb, MySql or Postgresql)
## UPGRADING
- Overwrite all old files from 'dolibarr' directory with files provided into the new version's package.
- If you're upgrading from version x.y.z to x.y.w (only third number differs), there is no need to run any migration process.
- If you're upgrading from a beta version or from any version x.y.z to any other where x or y number differs, you must call the Dolibarr "install/" page in your browser (this should be done automatically at first dolibarr access) and follow the upgrade process.
- At first next access, Dolibarr will redirect your to the "install/" page to make the upgrade process.
If a file install.lock exists to lock any run of upgrade process, the application will ask you to remove the file manually (you should find the install.lock file into the directory used to store generated and uploaded documents, in most cases, it is the directory called "documents").
*Note: migration process can safely be done multiple times.*
*Note: migration process can safely be done multiple times by calling the page /install/index.php*
## WHAT'S NEW
@ -80,17 +90,17 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
- Invoices and payment management
- Standing orders management (European SEPA)
- Bank accounts management
- Shared calendar
- Shared calendar/agenda (with ical and vcal export for third party tools integration)
- Opportunities and/or project management (following project benefit including invoices, expense reports, time spent, ...)
- Projects management
- Contracts management
- Stock management
- Shipping management
- Interventions management
- Agenda with ical and vcal export for third party tools integration
- Employee's leave requests management
- Expense report management
- Electronic Document Management (EDM)
- Foundations members management
- Employee's holidays management
- Mass emailing
- Surveys
- Point of Sale

View File

@ -320,8 +320,8 @@ x.y.z+dfsgw
Note: If there was errors solved manually after get-orig-sources.sh, you may need to make a git commit
* Update/fix debian/* files used to build package.
At least, add an entry into debian/changelog
> dch -v x.y.z+dfsgw-v "My comment" will add entry.
At least, add an entry into debian/changelog with command
> dch -v x.y.z+dfsgw-1 "My comment"
For example: dch -v x.y.z+dfsgw-1 "New upstream release." for a new version (x.y.z = version, w start from 1 and increased for each new import)
Then check/modify changelog to replace "version" or "unstable" with "UNRELEASED".
Then check/modify also the user/date signature:
@ -332,7 +332,9 @@ Then check/modify also the user/date signature:
To update dolibarr debian package when only files into debian has changed:
* Change files and commit.
* Add a tag debian/x.y.z+dfsgw-2 (increase the last 1 into 2, 3...)
* Add a line into changelog for version debian/x.y.z+dfsgw-v (increase the last v into 2, 3...)
> dch -v x.y.z+dfsgw-v "My comment"
* git tag will be added when package is pushed.
To update dolibarr debian package when only files not into debian has changed:

View File

@ -26,11 +26,11 @@ Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm |
# Misc dependencies
# fonts-dejavu-core | ttf-dejavu-core,
xdg-utils,
virtual-mysql-client,
mariadb-client | virtual-mysql-client,
${misc:Depends},
${perl:Depends}
Recommends: apache2 | lighttpd | httpd,
virtual-mysql-server
mariadb-server | virtual-mysql-server
Suggests: www-browser, php5-geoip
Description: Web based software to manage a company or foundation
Dolibarr ERP & CRM is an easy to use open source/free software package for

View File

@ -162,7 +162,7 @@ export res=$?
# ---------------------------- copy demo files
export documentdir=`cat $mydir/../../htdocs/conf/conf.php | grep '^\$dolibarr_main_data_root' | sed -e 's/$dolibarr_main_data_root=//' | sed -e 's/;//' | sed -e "s/'//g" `
export documentdir=`cat $mydir/../../htdocs/conf/conf.php | grep '^\$dolibarr_main_data_root' | sed -e 's/$dolibarr_main_data_root=//' | sed -e 's/;//' | sed -e "s/'//g" | sed -e 's/"//g' `
if [ "x$documentdir" != "x" ]
then
echo cp -pr $mydir/documents_demo/* "$documentdir/"
@ -174,7 +174,7 @@ then
echo cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images"
cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images"
else
echo Detection of documents directory failed so demo files were not copied.
echo Detection of documents directory $documentdir failed so demo files were not copied.
fi

View File

@ -247,7 +247,7 @@ $sql.=$db->order($sortfield,$sortorder);
//$sql.= $db->plimit($conf->liste_limit+1, $offset);
// Count total nb of records
$nbtotalofrecords = -1;
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$result = $db->query($sql);

View File

@ -42,11 +42,15 @@ then
then
aaupper="US"
fi
if [ $aaupper = "EL" ]
then
aaupper="GR"
fi
bblower=`echo $dirshort | nawk -F"_" '{ print tolower($2) }'`
if [ "$aa" != "$bblower" -a "$dirshort" != "en_US" ]
then
reflang="htdocs/langs/"$aa"_"$aaupper
if [ -d $reflang ]
if [ -d $reflang -a $aa"_"$bb != $aa"_"$aaupper ]
then
echo "***** Process language "$aa"_"$bb" - Search original into "$reflang
echo $dirshort is an alternative language of $reflang

View File

@ -39,8 +39,8 @@
</tr>
<!-- Password -->
<tr><td valign="top" class="nowrap"> &nbsp; <strong><label for="password">Mot de passe</label></strong> &nbsp; </td>
<td valign="top" class="nowrap">
<tr><td class="tdtop nowrap"> &nbsp; <strong><label for="password">Mot de passe</label></strong> &nbsp; </td>
<td class="tdtop nowrap">
<input id="password" name="password" class="flat" type="password" size="15" maxlength="30" value="" tabindex="2" />
</td></tr>

View File

@ -0,0 +1,14 @@
Term Dolibarr SAP Odoo ...
----------------------------------------------------------------------------
Thirdparty Contact partner Partner/Contact (company)
Contact/address Contact person Partner/Contact (individual)
Financial ?? Invoicing
Income / Expense ?? Profit / Loss
Balance Net profit

View File

@ -172,7 +172,7 @@ if (strlen(trim($search_pcgsubtype))) {
$sql .= $db->order($sortfield, $sortorder);
// Count total nb of records
$nbtotalofrecords = -1;
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$resql = $db->query($sql);

View File

@ -90,7 +90,7 @@ $sql .= " WHERE f.entity = " . $conf->entity;
$sql.=$db->order($sortfield,$sortorder);
// Count total nb of records
$nbtotalofrecords = -1;
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$result = $db->query($sql);

View File

@ -268,7 +268,7 @@ if ($action == 'create')
print '</td></tr>';
// Label
print '<tr><td valign="top">';
print '<tr><td class="tdtop">';
print $form->editfieldkey("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32');
print '</td><td colspan="2">';
print $form->editfieldval("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32');

View File

@ -248,7 +248,7 @@ if (strlen(trim($search_desc))) {
}
$sql .= $db->order($sortfield, $sortorder);
$nbtotalofrecords = -1;
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$result = $db->query($sql);

View File

@ -143,7 +143,7 @@ else {
// List
$nbtotalofrecords = -1;
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
$nbtotalofrecords = $object->fetchAllBalance($sortorder, $sortfield, 0, 0, $filter);
if ($nbtotalofrecords < 0) {

View File

@ -293,7 +293,7 @@ llxHeader('', $title_page);
// List
$nbtotalofrecords = -1;
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
$nbtotalofrecords = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter);
if ($nbtotalofrecords < 0) {

View File

@ -162,7 +162,7 @@ llxHeader('', $title_page);
// List
$nbtotalofrecords = -1;
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
$nbtotalofrecords = $object->fetchAllByAccount($sortorder, $sortfield, 0, 0, $filter);
if ($nbtotalofrecords < 0) {

View File

@ -158,7 +158,7 @@ if (! empty($search_code_journal)) {
* Mode List
*/
$nbtotalofrecords = -1;
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
$nbtotalofrecords = $object->fetchAll($sortorder, $sortfield, 0, 0);
if ($nbtotalofrecords < 0) {

View File

@ -200,7 +200,7 @@ $sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't sha
$sql .= $db->order($sortfield, $sortorder);
// Count total nb of records
$nbtotalofrecords = -1;
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$result = $db->query($sql);

View File

@ -220,7 +220,7 @@ $sql .= " AND f.entity IN (" . getEntity("facture", 0) . ")"; // We don't sha
$sql .= $db->order($sortfield, $sortorder);
// Count total nb of records
$nbtotalofrecords = -1;
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$result = $db->query($sql);

View File

@ -178,7 +178,7 @@ $sql .= " AND er.entity IN (" . getEntity("expensereport", 0) . ")"; // We don'
$sql .= $db->order($sortfield, $sortorder);
// Count total nb of records
$nbtotalofrecords = -1;
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$result = $db->query($sql);

View File

@ -208,7 +208,7 @@ $sql .= " AND er.entity IN (" . getEntity("expensereport", 0) . ")"; // We don'
$sql .= $db->order($sortfield, $sortorder);
// Count total nb of records
$nbtotalofrecords = -1;
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$result = $db->query($sql);

View File

@ -182,7 +182,7 @@ $sql .= " AND f.entity IN (" . getEntity("facture_fourn", 0) . ")"; // We don't
$sql .= $db->order($sortfield, $sortorder);
// Count total nb of records
$nbtotalofrecords = -1;
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$result = $db->query($sql);

View File

@ -217,7 +217,7 @@ $sql .= " AND f.entity IN (" . getEntity("facture_fourn", 0) . ")"; // We don't
$sql .= $db->order($sortfield, $sortorder);
// Count total nb of records
$nbtotalofrecords = -1;
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$result = $db->query($sql);

View File

@ -108,7 +108,7 @@ echo $this->control->tpl['ajax_selectcountry']; ?>
</tr>
<tr>
<td valign="top"><?php echo $langs->trans("Note"); ?></td>
<td class="tdtop"><?php echo $langs->trans("Note"); ?></td>
<td colspan="3" valign="top"><textarea name="note" cols="70" rows="<?php echo ROWS_3; ?>"><?php echo $this->control->tpl['note']; ?></textarea></td>
</tr>

View File

@ -117,7 +117,7 @@ echo $this->control->tpl['ajax_selectcountry'];
</tr>
<tr>
<td valign="top"><?php echo $langs->trans("Note"); ?></td>
<td class="tdtop"><?php echo $langs->trans("Note"); ?></td>
<td colspan="3" valign="top"><textarea name="note" cols="70" rows="<?php echo ROWS_3; ?>"><?php echo $this->control->tpl['note']; ?></textarea></td>
</tr>

View File

@ -102,7 +102,7 @@ dol_htmloutput_errors($this->control->tpl['error'],$this->control->tpl['errors']
</tr>
<tr>
<td valign="top"><?php echo $langs->trans("Note"); ?></td>
<td class="tdtop"><?php echo $langs->trans("Note"); ?></td>
<td colspan="3"><?php echo $this->control->tpl['note']; ?></td>
</tr>

View File

@ -873,7 +873,7 @@ else
}
// Address
print '<tr><td valign="top">'.$langs->trans("Address").'</td><td>';
print '<tr><td class="tdtop">'.$langs->trans("Address").'</td><td>';
print '<textarea name="address" wrap="soft" class="quatrevingtpercent" rows="2">'.(GETPOST('address','alpha')?GETPOST('address','alpha'):$object->address).'</textarea>';
print '</td></tr>';

View File

@ -1818,18 +1818,16 @@ class Adherent extends CommonObject
$langs->load("orders");
// Positionne le modele sur le nom du modele a utiliser
if (! dol_strlen($modele))
{
if (! empty($conf->global->ADHERENT_ADDON_PDF))
{
$modele = $conf->global->ADHERENT_ADDON_PDF;
}
else
{
$modele = 'standard';
}
}
if (! dol_strlen($modele)) {
$modele = 'standard';
if ($this->modelpdf) {
$modele = $this->modelpdf;
} elseif (! empty($conf->global->ADHERENT_ADDON_PDF)) {
$modele = $conf->global->ADHERENT_ADDON_PDF;
}
}
$modelpath = "core/modules/member/doc/";

View File

@ -250,7 +250,7 @@ $sql.=$hookmanager->resPrint;
$sql.= $db->order($sortfield,$sortorder);
// Count total nb of records with no order and no limits
$nbtotalofrecords = -1;
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$resql = $db->query($sql);
@ -375,7 +375,7 @@ if (! empty($moreforfilter))
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
print '<div class="div-table-responsive">';
print '<div class="div-table-responsive-no-min">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER))

View File

@ -1039,7 +1039,7 @@ if ($rowid > 0)
//print '<tr><td colspan="2"><b>'.$langs->trans("Payment").'</b></td></tr>';
// No more action
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans('MoreActions');
print '<tr><td class="tdtop fieldrequired">'.$langs->trans('MoreActions');
print '</td>';
print '<td>';
print '<input type="radio" class="moreaction" id="none" name="paymentsave" value="none"'.(empty($bankdirect) && empty($invoiceonly) && empty($bankviainvoice)?' checked':'').'> '.$langs->trans("None").'<br>';

View File

@ -110,7 +110,7 @@ if ($search_account > 0) $sql.= " AND b.fk_account = ".$search_account;
if ($search_amount) $sql.= natural_search('c.subscription', $search_amount, 1);
$sql.= $db->order($sortfield,$sortorder);
$nbtotalofrecords = -1;
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$result = $db->query($sql);

View File

@ -251,10 +251,10 @@ if ($action == 'create')
print $form->selectyesno("vote",0,1);
print '</td></tr>';
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td>';
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td>';
print '<textarea name="comment" wrap="soft" class="centpercent" rows="3"></textarea></td></tr>';
print '<tr><td valign="top">'.$langs->trans("WelcomeEMail").'</td><td>';
print '<tr><td class="tdtop">'.$langs->trans("WelcomeEMail").'</td><td>';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor=new DolEditor('mail_valid',$object->mail_valid,'',280,'dolibarr_notes','',false,true,$conf->fckeditor->enabled,15,'90%');
$doleditor->Create();
@ -314,10 +314,10 @@ if ($rowid > 0)
print yn($object->vote);
print '</tr>';
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td>';
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td>';
print nl2br($object->note)."</td></tr>";
print '<tr><td valign="top">'.$langs->trans("WelcomeEMail").'</td><td>';
print '<tr><td class="tdtop">'.$langs->trans("WelcomeEMail").'</td><td>';
print nl2br($object->mail_valid)."</td></tr>";
// Other attributes
@ -407,7 +407,7 @@ if ($rowid > 0)
$sql.=" AND datefin < '".$db->idate($now)."'";
}
// Count total nb of records
$nbtotalofrecords = -1;
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$resql = $db->query($sql);
@ -647,10 +647,10 @@ if ($rowid > 0)
print $form->selectyesno("vote",$object->vote,1);
print '</td></tr>';
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td>';
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td>';
print '<textarea name="comment" wrap="soft" class="centpercent" rows="3">'.$object->note.'</textarea></td></tr>';
print '<tr><td valign="top">'.$langs->trans("WelcomeEMail").'</td><td>';
print '<tr><td class="tdtop">'.$langs->trans("WelcomeEMail").'</td><td>';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor=new DolEditor('mail_valid',$object->mail_valid,'',280,'dolibarr_notes','',false,true,$conf->fckeditor->enabled,15,'90%');
$doleditor->Create();

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2008-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011-2017 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
*
@ -407,6 +407,37 @@ $tmplist=array('show_month'=>$langs->trans("ViewCal"), 'show_week'=>$langs->tran
print $form->selectarray('AGENDA_DEFAULT_VIEW', $tmplist, $conf->global->AGENDA_DEFAULT_VIEW);
print '</td></tr>'."\n";
// AGENDA NOTIFICATION
if ($conf->global->MAIN_FEATURES_LEVEL > 0)
{
$var=!$var;
print '<tr '.$bc[$var].'>'."\n";
print '<td>'.$langs->trans('AGENDA_NOTIFICATION').'</td>'."\n";
print '<td align="center">&nbsp;</td>'."\n";
print '<td align="right">'."\n";
if (empty($conf->global->AGENDA_NOTIFICATION)) {
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_NOTIFICATION">'.img_picto($langs->trans('Disabled'),'switch_off').'</a>';
print '</td></tr>'."\n";
} else {
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_AGENDA_NOTIFICATION">'.img_picto($langs->trans('Enabled'),'switch_on').'</a>';
print '</td></tr>'."\n";
$var=!$var;
print '<tr '.$bc[$var].'>'."\n";
print '<td>'.$langs->trans('AGENDA_NOTIFICATION_SOUND').'</td>'."\n";
print '<td align="center">&nbsp;</td>'."\n";
print '<td align="right">'."\n";
if (empty($conf->global->AGENDA_NOTIFICATION_SOUND)) {
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_AGENDA_NOTIFICATION_SOUND">'.img_picto($langs->trans('Disabled'),'switch_off').'</a>';
} else {
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_AGENDA_NOTIFICATION_SOUND">'.img_picto($langs->trans('Enabled'),'switch_on').'</a>';
}
print '</td></tr>'."\n";
}
}
print '</table>';
dol_fiche_end();
@ -415,7 +446,6 @@ print '<div class="center"><input class="button" type="submit" name="save" value
print '</form>';
print "<br>";
llxFooter();

View File

@ -329,7 +329,10 @@ print load_fiche_titre($langs->trans("BoxesAvailable"));
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n";
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'."\n";
print '<input type="hidden" name="action" value="add">'."\n";
print '<table class="noborder" width="100%">'."\n";
print '<div class="div-table-responsive-no-min">';
print '<table class="tagtable liste centpercent">'."\n";
print '<tr class="liste_titre">';
print '<td width="300">'.$langs->trans("Box").'</td>';
print '<td>'.$langs->trans("Note").'/'.$langs->trans("Parameters").'</td>';
@ -375,6 +378,8 @@ foreach($boxtoadd as $box)
}
print '</table>'."\n";
print '</div>';
print '<div class="right">';
print '<input type="submit" class="button"'.(count($boxtoadd)?'':' disabled').' value="'.$langs->trans("Activate").'">';
print '</div>'."\n";
@ -388,7 +393,9 @@ $boxactivated=InfoBox::listBoxes($db,'activated',-1,null);
print "<br>\n\n";
print load_fiche_titre($langs->trans("BoxesActivated"));
print '<table class="noborder" width="100%">';
print '<div class="div-table-responsive-no-min">';
print '<table class="tagtable liste">'."\n";
print '<tr class="liste_titre">';
print '<td width="300">'.$langs->trans("Box").'</td>';
print '<td>'.$langs->trans("Note").'/'.$langs->trans("Parameters").'</td>';
@ -441,7 +448,9 @@ foreach($boxactivated as $key => $box)
print '</tr>'."\n";
}
print '</table><br>';
print '</table>';
print '</div>';
print '<br>';
// Other parameters

View File

@ -786,7 +786,7 @@ else
print '</td></tr>';
$var=!$var;
print '<tr '.$bc[$var].'><td valign="top">'.$langs->trans("Note").'</td><td>' . (! empty($conf->global->MAIN_INFO_SOCIETE_NOTE) ? nl2br($conf->global->MAIN_INFO_SOCIETE_NOTE) : '') . '</td></tr>';
print '<tr '.$bc[$var].'><td class="tdtop">'.$langs->trans("Note").'</td><td>' . (! empty($conf->global->MAIN_INFO_SOCIETE_NOTE) ? nl2br($conf->global->MAIN_INFO_SOCIETE_NOTE) : '') . '</td></tr>';
print '</table>';
@ -952,7 +952,7 @@ else
print '</tr>';
$var=!$var;
print '<tr '.$bc[$var].'><td valign="top">'.$langs->trans("CompanyObject").'</td><td>' . (! empty($conf->global->MAIN_INFO_SOCIETE_OBJECT) ? nl2br($conf->global->MAIN_INFO_SOCIETE_OBJECT) : '') . '</td></tr>';
print '<tr '.$bc[$var].'><td class="tdtop">'.$langs->trans("CompanyObject").'</td><td>' . (! empty($conf->global->MAIN_INFO_SOCIETE_OBJECT) ? nl2br($conf->global->MAIN_INFO_SOCIETE_OBJECT) : '') . '</td></tr>';
print '</table>';
print '</form>';

View File

@ -182,6 +182,7 @@ print '<form action="'.$_SERVER["PHP_SELF"].((empty($user->entity) && $debug)?'?
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" id="action" name="action" value="">';
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Name").'</td>';
@ -297,6 +298,7 @@ if ($result)
print '</table>';
print '</div>';
if ($conf->use_javascript_ajax)
{
@ -311,6 +313,7 @@ if ($conf->use_javascript_ajax)
print "</form>\n";
llxFooter();
$db->close();

View File

@ -557,6 +557,7 @@ if ($id == 25)
if ($conf->fournisseur->enabled) $elementList['order_supplier_send']=$langs->trans('MailToSendSupplierOrder');
if ($conf->fournisseur->enabled) $elementList['invoice_supplier_send']=$langs->trans('MailToSendSupplierInvoice');
if ($conf->societe->enabled) $elementList['thirdparty']=$langs->trans('MailToThirdparty');
if ($conf->contrat->enabled) $elementList['contract']=$langs->trans('MailToSendContract');
$parameters=array('elementList'=>$elementList);
$reshook=$hookmanager->executeHooks('emailElementlist',$parameters); // Note that $action and $object may have been modified by some hooks

View File

@ -203,7 +203,7 @@ foreach ($modulesdir as $dir)
}
ksort($arrayofnatures);
}
// Define array $categ with categ with at least one qualified module
if ($modulequalified > 0)
{
@ -319,7 +319,7 @@ if ($mode != 'marketplace')
$moreforfilter.= $langs->trans('Keyword') . ': <input type="text" name="search_keyword" value="'.dol_escape_htmltag($search_keyword).'">';
$moreforfilter.= '</div>';
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter.= $langs->trans('Origin') . ': '.$form->selectarray('search_nature', $arrayofnatures, $search_nature, 1);
$moreforfilter.= $langs->trans('Origin') . ': '.$form->selectarray('search_nature', $arrayofnatures, dol_escape_htmltag($search_nature), 1);
$moreforfilter.= '</div>';
if (! empty($conf->global->MAIN_FEATURES_LEVEL))
{
@ -398,7 +398,7 @@ if ($mode != 'marketplace')
if ($search_keyword)
{
$qualified=0;
if (preg_match('/'.preg_quote($search_keyword).'/i', $modulename)
if (preg_match('/'.preg_quote($search_keyword).'/i', $modulename)
|| preg_match('/'.preg_quote($search_keyword).'/i', $moduledesc)
|| preg_match('/'.preg_quote($search_keyword).'/i', $moduledesclong)
|| preg_match('/'.preg_quote($search_keyword).'/i', $moduleauthor)
@ -417,7 +417,7 @@ if ($mode != 'marketplace')
{
//print $reg[1].'-'.dol_escape_htmltag($objMod->getPublisher());
$publisher=dol_escape_htmltag($objMod->getPublisher());
if ($reg[1] && $reg[1] != $publisher) continue;
if ($reg[1] && dol_escape_htmltag($reg[1]) != $publisher) continue;
if (! $reg[1] && ! empty($publisher)) continue;
}
if ($search_nature == 'core' && $objMod->isCoreOrExternalModule() == 'external') continue;
@ -485,22 +485,23 @@ if ($mode != 'marketplace')
print '</td>';
// Name
print '<td valign="top">'.$objMod->getName();
print '<td class="tdtop">'.$objMod->getName();
print "</td>\n";
// Desc
print '<td valign="top">';
print '<td class="tdtop">';
print nl2br($objMod->getDesc());
print "</td>\n";
// Help
print '<td align="center" valign="top" class="nowrap" style="width: 82px;">';
$text='';
if ($objMod->getDescLong()) $text.='<div class="titre">'.$objMod->getDesc().'</div><br>'.$objMod->getDescLong().'<br>';
else $text.='<div class="titre">'.$objMod->getDesc().'</div><br>';
$textexternal='';
$imginfo="info";
$imginfo="info";
if ($objMod->isCoreOrExternalModule() == 'external')
{
$imginfo="info_black";
@ -647,6 +648,7 @@ if ($mode != 'marketplace')
$text.='<br><strong>'.$langs->trans("AddOtherPagesOrServices").':</strong> ';
$text.=$langs->trans("DetectionNotPossible");
print $form->textwithpicto('', $text, 1, $imginfo, 'minheight20');
print '</td>';

View File

@ -124,7 +124,7 @@ dol_fiche_head($head, 'default', $langs->trans("Security"));
// Show warning about external users
print info_admin(showModulesExludedForExternal($modules)).'<br>'."\n";
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder" width="100%">';
// Affiche lignes des permissions
@ -215,8 +215,9 @@ if ($result)
}
print '</table>';
print '</div>';
dol_fiche_end();
llxFooter();
$db->close();

View File

@ -86,12 +86,12 @@ if ($sfurl)
}
print ')';
}
print ' / <a href="http://www.gnu.org/copyleft/gpl.html">GNU-GPL v3+</a></li>';
}
else
{
print $langs->trans("LastStableVersion").' : <b>' .$langs->trans("UpdateServerOffline").'</b><br>';
print ' ('.$langs->trans("LastStableVersion").' : <b>' .$langs->trans("UpdateServerOffline").'</b>)<br>';
}
print ' / <a href="http://www.gnu.org/copyleft/gpl.html">GNU-GPL v3+</a></li>';
print '</ul>';

View File

@ -48,6 +48,7 @@ $tmp=getBrowserInfo($_SERVER["HTTP_USER_AGENT"]);
// Browser
$var=true;
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td colspan="2">'.$langs->trans("Value").'</td></tr>'."\n";
$var=!$var;
@ -71,10 +72,10 @@ print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("Screen").'</td><td col
print $_SESSION['dol_screenwidth'].' x '.$_SESSION['dol_screenheight'];
print '</td></tr>'."\n";
print '</table>';
print '</div>';
print '<br>';
llxFooter();
$db->close();

View File

@ -81,7 +81,8 @@ else
{
if ($base == 1)
{
print '<table class="noborder">';
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("TableName").'</td>';
print '<td colspan="2">'.$langs->trans("Type").'</td>';
@ -134,11 +135,13 @@ else
}
}
print '</table>';
print '</div>';
}
if ($base == 2)
{
print '<table class="noborder">';
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("TableName").'</td>';
print '<td>Nb of tuples</td>';
@ -173,12 +176,14 @@ else
}
}
print '</table>';
print '</div>';
}
if ($base == 4)
{
// Sqlite by PDO or by Sqlite3
print '<table class="noborder">';
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("TableName").'</td>';
print '<td>'.$langs->trans("NbOfRecord").'</td>';
@ -207,6 +212,8 @@ else
}
}
print '</table>';
print '</div>';
}
}

View File

@ -42,6 +42,7 @@ llxHeader();
print load_fiche_titre($langs->trans("InfoDatabase"),'','title_setup');
// Database
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Database").'</td></tr>'."\n";
print '<tr '.$bc[0].'><td width="300">'.$langs->trans("Version").'</td><td>'.$db::LABEL.' '.$db->getVersion().'</td></tr>'."\n";
@ -54,14 +55,16 @@ print '<tr '.$bc[0].'><td width="300">'.$langs->trans("Password").'</td><td>'.pr
print '<tr '.$bc[1].'><td width="300">'.$langs->trans("DBStoringCharset").'</td><td>'.$db->getDefaultCharacterSetDatabase().'</td></tr>'."\n";
print '<tr '.$bc[0].'><td width="300">'.$langs->trans("DBSortingCharset").'</td><td>'.$db->getDefaultCollationDatabase().'</td></tr>'."\n";
print '</table>';
print '</div>';
// Tables
print '<br>';
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Tables").'</td></tr>'."\n";
print '<tr '.$bc[0].'><td width="300"><a href="'.DOL_URL_ROOT.'/admin/system/database-tables.php?mainmenu=home">'.$langs->trans("List").'</a></td></tr>'."\n";
print '</table>';
print '</div>';
$listofvars=$db->getServerParametersValues();
$listofstatus=$db->getServerStatusValues();
@ -76,6 +79,7 @@ else
foreach($arraylist as $listname)
{
print '<br>';
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td width="300">'.$langs->trans("Parameters").'</td>';
@ -120,6 +124,7 @@ else
print '</tr>'."\n";
}
print '</table>'."\n";
print '</div>';
}
}

View File

@ -48,6 +48,7 @@ print load_fiche_titre($title,'','title_setup');
// Version
$var=true;
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Version").'</td><td>'.$langs->trans("Value").'</td></tr>'."\n";
$var=!$var;
@ -69,10 +70,12 @@ else
}
print '</td></tr>'."\n";
print '</table>';
print '</div>';
print '<br>';
// Session
$var=true;
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Session").'</td><td colspan="2">'.$langs->trans("Value").'</td></tr>'."\n";
$var=!$var;
@ -107,6 +110,7 @@ foreach($_SESSION as $key => $val)
}
print '</td></tr>'."\n";
print '</table>';
print '</div>';
print '<br>';
@ -116,6 +120,7 @@ if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_S
$shmoparray=dol_listshmop();
$var=true;
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td class="titlefield">'.$langs->trans("LanguageFilesCachedIntoShmopSharedMemory").'</td>';
@ -133,12 +138,14 @@ if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_S
}
print '</table>';
print '</div>';
print '<br>';
}
// Localisation
$var=true;
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("LocalisationDolibarrParameters").'</td><td>'.$langs->trans("Value").'</td></tr>'."\n";
$var=!$var;
@ -234,6 +241,7 @@ if (! empty($conf->global->MAIN_FILESYSTEM_ENCODING)) $tmp=$conf->global->MAIN_F
print '<tr '.$bc[$var].'><td>&nbsp; => '.$langs->trans("File encoding").'</td><td>'.$tmp.'</td></tr>'."\n"; // date.timezone must be in valued defined in http://fr3.php.net/manual/en/timezones.europe.php
print '</table>';
print '</div>';
print '<br>';
@ -292,6 +300,7 @@ $configfileparameters=array(
);
$var=true;
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td class="titlefield">'.$langs->trans("Parameters").' ';
@ -353,11 +362,13 @@ foreach($configfileparameters as $key => $value)
}
}
print '</table>';
print '</div>';
print '<br>';
// Parameters in database
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder">';
print '<tr class="liste_titre">';
print '<td class="titlefield">'.$langs->trans("Parameters").' '.$langs->trans("Database").'</td>';
@ -407,7 +418,7 @@ if ($resql)
}
print '</table>';
print '</div>';
llxFooter();

View File

@ -102,6 +102,8 @@ foreach($modulesdir as $dir)
closedir($handle);
}
}
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Modules").'</td>';
@ -148,6 +150,7 @@ foreach($sortorder as $numero=>$name)
print "</tr>\n";
}
print '</table>';
print '</div>';
print '<br>';
sort($rights_ids);
$old='';

View File

@ -68,8 +68,8 @@ print '<br>';
$phparray=phpinfo_array();
foreach($phparray as $key => $value)
{
//print load_fiche_titre($key);
print '<table class="noborder">';
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder">';
print '<tr class="liste_titre">';
//print '<td width="220px">'.$langs->trans("Parameter").'</td>';
print '<td width="220px">'.$key.'</td>';
@ -114,7 +114,9 @@ foreach($phparray as $key => $value)
print '</tr>';
}
}
print '</table><br>';
print '</table>';
print '</div>';
print '<br>';
}

View File

@ -145,7 +145,7 @@ print '<tr '.$bc[false].'><td style="padding-left: 8px">';
?>
<table class="centpercent">
<tr>
<td valign="top">
<td class="tdtop">
<div id="div_container_exportoptions">
<fieldset id="exportoptions"><legend><?php echo $langs->trans("ExportMethod"); ?></legend>
@ -179,7 +179,7 @@ print '<tr '.$bc[false].'><td style="padding-left: 8px">';
</div>
</td>
<td valign="top">
<td class="tdtop">
<div id="div_container_sub_exportoptions">

View File

@ -86,7 +86,7 @@ print $langs->trans("RestoreDesc3",$dolibarr_main_db_name).'<br><br>';
<?php print $langs->trans("DatabaseName").' : <b>'.$dolibarr_main_db_name.'</b>'; ?><br><br>
<table><tr><td valign="top">
<table><tr><td class="tdtop">
<?php if ($conf->use_javascript_ajax) { ?>
<div id="div_container_exportoptions">
@ -120,7 +120,7 @@ print $langs->trans("RestoreDesc3",$dolibarr_main_db_name).'<br><br>';
</div>
<?php } ?>
</td><td valign="top">
</td><td class="tdtop">
<div id="div_container_sub_exportoptions">

View File

@ -174,6 +174,15 @@ if ($search_user) { $usefilter++; $sql.=natural_search("u.login", $search_user,
if ($search_desc) { $usefilter++; $sql.=natural_search("e.description", $search_desc, 0); }
if ($search_ua) { $usefilter++; $sql.=natural_search("e.user_agent", $search_ua, 0); }
$sql.= $db->order($sortfield,$sortorder);
// Count total nb of records
$nbtotalofrecords = '';
/*if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$result = $db->query($sql);
$nbtotalofrecords = $db->num_rows($result);
}*/
$sql.= $db->plimit($conf->liste_limit+1, $offset);
//print $sql;
$result = $db->query($sql);
@ -195,7 +204,7 @@ if ($result)
$center='<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?action=purge">'.$langs->trans("Purge").'</a>';
}
print_barre_liste($langs->trans("ListOfSecurityEvents").' ('.$num.')', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, 0, 'setup');
print_barre_liste($langs->trans("ListOfSecurityEvents"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $nbtotalofrecords, 'setup');
if ($action == 'purge')
{
@ -204,6 +213,8 @@ if ($result)
}
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
print '<div class="div-table-responsive">';
print '<table class="liste" width="100%">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"e.dateevent","","",'align="left"',$sortfield,$sortorder);
@ -303,7 +314,10 @@ if ($result)
if ($usefilter) print '<tr><td colspan="6">'.$langs->trans("NoEventFoundWithCriteria").'</td></tr>';
else print '<tr><td colspan="6">'.$langs->trans("NoEventOrNoAuditSetup").'</td></tr>';
}
print "</table></form>";
print "</table>";
print "</div>";
print "</form>";
$db->free($result);
}
else

View File

@ -52,6 +52,7 @@ $template_dir = DOL_DOCUMENT_ROOT.'/core/tpl/';
$interfaces = new Interfaces($db);
$triggers = $interfaces->getTriggersList();
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder">
<tr class="liste_titre">
<td colspan="2">'.$langs->trans("File").'</td>
@ -66,9 +67,9 @@ foreach ($triggers as $trigger)
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td valign="top" width="14" align="center">'.$trigger['picto'].'</td>';
print '<td valign="top">'.$trigger['file'].'</td>';
print '<td class="tdtop">'.$trigger['file'].'</td>';
print '<td valign="top" align="center">'.$trigger['status'].'</td>';
print '<td valign="top">';
print '<td class="tdtop">';
$text=$trigger['info'];
$text.="<br>\n<strong>".$langs->trans("File")."</strong>:<br>\n".$trigger['relpath'];
//$text.="\n".$langs->trans("ExternalModule",$trigger['isocreorexternal']);
@ -78,6 +79,7 @@ foreach ($triggers as $trigger)
}
print '</table>';
print '</div>';
llxFooter();

View File

@ -76,12 +76,34 @@ class DolibarrApiAccess implements iAuthenticate
$userClass = Defaults::$userIdentifierClass;
/*foreach ($_SERVER as $key => $val)
{
dol_syslog($key.' - '.$val);
}*/
// api key can be provided in url with parameter api_key=xxx or ni header with header DOLAPIKEY:xxx
$api_key = '';
if (isset($_GET['api_key']))
{
// TODO Add option to disable use of api key on url. Return errors if used.
$api_key = $_GET['api_key']; // For backward compatibility
}
if (isset($_GET['DOLAPIKEY']))
{
// TODO Add option to disable use of api key on url. Return errors if used.
$api_key = $_GET['DOLAPIKEY']; // With GET method
}
if (isset($_SERVER['HTTP_DOLAPIKEY']))
{
$api_key = $_SERVER['HTTP_DOLAPIKEY']; // With header method (recommanded)
}
if ($api_key)
{
$sql = "SELECT u.login, u.datec, u.api_key, ";
$sql.= " u.tms as date_modification, u.entity";
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
$sql.= " WHERE u.api_key = '".$db->escape($_GET['api_key'])."'";
$sql.= " WHERE u.api_key = '".$db->escape($api_key)."'";
$result = $db->query($sql);
if ($result)
@ -97,8 +119,8 @@ class DolibarrApiAccess implements iAuthenticate
throw new RestException(503, 'Error when fetching user api_key :'.$db->error_msg);
}
if ($stored_key != $_GET['api_key']) {
$userClass::setCacheIdentifier($_GET['api_key']);
if ($stored_key != $api_key) {
$userClass::setCacheIdentifier($api_key);
return false;
}
@ -121,7 +143,7 @@ class DolibarrApiAccess implements iAuthenticate
}
else
{
throw new RestException(401, "Failed to login to API. No parameter 'api_key' provided");
throw new RestException(401, "Failed to login to API. No parameter 'DOLAPIKEY' on HTTP header (neither in URL).");
}
$userClass::setCacheIdentifier(static::$role);

View File

@ -34,12 +34,14 @@ class Login
/**
* Login
*
* Log user with username and password
*
* @param string $login Username
* Request the API token for a couple username / password.
* Using method POST is recommanded for security reasons (method GET is often logged by default by web servers with parameters so with login and pass into server log file).
* Both method are provided for developer conveniance. Best is to not use at all the login API method and enter directly the "api_key" into field at the top right of page (Note: "api_key" can be found/set on the user page).
*
* @param string $login User login
* @param string $password User password
* @param int $entity Entity (when multicompany module is used). Empty means 1=first company.
* @param int $reset Reset token (0=get current token, 1=ask a new token, meaning that all future access using current token will failed)
* @param int $reset Reset token (0=get current token, 1=ask a new token and canceled old token. This means access using current existing API token of user will fails: new token will be required for new access)
* @return array Response status and user token
*
* @throws RestException

View File

@ -56,6 +56,16 @@ if (empty($conf->global->MAIN_MODULE_API))
exit;
}
// Test if explorer is not disabled
if (preg_match('/api\/index\.php\/explorer/', $_SERVER["PHP_SELF"]) && ! empty($conf->global->API_EXPLORER_DISABLED))
{
$langs->load("admin");
dol_syslog("Call Dolibarr API interfaces with module REST disabled");
print $langs->trans("WarningAPIExplorerDisabled").'.<br><br>';
exit;
}
$api = new DolibarrApi($db);

View File

@ -44,7 +44,7 @@ $userid=GETPOST("userid","int");
$position=GETPOST("position","int");
$backtopage=GETPOST('backtopage','alpha');
$bookmark=new Bookmark($db);
$object=new Bookmark($db);
/*
@ -69,14 +69,14 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update')
exit;
}
if ($action == 'update') $bookmark->fetch(GETPOST("id",'int'));
if ($action == 'update') $object->fetch(GETPOST("id",'int'));
// Check if null because user not admin can't set an user and send empty value here.
if(!empty($userid))
$bookmark->fk_user=$userid;
$bookmark->title=$title;
$bookmark->url=$url;
$bookmark->target=$target;
$bookmark->position=$position;
$object->fk_user=$userid;
$object->title=$title;
$object->url=$url;
$object->target=$target;
$object->position=$position;
if (! $title) {
$error++;
@ -90,10 +90,10 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update')
if (! $error)
{
$bookmark->favicon='none';
$object->favicon='none';
if ($action == 'update') $res=$bookmark->update();
else $res=$bookmark->create();
if ($action == 'update') $res=$object->update();
else $res=$object->create();
if ($res > 0)
{
@ -103,14 +103,14 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update')
}
else
{
if ($bookmark->errno == 'DB_ERROR_RECORD_ALREADY_EXISTS')
if ($object->errno == 'DB_ERROR_RECORD_ALREADY_EXISTS')
{
$langs->load("errors");
setEventMessages($langs->transnoentities("WarningBookmarkAlreadyExists"), null, 'warnings');
}
else
{
setEventMessages($bookmark->error, $bookmark->errors, 'errors');
setEventMessages($object->error, $object->errors, 'errors');
}
$action = $invertedaction;
}
@ -133,7 +133,7 @@ $form=new Form($db);
$head = array();
$h=1;
$head[$h][0] = $_SERVER["PHP_SELF"].($bookmark->id?'id='.$bookmark->id:'');
$head[$h][0] = $_SERVER["PHP_SELF"].($object->id?'id='.$object->id:'');
$head[$h][1] = $langs->trans("Card");
$head[$h][2] = 'card';
$h++;
@ -157,7 +157,7 @@ if ($action == 'create')
print '<table class="border" width="100%">';
print '<tr><td width="25%" class="fieldrequired">'.$langs->trans("BookmarkTitle").'</td><td><input class="flat" name="title" size="30" value="'.$title.'"></td><td class="hideonsmartphone">'.$langs->trans("SetHereATitleForLink").'</td></tr>';
print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("BookmarkTitle").'</td><td><input class="flat" name="title" size="30" value="'.$title.'"></td><td class="hideonsmartphone">'.$langs->trans("SetHereATitleForLink").'</td></tr>';
print '<tr><td class="fieldrequired">'.$langs->trans("UrlOrLink").'</td><td><input class="flat" name="url" size="50" value="'.$url.'"></td><td class="hideonsmartphone">'.$langs->trans("UseAnExternalHttpLinkOrRelativeDolibarrLink").'</td></tr>';
@ -172,7 +172,7 @@ if ($action == 'create')
// Position
print '<tr><td>'.$langs->trans("Position").'</td><td>';
print '<input class="flat" name="position" size="5" value="'.(isset($_POST["position"])?$_POST["position"]:$bookmark->position).'">';
print '<input class="flat" name="position" size="5" value="'.(isset($_POST["position"])?$_POST["position"]:$object->position).'">';
print '</td><td class="hideonsmartphone">&nbsp;</td></tr>';
print '</table>';
@ -193,8 +193,9 @@ if ($id > 0 && ! preg_match('/^add/i',$action))
/*
* Fact bookmark mode or visually edition
*/
$bookmark->fetch($id);
$object->fetch($id);
$hselected = 'card';
$head = array(
array(
'',
@ -208,18 +209,22 @@ if ($id > 0 && ! preg_match('/^add/i',$action))
print '<form name="edit" method="POST" action="'.$_SERVER["PHP_SELF"].'" enctype="multipart/form-data">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="update">';
print '<input type="hidden" name="id" value="'.$bookmark->id.'">';
print '<input type="hidden" name="urlsource" value="'.DOL_URL_ROOT.'/bookmarks/card.php?id='.$bookmark->id.'">';
print '<input type="hidden" name="id" value="'.$object->id.'">';
print '<input type="hidden" name="urlsource" value="'.DOL_URL_ROOT.'/bookmarks/card.php?id='.$object->id.'">';
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
}
dol_fiche_head($head, $hselected, $langs->trans("Bookmark"),0,'bookmark');
dol_fiche_head($head, $hselected, $langs->trans("Bookmark"),0,'bookmark');
$linkback = '<a href="'.DOL_URL_ROOT.'/bookmarks/list.php">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', '' , '', 0, '', '', 0);
print '<div class="underbanner clearboth"></div>';
print '<table class="border" width="100%">';
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td>'.$bookmark->ref.'</td></tr>';
print '<tr><td>';
print '<tr><td class="titlefield">';
if ($action == 'edit') {
print '<span class="fieldrequired">';
}
@ -231,8 +236,8 @@ if ($id > 0 && ! preg_match('/^add/i',$action))
}
print '</td><td>';
if ($action == 'edit') print '<input class="flat minwidth200" name="title" value="'.(isset($_POST["title"])?GETPOST("title",'',2):$bookmark->title).'">';
else print $bookmark->title;
if ($action == 'edit') print '<input class="flat minwidth200" name="title" value="'.(isset($_POST["title"])?GETPOST("title",'',2):$object->title).'">';
else print $object->title;
print '</td></tr>';
print '<tr><td>';
@ -244,34 +249,34 @@ if ($id > 0 && ! preg_match('/^add/i',$action))
print '</span>';
}
print '</td><td>';
if ($action == 'edit') print '<input class="flat" name="url" size="80" value="'.(isset($_POST["url"])?$_POST["url"]:$bookmark->url).'">';
else print '<a href="'.(preg_match('/^http/i',$bookmark->url)?$bookmark->url:DOL_URL_ROOT.$bookmark->url).'"'.($bookmark->target?' target="_blank"':'').'>'.$bookmark->url.'</a>';
if ($action == 'edit') print '<input class="flat" name="url" size="80" value="'.(isset($_POST["url"])?$_POST["url"]:$object->url).'">';
else print '<a href="'.(preg_match('/^http/i',$object->url)?$object->url:DOL_URL_ROOT.$object->url).'"'.($object->target?' target="_blank"':'').'>'.$object->url.'</a>';
print '</td></tr>';
print '<tr><td>'.$langs->trans("BehaviourOnClick").'</td><td>';
if ($action == 'edit')
{
$liste=array(1=>$langs->trans("OpenANewWindow"),0=>$langs->trans("ReplaceWindow"));
print $form->selectarray('target',$liste,isset($_POST["target"])?$_POST["target"]:$bookmark->target);
print $form->selectarray('target',$liste,isset($_POST["target"])?$_POST["target"]:$object->target);
}
else
{
if ($bookmark->target == 0) print $langs->trans("ReplaceWindow");
if ($bookmark->target == 1) print $langs->trans("OpenANewWindow");
if ($object->target == 0) print $langs->trans("ReplaceWindow");
if ($object->target == 1) print $langs->trans("OpenANewWindow");
}
print '</td></tr>';
print '<tr><td>'.$langs->trans("Owner").'</td><td>';
if ($action == 'edit' && $user->admin)
{
print $form->select_dolusers(isset($_POST['userid'])?$_POST['userid']:($bookmark->fk_user?$bookmark->fk_user:''), 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
print $form->select_dolusers(isset($_POST['userid'])?$_POST['userid']:($object->fk_user?$object->fk_user:''), 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
}
else
{
if ($bookmark->fk_user)
if ($object->fk_user)
{
$fuser=new User($db);
$fuser->fetch($bookmark->fk_user);
$fuser->fetch($object->fk_user);
print $fuser->getNomUrl(1);
}
else
@ -283,12 +288,12 @@ if ($id > 0 && ! preg_match('/^add/i',$action))
// Position
print '<tr><td>'.$langs->trans("Position").'</td><td>';
if ($action == 'edit') print '<input class="flat" name="position" size="5" value="'.(isset($_POST["position"])?$_POST["position"]:$bookmark->position).'">';
else print $bookmark->position;
if ($action == 'edit') print '<input class="flat" name="position" size="5" value="'.(isset($_POST["position"])?$_POST["position"]:$object->position).'">';
else print $object->position;
print '</td></tr>';
// Date creation
print '<tr><td>'.$langs->trans("DateCreation").'</td><td>'.dol_print_date($bookmark->datec,'dayhour').'</td></tr>';
print '<tr><td>'.$langs->trans("DateCreation").'</td><td>'.dol_print_date($object->datec,'dayhour').'</td></tr>';
print '</table>';
@ -308,13 +313,13 @@ if ($id > 0 && ! preg_match('/^add/i',$action))
// Edit
if ($user->rights->bookmark->creer && $action != 'edit')
{
print " <a class=\"butAction\" href=\"".$_SERVER["PHP_SELF"]."?id=".$bookmark->id."&amp;action=edit\">".$langs->trans("Edit")."</a>\n";
print " <a class=\"butAction\" href=\"".$_SERVER["PHP_SELF"]."?id=".$object->id."&amp;action=edit\">".$langs->trans("Edit")."</a>\n";
}
// Remove
if ($user->rights->bookmark->supprimer && $action != 'edit')
{
print " <a class=\"butActionDelete\" href=\"list.php?bid=".$bookmark->id."&amp;action=delete\">".$langs->trans("Delete")."</a>\n";
print " <a class=\"butActionDelete\" href=\"list.php?bid=".$object->id."&amp;action=delete\">".$langs->trans("Delete")."</a>\n";
}
print '</div>';

View File

@ -26,8 +26,13 @@
/**
* Class to manage bookmarks
*/
class Bookmark
class Bookmark extends CommonObject
{
public $element='bookmark';
public $table_element='bookmark';
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
public $picto = 'bookmark';
var $db;
var $id;
@ -228,4 +233,15 @@ class Bookmark
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
}
/**
* Return label of contact status
*
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Label of contact status
*/
function getLibStatut($mode)
{
return '';
}
}

View File

@ -34,6 +34,8 @@ if ( $_SESSION['uid'] <= 0 )
exit;
}
$langs->load("companies");
$langs->load("compta");
$langs->load("cashdesk");
@ -41,6 +43,8 @@ $langs->load("cashdesk");
* View
*/
$form = new Form($db);
//header("Content-type: text/html; charset=UTF-8");
//header("Content-type: text/html; charset=".$conf->file->character_set_client);

View File

@ -22,8 +22,21 @@
*/
?>
<!-- affPied.php -->
<div class="pied">
<?php
<?php
// Wrapper to show tooltips
if (! empty($conf->use_javascript_ajax) && empty($conf->dol_no_mouse_hover))
{
print "\n<!-- JS CODE TO ENABLE tipTip on all object with class classfortooltip -->\n";
print '<script type="text/javascript">
jQuery(document).ready(function () {
jQuery(".classfortooltip").tipTip({maxWidth: "'.dol_size(($conf->browser->layout == 'phone' ? 400 : 700),'width').'px", edgeOffset: 10, delay: 50, fadeIn: 50, fadeOut: 50});
});
</script>' . "\n";
}
printCommonFooter('private');
?>
</div>

View File

@ -19,7 +19,6 @@ body {
color: #333;
margin: 0;
padding: 0;
text-align: center;
}
p {
@ -115,7 +114,7 @@ li.menu_choix0 {
float: right;
}
/* ------------------- R<EFBFBD>capitulatif des articles ------------------- */
/* ------------------- Remind of products ------------------- */
.liste_articles {
min-width: 215px;
float: right;
@ -212,6 +211,10 @@ p.titre {
max-width: 900px;
}
.blocksellfinished {
min-width: 215px;
margin-top: 8px;
}
.titre1 {
font-weight: bold;
color: #ff9900;

View File

@ -0,0 +1,61 @@
/*
* TPV ticket.css
*/
body {
font-size: 1.5em;
position: relative;
}
.entete { /* position: relative; */
}
.address { /* float: left; */
font-size: 12px;
}
.date_heure {
position: absolute;
top: 0;
right: 0;
font-size: 16px;
}
.infos {
position: relative;
}
.liste_articles {
width: 100%;
border-bottom: 1px solid #000;
text-align: center;
}
.liste_articles tr.titres th {
border-bottom: 1px solid #000;
}
.liste_articles td.total {
text-align: right;
}
.totaux {
margin-top: 20px;
width: 30%;
float: right;
text-align: right;
}
.lien {
position: absolute;
top: 0;
left: 0;
display: none;
}
@media print {
.lien {
display: none;
}
}

View File

@ -28,11 +28,13 @@ require_once DOL_DOCUMENT_ROOT.'/cashdesk/class/Facturation.class.php';
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
$action = GETPOST('action','alpha');
$obj_facturation = unserialize($_SESSION['serObjFacturation']);
unset ($_SESSION['serObjFacturation']);
switch ( $_GET['action'] )
switch($action)
{
default:
if ( $_POST['hdnSource'] != 'NULL' )
@ -162,6 +164,16 @@ switch ( $_GET['action'] )
break;
case 'change_thirdparty': // We have clicked on button "Modify" a thirdparty
$newthirdpartyid = GETPOST('CASHDESK_ID_THIRDPARTY','int');
if ($newthirdpartyid > 0)
{
$_SESSION["CASHDESK_ID_THIRDPARTY"] = $newthirdpartyid;
}
$redirection = DOL_URL_ROOT.'/cashdesk/affIndex.php?menutpl=facturation';
break;
case 'ajout_article': // We have clicked on button "Add product"
if (! empty($obj_facturation->id)) // A product was previously selected and stored in session, so we can add it

View File

@ -59,7 +59,18 @@ top_htmlhead('','',0,0,'',$arrayofcss);
<div class="conteneur_img_droite">
<div class="menu_principal hideonsmartphone">
<div class="logo"><?php print '<img class="logopos" alt="Logo company" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode('/thumbs/'.$mysoc->logo_small).'">'; ?></div>
<div class="logo">
<?php
if (! empty($mysoc->logo_small))
{
print '<img class="logopos" alt="Logo company" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode('/thumbs/'.$mysoc->logo_small).'">';
}
else
{
print '<div class="logopos">'.$mysoc->name.'</div>';
}
?>
</div>
</div>
<div class="contenu">

View File

@ -23,12 +23,12 @@ include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
include_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
if (!empty($_SESSION["CASHDESK_ID_THIRDPARTY"]))
/*if (!empty($_SESSION["CASHDESK_ID_THIRDPARTY"]))
{
$company=new Societe($db);
$company->fetch($_SESSION["CASHDESK_ID_THIRDPARTY"]);
$companyLink = $company->getNomUrl(1);
}
}*/
if (!empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CASH"]))
{
$bankcash=new Account($db);
@ -59,6 +59,7 @@ if (!empty($_SESSION["CASHDESK_ID_WAREHOUSE"]) && ! empty($conf->stock->enabled)
$langs->load("cashdesk");
$langs->load("main");
print "\n".'<!-- menu.tpl.php -->'."\n";
print '<div class="menu_bloc">';
print '<ul class="menu">';
// Link to new sell
@ -68,7 +69,13 @@ print '<li class="menu_choix2"><a href=".." target="backoffice"><span class="hid
// Disconnect
print '<li class="menu_choix0">'.$langs->trans("User").': '.$_SESSION['firstname'].' '.$_SESSION['lastname'];
print ' <a href="deconnexion.php">'.img_picto($langs->trans('Logout'), 'logout.png').'</a><br>';
print $langs->trans("CashDeskThirdParty").': '.$companyLink.'<br>';
print '<form id="frmThirdparty" class="formulaire1 inline-block" method="post" action="facturation_verif.php?action=change_thirdparty">';
print $langs->trans("CashDeskThirdParty").': ';
print $form->select_company($_SESSION["CASHDESK_ID_THIRDPARTY"], 'CASHDESK_ID_THIRDPARTY', 's.client IN (1,3)', '', 0, 0, null, 0, 'valignmiddle inline-block');
print '<input class="button bouton_change_thirdparty inline-block valignmiddle" type="submit" id="bouton_change_thirdparty" value="'.$langs->trans("Modify").'">';
//print $companyLink;
print '<br>';
print '</form>';
/*print $langs->trans("CashDeskBankCash").': '.$bankcashLink.'<br>';
print $langs->trans("CashDeskBankCB").': '.$bankcbLink.'<br>';
print $langs->trans("CashDeskBankCheque").': '.$bankchequeLink.'<br>';*/
@ -78,3 +85,4 @@ if (!empty($_SESSION["CASHDESK_ID_WAREHOUSE"]) && ! empty($conf->stock->enabled)
}
print '</li></ul>';
print '</div>';
print "\n".'<!-- menu.tpl.php end -->'."\n";

View File

@ -28,130 +28,84 @@ $object->fetch($facid);
?>
<html>
<head>
<title><?php echo $langs->trans('PrintTicket') ?></title>
<style type="text/css">
body {
font-size: 1.5em;
position: relative;
}
.entete { /* position: relative; */
}
.address { /* float: left; */
font-size: 12px;
}
.date_heure {
position: absolute;
top: 0;
right: 0;
font-size: 16px;
}
.infos {
position: relative;
}
.liste_articles {
width: 100%;
border-bottom: 1px solid #000;
text-align: center;
}
.liste_articles tr.titres th {
border-bottom: 1px solid #000;
}
.liste_articles td.total {
text-align: right;
}
.totaux {
margin-top: 20px;
width: 30%;
float: right;
text-align: right;
}
.lien {
position: absolute;
top: 0;
left: 0;
display: none;
}
@media print {
.lien {
display: none;
}
}
</style>
<head>
<title><?php echo $langs->trans('PrintTicket') ?></title>
<link rel="stylesheet" type="text/css" href="<?php echo DOL_URL_ROOT;?>/cashdesk/css/ticket.css">
</head>
<body>
<div class="entete">
<div class="logo"><?php print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode('/thumbs/'.$mysoc->logo_small).'">'; ?>
</div>
<div class="infos">
<p class="address"><?php echo $mysoc->name; ?><br>
<?php print dol_nl2br(dol_format_address($mysoc)); ?><br>
</p>
<div class="logo">
<?php print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode('/thumbs/'.$mysoc->logo_small).'">'; ?>
</div>
<div class="infos">
<p class="address"><?php echo $mysoc->name; ?><br>
<?php print dol_nl2br(dol_format_address($mysoc)); ?><br>
</p>
<p class="date_heure"><?php
// Recuperation et affichage de la date et de l'heure
$now = dol_now();
print dol_print_date($now,'dayhourtext').'<br>';
print $object->ref;
?></p>
</div>
<p class="date_heure"><?php
// Recuperation et affichage de la date et de l'heure
$now = dol_now();
print dol_print_date($now,'dayhourtext').'<br>';
print $object->ref;
?></p>
</div>
</div>
<br>
<table class="liste_articles">
<thead>
<tr class="titres">
<th><?php print $langs->trans("Code"); ?></th>
<th><?php print $langs->trans("Label"); ?></th>
<th><?php print $langs->trans("Qty"); ?></th>
<th><?php print $langs->trans("Discount").' (%)'; ?></th>
<th><?php print $langs->trans("TotalHT"); ?></th>
<th><?php print $langs->trans("Code"); ?></th>
<th><?php print $langs->trans("Label"); ?></th>
<th><?php print $langs->trans("Qty"); ?></th>
<th><?php print $langs->trans("Discount").' (%)'; ?></th>
<th><?php print $langs->trans("TotalHT"); ?></th>
</tr>
</thead>
<tbody>
<?php
<?php
$tab=array();
$tab=array();
$tab = $_SESSION['poscart'];
$tab_size=count($tab);
for($i=0;$i < $tab_size;$i++)
{
$remise = $tab[$i]['remise'];
echo ('<tr><td>'.$tab[$i]['ref'].'</td><td>'.$tab[$i]['label'].'</td><td>'.$tab[$i]['qte'].'</td><td>'.$tab[$i]['remise_percent'].'</td><td class="total">'.price(price2num($tab[$i]['total_ht'],'MT'),0,$langs,0,0,-1,$conf->currency).'</td></tr>'."\n");
?>
<tr>
<td><?php echo $tab[$i]['ref'];?></td>
<td><?php echo $tab[$i]['label'];?></td>
<td><?php echo $tab[$i]['qte'];?></td>
<td><?php echo $tab[$i]['remise_percent'];?></td>
<td class="total"><?php echo price(price2num($tab[$i]['total_ht'],'MT'),0,$langs,0,0,-1,$conf->currency);?></td>
</tr>
<?php
}
?>
?>
</tbody>
</table>
<table class="totaux">
<?php
echo '<tr><th class="nowrap">'.$langs->trans("TotalHT").'</th><td class="nowrap">'.price(price2num($obj_facturation->prixTotalHt(),'MT'),'',$langs,0,-1,-1,$conf->currency)."</td></tr>\n";
echo '<tr><th class="nowrap">'.$langs->trans("TotalVAT").'</th><td class="nowrap">'.price(price2num($obj_facturation->montantTva(),'MT'),'',$langs,0,-1,-1,$conf->currency)."</td></tr>\n";
echo '<tr><th class="nowrap">'.$langs->trans("TotalTTC").'</th><td class="nowrap">'.price(price2num($obj_facturation->prixTotalTtc(),'MT'),'',$langs,0,-1,-1,$conf->currency)."</td></tr>\n";
?>
<tr>
<th class="nowrap"><?php echo $langs->trans("TotalHT");?></th>
<td class="nowrap"><?php echo price(price2num($obj_facturation->prixTotalHt(),'MT'),'',$langs,0,-1,-1,$conf->currency)."\n";?></td>
</tr>
<tr>
<th class="nowrap"><?php echo $langs->trans("TotalVAT").'</th><td class="nowrap">'.price(price2num($obj_facturation->montantTva(),'MT'),'',$langs,0,-1,-1,$conf->currency)."\n";?></td>
</tr>
<tr>
<th class="nowrap"><?php echo ''.$langs->trans("TotalTTC").'</th><td class="nowrap">'.price(price2num($obj_facturation->prixTotalTtc(),'MT'),'',$langs,0,-1,-1,$conf->currency)."\n";?></td>
</tr>
</table>
<script type="text/javascript">
window.print();
window.print();
</script>
<a class="lien" href="#"
onclick="javascript: window.close(); return(false);"><?php echo $langs->trans("Close"); ?></a>
<a class="lien" href="#" onclick="javascript: window.close(); return(false);"><?php echo $langs->trans("Close"); ?></a>
</body>
</html>

View File

@ -18,6 +18,7 @@
$langs->load("main");
$langs->load("bills");
$langs->load("banks");
// Object $form must de defined

View File

@ -22,9 +22,10 @@ $langs->load("bills");
?>
<h3 class="titre1"><?php echo $langs->trans("SellFinished"); ?></h3><br>
<div class="blocksellfinished">
<div class="cadre_facturation">
<h3 class="titre1"><?php echo $langs->trans("SellFinished"); ?></h3><br>
<script type="text/javascript">
@ -45,3 +46,6 @@ $langs->load("bills");
<p><a class="lien1" href="#" onclick="Javascript: popupTicket(); return(false);"><?php echo $langs->trans("PrintTicket"); ?></a></p>
</div>
</div>
<br>

View File

@ -250,7 +250,7 @@ if ($user->rights->categorie->creer)
print'</td></tr>';
// Description
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td>';
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td>';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor=new DolEditor('description',$description,'',200,'dolibarr_notes','',false,true,$conf->global->FCKEDITOR_ENABLE_PRODUCTDESC,ROWS_6,'90%');
$doleditor->Create();

View File

@ -209,7 +209,7 @@ class Categories extends DolibarrApi
$sql.= ' AND s.rowid = sub.fk_categorie';
$sql.= ' AND sub.'.$subcol_name.' = '.$item;
$nbtotalofrecords = -1;
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$result = $db->query($sql);

View File

@ -124,7 +124,7 @@ class CategoryApi extends DolibarrApi
$sql.= ' WHERE s.entity IN ('.getEntity('category', 1).')';
$sql.= ' AND s.type='.array_search($type,CategoryApi::$TYPES);
$nbtotalofrecords = -1;
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$result = $db->query($sql);
@ -205,7 +205,7 @@ class CategoryApi extends DolibarrApi
$sql.= ' AND s.rowid = sub.fk_categorie';
$sql.= ' AND sub.'.$subcol_name.' = '.$item;
$nbtotalofrecords = -1;
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$result = $db->query($sql);

View File

@ -49,8 +49,10 @@ class Categorie extends CommonObject
const TYPE_MEMBER = 3; // TODO Replace this value with 'member'
const TYPE_CONTACT = 4; // TODO Replace this value with 'contact'
const TYPE_USER = 4; // categorie contact and user are same ! TODO Replace this value with 'user'
const TYPE_ACCOUNT = 5; // for bank account TODO Replace this value with 'account'
const TYPE_PROJECT = 6;
const TYPE_ACCOUNT = 5; // for bank account TODO Replace this value with 'account'
const TYPE_PROJECT = 6;
public $picto = 'category';
/**
* @var array ID mapping from type string
@ -205,6 +207,7 @@ class Categorie extends CommonObject
$res = $this->db->fetch_array($resql);
$this->id = $res['rowid'];
//$this->ref = $res['rowid'];
$this->fk_parent = $res['fk_parent'];
$this->label = $res['label'];
$this->description = $res['description'];
@ -1703,6 +1706,18 @@ class Categorie extends CommonObject
}
}
/**
* Return label of contact status
*
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Label of contact status
*/
function getLibStatut($mode)
{
return '';
}
/**
* Initialise an instance with random values.
* Used to build previews or test instances.

View File

@ -36,8 +36,6 @@ $langs->load("categories");
$langs->load("bills");
$mesg = '';
$id=GETPOST('id','int');
$ref=GETPOST('ref');
$type=GETPOST('type');
@ -105,33 +103,38 @@ if ($object->id)
else $title=$langs->trans("Category");
$head = categories_prepare_head($object,$type);
dol_fiche_head($head, 'photos', $title, 0, 'category');
dol_fiche_head($head, 'photos', $title, 0, 'category');
$linkback = '<a href="'.DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type.'">'.$langs->trans("BackToList").'</a>';
$object->ref = $object->label;
$morehtmlref='<br><div class="refidno"><a href="'.DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type.'">'.$langs->trans("Root").'</a> >> ';
$ways = $object->print_all_ways(" &gt;&gt; ", '', 1);
foreach ($ways as $way)
{
$morehtmlref.=$way."<br>\n";
}
$morehtmlref.='</div>';
dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref', 'ref', $morehtmlref, '', 0, '', '', 1);
/*
* Confirmation de la suppression de photo
*/
if ($action == 'delete')
{
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type.'&file='.$_GET["file"], $langs->trans('DeletePicture'), $langs->trans('ConfirmDeletePicture'), 'confirm_delete', '', 0, 1);
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type.'&file='.$_GET["file"], $langs->trans('DeletePicture'), $langs->trans('ConfirmDeletePicture'), 'confirm_delete', '', 0, 1);
}
print($mesg);
print '<br>';
print '<div class="underbanner clearboth"></div>';
print '<table class="border" width="100%">';
// Path of category
print '<tr><td class="titlefield notopnoleft">';
$ways = $object->print_all_ways(" &gt;&gt; ", '', 1);
print $langs->trans("Ref").'</td><td>';
print '<a href="'.DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type.'">'.$langs->trans("Root").'</a> >> ';
foreach ($ways as $way)
{
print $way."<br>\n";
}
print '</td></tr>';
// Description
print '<tr><td class="notopnoleft">';
print '<tr><td class="titlefield notopnoleft">';
print $langs->trans("Description").'</td><td>';
print dol_htmlentitiesbr($object->description);
print '</td></tr>';
@ -144,7 +147,7 @@ if ($object->id)
print "</table>\n";
print "</div>\n";
print dol_fiche_end();

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2010-2012 Destailleur Laurent <eldy@users.sourceforge.net>
* Copyright (C) 2010-2016 Destailleur Laurent <eldy@users.sourceforge.net>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -156,25 +156,40 @@ elseif ($type == Categorie::TYPE_PROJECT) $title=$langs->trans("ProjectsCatego
else $title=$langs->trans("Category");
$head = categories_prepare_head($object,$type);
// Calculate $cnt_trans
$cnt_trans = 0;
if (! empty($object->multilangs))
{
foreach ($object->multilangs as $key => $value)
{
$cnt_trans++;
}
}
dol_fiche_head($head, 'translation', $title, 0, 'category');
$linkback = '<a href="'.DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type.'">'.$langs->trans("BackToList").'</a>';
$object->ref = $object->label;
$morehtmlref='<br><div class="refidno"><a href="'.DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type.'">'.$langs->trans("Root").'</a> >> ';
$ways = $object->print_all_ways(" &gt;&gt; ", '', 1);
foreach ($ways as $way)
{
$morehtmlref.=$way."<br>\n";
}
$morehtmlref.='</div>';
dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref', 'ref', $morehtmlref, '', 0, '', '', 1);
print '<br>';
print '<div class="underbanner clearboth"></div>';
print '<table class="border" width="100%">';
// Reference
print '<tr>';
print '<td class="titlefield notopnoleft">';
$ways = $object->print_all_ways(" &gt;&gt; ", '', 1);
print $langs->trans("Ref").'</td><td>';
print '<a href="'.DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type.'">'.$langs->trans("Root").'</a> >> ';
foreach ($ways as $way)
{
print $way."<br>\n";
}
print '</td>';
print '</tr>';
// Description
print '<tr><td class="notopnoleft tdtop">';
print '<tr><td class="titlefield notopnoleft">';
print $langs->trans("Description").'</td><td>';
print dol_htmlentitiesbr($object->description);
print '</td></tr>';
@ -187,6 +202,32 @@ print '</td></tr>';
print '</table>';
dol_fiche_end();
/* ************************************************************************** */
/* */
/* Barre d'action */
/* */
/* ************************************************************************** */
print "\n<div class=\"tabsAction\">\n";
if ($action == '')
{
if ($user->rights->produit->creer || $user->rights->service->creer)
{
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=add&id='.$object->id.'">'.$langs->trans("Add").'</a>';
if ($cnt_trans > 0) print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=edit&id='.$object->id.'">'.$langs->trans("Update").'</a>';
}
}
print "\n</div>\n";
if ($action == 'edit')
{
//WYSIWYG Editor
@ -201,9 +242,9 @@ if ($action == 'edit')
{
foreach ($object->multilangs as $key => $value)
{
print "<br><b><u>".$langs->trans('Language_'.$key)." :</u></b><br>";
print "<br><b><u>".$langs->trans('Language_'.$key)." :</u></b><br>";
print '<table class="border" width="100%">';
print '<tr><td class="fieldtitlecreate fieldrequired">'.$langs->trans('Label').'</td><td><input name="libelle-'.$key.'" size="40" value="'.$object->multilangs[$key]["label"].'"></td></tr>';
print '<tr><td class="titlefield fieldrequired">'.$langs->trans('Label').'</td><td><input name="libelle-'.$key.'" size="40" value="'.$object->multilangs[$key]["label"].'"></td></tr>';
print '<tr><td class="tdtop">'.$langs->trans('Description').'</td><td>';
$doleditor = new DolEditor("desc-$key", $object->multilangs[$key]["description"], '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3,'90%');
$doleditor->Create();
@ -213,7 +254,9 @@ if ($action == 'edit')
print '</table>';
}
}
print '<br>';
print '<div class="center">';
print '<input type="submit" class="button" value="'.$langs->trans("Save").'">';
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
@ -223,46 +266,29 @@ if ($action == 'edit')
print '</form>';
}
else
else if ($action != 'add')
{
$cnt_trans = 0;
if (! empty($object->multilangs))
if ($cnt_trans) print '<div class="underbanner clearboth"></div>';
if (! empty($object->multilangs))
{
foreach ($object->multilangs as $key => $value)
{
$cnt_trans++;
$s=picto_from_langcode($key);
print "<br>".($s?$s.' ':'')." <b>".$langs->trans('Language_'.$key).":</b><br>";
$s=picto_from_langcode($key);
print '<table class="border" width="100%">';
print '<tr><td class="fieldtitlecreate>'.$langs->trans('Label').'</td><td>'.$object->multilangs[$key]["label"].'</td></tr>';
print '<tr><td class="tdtop">'.$langs->trans('Description').'</td><td>'.$object->multilangs[$key]["description"].'</td></tr>';
print '<tr><td>'.$langs->trans('Note').'</td><td>'.$object->multilangs[$key]["note"].'</td></tr>';
print '<tr class="liste_titre"><td colspan="2">'.($s?$s.' ':'')." <b>".$langs->trans('Language_'.$key).":</b> ".'<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&langtodelete='.$key.'">'.img_delete('', '').'</a></td></tr>';
print '<tr><td class="titlefield">'.$langs->trans('Label').'</td><td>'.$object->multilangs[$key]["label"].'</td></tr>';
print '<tr><td>'.$langs->trans('Description').'</td><td>'.$object->multilangs[$key]["description"].'</td></tr>';
if (! empty($conf->global->CATEGORY_USE_OTHER_FIELD_IN_TRANSLATION))
{
print '<tr><td>'.$langs->trans('Other').' ('.$langs->trans("NotUsed").')</td><td>'.$object->multilangs[$key]["other"].'</td></tr>';
}
print '</table>';
}
}
if (! $cnt_trans) print '<br>'. $langs->trans('NoTranslation');
if (! $cnt_trans && $action != 'add') print '<div class="opacitymedium">'. $langs->trans('NoTranslation').'</div>';
}
print "</div>\n";
/* ************************************************************************** */
/* */
/* Barre d'action */
/* */
/* ************************************************************************** */
print "\n<div class=\"tabsAction\">\n";
if ($action == '')
if ($user->rights->produit->creer || $user->rights->service->creer)
{
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=add&id='.$object->id.'">'.$langs->trans("Add").'</a>';
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=edit&id='.$object->id.'">'.$langs->trans("Update").'</a>';
}
print "\n</div>\n";
/*
* Form to add a new translation
@ -280,11 +306,11 @@ if ($action == 'add' && ($user->rights->produit->creer || $user->rights->service
print '<input type="hidden" name="id" value="'.$id.'">';
print '<table class="border" width="100%">';
print '<tr><td class="fieldtitlecreate fieldrequired">'.$langs->trans('Translation').'</td><td>';
print '<tr><td class="titlefield fieldrequired">'.$langs->trans('Translation').'</td><td>';
print $formadmin->select_language('','forcelangprod',0,$object->multilangs);
print '</td></tr>';
print '<tr><td class="fieldrequired">'.$langs->trans('Label').'</td><td><input name="libelle" size="40"></td></tr>';
print '<tr><td class="tdtop">'.$langs->trans('Description').'</td><td>';
print '<tr><td>'.$langs->trans('Description').'</td><td>';
$doleditor = new DolEditor('desc', '', '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3,'90%');
$doleditor->Create();
print '</td></tr>';

View File

@ -68,6 +68,7 @@ $extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array array
$hookmanager->initHooks(array('categorycard'));
/*
* Actions
*/
@ -190,8 +191,22 @@ else $title=$langs->trans("Category");
$head = categories_prepare_head($object,$type);
dol_fiche_head($head, 'card', $title, 0, 'category');
$linkback = '<a href="'.DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type.'">'.$langs->trans("BackToList").'</a>';
$object->ref = $object->label;
$morehtmlref='<br><div class="refidno"><a href="'.DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type.'">'.$langs->trans("Root").'</a> >> ';
$ways = $object->print_all_ways(" &gt;&gt; ", '', 1);
foreach ($ways as $way)
{
$morehtmlref.=$way."<br>\n";
}
$morehtmlref.='</div>';
dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref', 'ref', $morehtmlref, '', 0, '', '', 1);
/*
* Confirmation suppression
@ -202,21 +217,13 @@ if ($action == 'delete')
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;type='.$type, $langs->trans('DeleteCategory'), $langs->trans('ConfirmDeleteCategory'), 'confirm_delete', '', '', 1);
}
print '<br>';
print '<div class="underbanner clearboth"></div>';
print '<table width="100%" class="border">';
// Path of category
print '<tr><td class="titlefield notopnoleft">';
$ways = $object->print_all_ways(" &gt;&gt; ", '', 1);
print $langs->trans("Ref").'</td><td>';
print '<a href="'.DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type.'">'.$langs->trans("Root").'</a> >> ';
foreach ($ways as $way)
{
print $way."<br>\n";
}
print '</td></tr>';
// Description
print '<tr><td class="notopnoleft">';
print '<tr><td class="titlefield notopnoleft">';
print $langs->trans("Description").'</td><td>';
print dol_htmlentitiesbr($object->description);
print '</td></tr>';
@ -359,7 +366,7 @@ if ($object->type == Categorie::TYPE_PRODUCT)
print '<td class="nowrap" valign="top">';
print $prod->getNomUrl(1);
print "</td>\n";
print '<td valign="top">'.$prod->label."</td>\n";
print '<td class="tdtop">'.$prod->label."</td>\n";
// Link to delete from category
print '<td align="right">';
$typeid=$object->type;
@ -520,8 +527,8 @@ if ($object->type == Categorie::TYPE_MEMBER)
$member->ref=$member->login;
print $member->getNomUrl(1,0);
print "</td>\n";
print '<td valign="top">'.$member->lastname."</td>\n";
print '<td valign="top">'.$member->firstname."</td>\n";
print '<td class="tdtop">'.$member->lastname."</td>\n";
print '<td class="tdtop">'.$member->firstname."</td>\n";
// Link to delete from category
print '<td align="right">';
$typeid=$object->type;
@ -628,8 +635,8 @@ if ($object->type == Categorie::TYPE_ACCOUNT)
print '<td class="nowrap" valign="top">';
print $account->getNomUrl(1,0);
print "</td>\n";
print '<td valign="top">'.$account->bank."</td>\n";
print '<td valign="top">'.$account->number."</td>\n";
print '<td class="tdtop">'.$account->bank."</td>\n";
print '<td class="tdtop">'.$account->number."</td>\n";
// Link to delete from category
print '<td align="right">';
$typeid=$object->type;
@ -683,8 +690,8 @@ if ($object->type == Categorie::TYPE_PROJECT)
print '<td class="nowrap" valign="top">';
print $project->getNomUrl(1,0);
print "</td>\n";
print '<td valign="top">'.$project->ref."</td>\n";
print '<td valign="top">'.$project->title."</td>\n";
print '<td class="tdtop">'.$project->ref."</td>\n";
print '<td class="tdtop">'.$project->title."</td>\n";
// Link to delete from category
print '<td align="right">';
$typeid=$object->type;

View File

@ -245,7 +245,7 @@ if ($datestart > 0) $sql.= " AND a.datep BETWEEN '".$db->idate($datestart)."' AN
if ($dateend > 0) $sql.= " AND a.datep2 BETWEEN '".$db->idate($dateend)."' AND '".$db->idate($dateend+3600*24-1)."'";
$sql.= $db->order($sortfield,$sortorder);
$nbtotalofrecords = -1;
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$result = $db->query($sql);

View File

@ -85,7 +85,7 @@ $sql.= ' AND a.entity IN ('.getEntity('agenda', 1).')';
$sql.= " GROUP BY year, month, df";
$sql.= " ORDER BY year DESC, month DESC, df DESC";
$nbtotalofrecords = -1;
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$result = $db->query($sql);

View File

@ -253,7 +253,7 @@ if ($action == 'create')
print '<tr><td class="fieldrequired">'.$langs->trans('Label').'</td><td><input type="text" size="30" name="label" id="label" value="'.($object->label?$object->label:$langs->trans('RequiredField')).'"></td></tr>';
print '<tr><td class="fieldrequired">'.$langs->trans('Name').'</td><td><input type="text" size="30" name="name" id="name" value="'.($object->name?$object->name:$langs->trans('RequiredField')).'"></td></tr>';
print '<tr><td valign="top">'.$langs->trans('Address').'</td><td colspan="3"><textarea name="address" class="quatrevingtpercent" rows="3" wrap="soft">';
print '<tr><td class="tdtop">'.$langs->trans('Address').'</td><td colspan="3"><textarea name="address" class="quatrevingtpercent" rows="3" wrap="soft">';
print $object->address;
print '</textarea></td></tr>';
@ -353,7 +353,7 @@ elseif ($action == 'edit')
print '<tr><td>'.$langs->trans('AddressLabel').'</td><td colspan="3"><input type="text" size="40" name="label" value="'.$object->label.'"></td></tr>';
print '<tr><td>'.$langs->trans('Name').'</td><td colspan="3"><input type="text" size="40" name="name" value="'.$object->name.'"></td></tr>';
print '<tr><td valign="top">'.$langs->trans('Address').'</td><td colspan="3"><textarea name="address" class="quatrevingtpercent" rows="3" wrap="soft">';
print '<tr><td class="tdtop">'.$langs->trans('Address').'</td><td colspan="3"><textarea name="address" class="quatrevingtpercent" rows="3" wrap="soft">';
print $object->address;
print '</textarea></td></tr>';

View File

@ -366,6 +366,21 @@ if ($id > 0)
print '</td>';
print '</tr>';
// Max outstanding bill
if ($object->client)
{
print '<tr class="nowrap">';
print '<td>';
print $form->editfieldkey("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer);
print '</td><td>';
$limit_field_type = (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE)) ? 'numeric' : 'amount';
print $form->editfieldval("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer,$limit_field_type,($object->outstanding_limit != '' ? price($object->outstanding_limit) : ''));
//if (empty($object->outstanding_limit)) print $langs->trans("NoLimit");
print '</td>';
print '</tr>';
}
// Multiprice level
if (! empty($conf->global->PRODUIT_MULTIPRICES))
{
@ -493,48 +508,92 @@ if ($id > 0)
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
$boxstat = '';
// Nbre max d'elements des petites listes
$MAXLIST=$conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
// Lien recap
$outstandingBills = $object->get_OutstandingBill();
$warn = '';
if ($object->outstanding_limit != '' && $object->outstanding_limit < $outstandingBills)
$boxstat.='<div class="box">';
$boxstat.='<table summary="'.dol_escape_htmltag($langs->trans("DolibarrStateBoard")).'" class="noborder boxtable" width="100%">';
$boxstat.='<tr class="impair"><td colspan="2" class="tdboxstats nohover">';
if ($conf->propal->enabled)
{
$warn = img_warning($langs->trans("OutstandingBillReached"));
// Box proposals
$tmp = $object->getOutstandingProposals();
$outstandingOpened=$tmp['opened'];
$outstandingTotal=$tmp['total_ht'];
$outstandingTotalIncTax=$tmp['total_ttc'];
$text=$langs->trans("OverAllProposals");
$link='';
$icon='bill';
if ($link) $boxstat.='<a href="'.$link.'" class="boxstatsindicator thumbstat nobold nounderline">';
$boxstat.='<div class="boxstats">';
$boxstat.='<span class="boxstatstext">'.img_object("",$icon).' '.$text.'</span><br>';
$boxstat.='<span class="boxstatsindicator">'.price($outstandingTotal, 1, $langs, 1, -1, -1, $conf->currency).'</span>';
$boxstat.='</div>';
if ($link) $boxstat.='</a>';
}
if ($conf->commande->enabled)
{
// Box proposals
$tmp = $object->getOutstandingOrders();
$outstandingOpened=$tmp['opened'];
$outstandingTotal=$tmp['total_ht'];
$outstandingTotalIncTax=$tmp['total_ttc'];
$text=$langs->trans("OverAllOrders");
$link='';
$icon='bill';
if ($link) $boxstat.='<a href="'.$link.'" class="boxstatsindicator thumbstat nobold nounderline">';
$boxstat.='<div class="boxstats">';
$boxstat.='<span class="boxstatstext">'.img_object("",$icon).' '.$text.'</span><br>';
$boxstat.='<span class="boxstatsindicator">'.price($outstandingTotal, 1, $langs, 1, -1, -1, $conf->currency).'</span>';
$boxstat.='</div>';
if ($link) $boxstat.='</a>';
}
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Summary").'</td>';
print '<td align="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/compta/recap-compta.php?socid='.$object->id.'">'.$langs->trans("ShowCustomerPreview").'</a></td>';
print '</tr>';
// Max outstanding bill
if ($object->client)
if ($conf->facture->enabled)
{
print '<tr class="impair">';
print '<td>';
print $form->editfieldkey("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer);
print '</td><td>';
$limit_field_type = (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE)) ? 'numeric' : 'amount';
print $form->editfieldval("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer,$limit_field_type,($object->outstanding_limit != '' ? price($object->outstanding_limit) : ''));
//if (empty($object->outstanding_limit)) print $langs->trans("NoLimit");
print '</td>';
print '</tr>';
$tmp = $object->getOutstandingBills();
$outstandingOpened=$tmp['opened'];
$outstandingTotal=$tmp['total_ht'];
$outstandingTotalIncTax=$tmp['total_ttc'];
$text=$langs->trans("OverAllInvoices");
$link='';
$icon='bill';
if ($link) $boxstat.='<a href="'.$link.'" class="boxstatsindicator thumbstat nobold nounderline">';
$boxstat.='<div class="boxstats">';
$boxstat.='<span class="boxstatstext">'.img_object("",$icon).' '.$text.'</span><br>';
$boxstat.='<span class="boxstatsindicator">'.price($outstandingTotal, 1, $langs, 1, -1, -1, $conf->currency).'</span>';
$boxstat.='</div>';
if ($link) $boxstat.='</a>';
// Box outstanding bill
$warn = '';
if ($object->outstanding_limit != '' && $object->outstanding_limit < $outstandingOpened)
{
$warn = img_warning($langs->trans("OutstandingBillReached"));
}
$text=$langs->trans("CurrentOutstandingBill");
$link=DOL_URL_ROOT.'/compta/recap-compta.php?socid='.$object->id;
$icon='bill';
if ($link) $boxstat.='<a href="'.$link.'" class="boxstatsindicator thumbstat nobold nounderline">';
$boxstat.='<div class="boxstats">';
$boxstat.='<span class="boxstatstext">'.img_object("",$icon).' '.$text.'</span><br>';
$boxstat.='<span class="boxstatsindicator'.($outstandingOpened>0?' amountremaintopay':'').'">'.price($outstandingOpened).$warn.'</span>';
$boxstat.='</div>';
if ($link) $boxstat.='</a>';
}
// Outstanding bill
print '<tr class="pair">';
print '<td>'.$langs->trans("CurrentOutstandingBill").'</td>';
print '<td>'.price($outstandingBills).$warn.'</td>';
print '</tr>';
$boxstat.='</td></tr>';
$boxstat.='</table>';
$boxstat.='</div>';
print '</table>';
print '<br>';
print $boxstat;
$now=dol_now();
/*
@ -776,7 +835,9 @@ if ($id > 0)
print '<tr class="liste_titre">';
print '<td colspan="6"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastContracts",($num<=$MAXLIST?"":$MAXLIST)).'</td>';
print '<td align="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/contrat/list.php?socid='.$object->id.'">'.$langs->trans("AllContracts").' <span class="badge">'.$num.'</span></a></td></tr></table></td>';
print '<td align="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/contrat/list.php?socid='.$object->id.'">'.$langs->trans("AllContracts").' <span class="badge">'.$num.'</span></a></td>';
//print '<td width="20px" align="right"><a href="'.DOL_URL_ROOT.'/contract/stats/index.php?socid='.$object->id.'">'.img_picto($langs->trans("Statistics"),'stats').'</a></td>';
print '</tr></table></td>';
print '</tr>';
}
$i = 0;
@ -837,7 +898,9 @@ if ($id > 0)
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastInterventions",($num<=$MAXLIST?"":$MAXLIST)).'</td><td align="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/fichinter/list.php?socid='.$object->id.'">'.$langs->trans("AllInterventions").' <span class="badge">'.$num.'</span></td></tr></table></td>';
print '<td colspan="3"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastInterventions",($num<=$MAXLIST?"":$MAXLIST)).'</td><td align="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/fichinter/list.php?socid='.$object->id.'">'.$langs->trans("AllInterventions").' <span class="badge">'.$num.'</span></td>';
print '<td width="20px" align="right"><a href="'.DOL_URL_ROOT.'/fichinter/stats/index.php?socid='.$object->id.'">'.img_picto($langs->trans("Statistics"),'stats').'</a></td>';
print '</tr></table></td>';
print '</tr>';
$var=!$var;
}
@ -1007,7 +1070,15 @@ if ($id > 0)
if (! empty($conf->facture->enabled))
{
if ($user->rights->facture->creer && $object->status==1)
if (empty($user->rights->facture->creer))
{
print '<div class="inline-block divButAction"><a class="butActionRefused" title="'.dol_escape_js($langs->trans("NotAllowed")).'" href="#">'.$langs->trans("AddBill").'</a></div>';
}
else if ($object->status != 1)
{
print '<div class="inline-block divButAction"><a class="butActionRefused" title="'.dol_escape_js($langs->trans("ThirdPartyIsClosed")).'" href="#">'.$langs->trans("AddBill").'</a></div>';
}
else
{
$langs->load("bills");
$langs->load("orders");
@ -1022,10 +1093,6 @@ if ($id > 0)
else print '<div class="inline-block divButAction"><a class="butActionRefused" title="'.dol_escape_js($langs->trans("ThirdPartyMustBeEditAsCustomer")).'" href="#">'.$langs->trans("AddBill").'</a></div>';
}
else
{
print '<div class="inline-block divButAction"><a class="butActionRefused" title="'.dol_escape_js($langs->trans("NotAllowed")).'" href="#">'.$langs->trans("AddBill").'</a></div>';
}
}
}

View File

@ -758,7 +758,7 @@ else
// MAILING_NO_USING_PHPMAIL may be defined or not.
// MAILING_LIMIT_SENDBYWEB is always defined to something != 0 (-1=forbidden).
// MAILING_LIMIT_SENDBYCLI may be defined ot not (-1=forbidden, 0=no limit).
// MAILING_LIMIT_SENDBYCLI may be defined ot not (-1=forbidden, 0 or undefined=no limit).
if (! empty($conf->global->MAILING_NO_USING_PHPMAIL) && $sendingmode == 'mail')
{
// EMailing feature may be a spam problem, so when you host several users/instance, having this option may force each user to use their own SMTP agent.
@ -772,8 +772,8 @@ else
}
else if ($conf->global->MAILING_LIMIT_SENDBYWEB == '-1')
{
if (! empty($conf->global->MAILING_LIMIT_WARNING_PHPMAIL) && $sendingmode == 'mail') setEventMessages($conf->global->MAILING_LIMIT_WARNING_PHPMAIL, null, 'warnings');
if (! empty($conf->global->MAILING_LIMIT_WARNING_NOPHPMAIL) && $sendingmode != 'mail') setEventMessages($conf->global->MAILING_LIMIT_WARNING_NOPHPMAIL, null, 'warnings');
if (! empty($conf->global->MAILING_LIMIT_WARNING_PHPMAIL) && $sendingmode == 'mail') setEventMessages($langs->transnoentitiesnoconv($conf->global->MAILING_LIMIT_WARNING_PHPMAIL), null, 'warnings');
if (! empty($conf->global->MAILING_LIMIT_WARNING_NOPHPMAIL) && $sendingmode != 'mail') setEventMessages($langs->transnoentitiesnoconv($conf->global->MAILING_LIMIT_WARNING_NOPHPMAIL), null, 'warnings');
// The feature is forbidden from GUI, we show just message to use from command line.
setEventMessages($langs->trans("MailingNeedCommand"), null, 'warnings');
@ -786,8 +786,8 @@ else
}
else
{
if (! empty($conf->global->MAILING_LIMIT_WARNING_PHPMAIL) && $sendingmode == 'mail') setEventMessages($conf->global->MAILING_LIMIT_WARNING_PHPMAIL, null, 'warnings');
if (! empty($conf->global->MAILING_LIMIT_WARNING_NOPHPMAIL) && $sendingmode != 'mail') setEventMessages($conf->global->MAILING_LIMIT_WARNING_NOPHPMAIL, null, 'warnings');
if (! empty($conf->global->MAILING_LIMIT_WARNING_PHPMAIL) && $sendingmode == 'mail') setEventMessages($langs->transnoentitiesnoconv($conf->global->MAILING_LIMIT_WARNING_PHPMAIL), null, 'warnings');
if (! empty($conf->global->MAILING_LIMIT_WARNING_NOPHPMAIL) && $sendingmode != 'mail') setEventMessages($langs->transnoentitiesnoconv($conf->global->MAILING_LIMIT_WARNING_NOPHPMAIL), null, 'warnings');
$text='';
if ($conf->global->MAILING_LIMIT_SENDBYCLI >= 0)

View File

@ -412,7 +412,7 @@ if ($object->fetch($id) >= 0)
$sql .= $db->order($sortfield,$sortorder);
// Count total nb of records
$nbtotalofrecords = -1;
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$result = $db->query($sql);

View File

@ -91,7 +91,7 @@ if ($_socid > 0)
dol_fiche_head($head, $tabchoice, $langs->trans("ThirdParty"), 0, 'company');
print '<table width="100%" border="0">';
print '<tr><td valign="top">';
print '<tr><td class="tdtop">';
print '<table class="border" width="100%">';
print '<tr><td colspan="2" width="25%">';

View File

@ -1601,7 +1601,7 @@ if ($action == 'create')
}
print '</td></tr>';
print '<tr><td valign="top"><input type="radio" name="createmode" value="empty" checked></td>';
print '<tr><td class="tdtop"><input type="radio" name="createmode" value="empty" checked></td>';
print '<td valign="top" colspan="2">' . $langs->trans("CreateEmptyPropal") . '</td></tr>';
}

View File

@ -3434,17 +3434,15 @@ class Propal extends CommonObject
$langs->load("propale");
// Positionne le modele sur le nom du modele a utiliser
if (! dol_strlen($modele))
{
if (! empty($conf->global->PROPALE_ADDON_PDF))
{
if (! dol_strlen($modele)) {
$modele = 'azur';
if ($this->modelpdf) {
$modele = $this->modelpdf;
} elseif (! empty($conf->global->PROPALE_ADDON_PDF)) {
$modele = $conf->global->PROPALE_ADDON_PDF;
}
else
{
$modele = 'azur';
}
}
$modelpath = "core/modules/propale/doc/";

View File

@ -333,7 +333,7 @@ $sql.= $db->order($sortfield,$sortorder);
$sql.=', p.ref DESC';
// Count total nb of records
$nbtotalofrecords = -1;
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$result = $db->query($sql);

View File

@ -139,7 +139,7 @@ class CommandeApi extends DolibarrApi
$sql .= " AND sc.fk_user = ".$search_sale;
}
$nbtotalofrecords = -1;
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$result = $db->query($sql);
@ -194,7 +194,7 @@ class CommandeApi extends DolibarrApi
* @return array Array of order objects
*/
function getListForSoc($socid = 0) {
return getList(0,"s.rowid","ASC",0,0,$socid);
return $this->getList(0,"s.rowid","ASC",0,0,$socid);
}

View File

@ -3641,17 +3641,15 @@ class Commande extends CommonOrder
$langs->load("orders");
// Positionne le modele sur le nom du modele a utiliser
if (! dol_strlen($modele))
{
if (! empty($conf->global->COMMANDE_ADDON_PDF))
{
if (! dol_strlen($modele)) {
$modele = 'einstein';
if ($this->modelpdf) {
$modele = $this->modelpdf;
} elseif (! empty($conf->global->COMMANDE_ADDON_PDF)) {
$modele = $conf->global->COMMANDE_ADDON_PDF;
}
else
{
$modele = 'einstein';
}
}
$modelpath = "core/modules/commande/doc/";

View File

@ -97,7 +97,7 @@ $sql.= " GROUP BY s.nom";
$sql.= $db->order($sortfield,$sortorder);
// Count total nb of records
$nbtotalofrecords = -1;
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$result = $db->query($sql);

View File

@ -182,6 +182,7 @@ if ($id > 0 || ! empty($ref))
else
{
header('Location: index.php');
exit;
}

View File

@ -560,7 +560,7 @@ $sql.=$hookmanager->resPrint;
$sql.= $db->order($sortfield,$sortorder);
// Count total nb of records
$nbtotalofrecords = -1;
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$result = $db->query($sql);

View File

@ -421,7 +421,7 @@ if ($action == 'create' && !$error)
print '</tr>'."\n";
// Type
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans('Type').'</td><td colspan="2">';
print '<tr><td class="tdtop fieldrequired">'.$langs->trans('Type').'</td><td colspan="2">';
print '<table class="nobordernopadding">'."\n";
// Standard invoice

View File

@ -259,52 +259,50 @@ dol_fiche_head($head,'byyear',$langs->trans("Statistics"));
print '<div class="fichecenter"><div class="fichethirdleft">';
//if (empty($socid))
//{
// Show filter box
print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="mode" value="'.$mode.'">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
// Company
print '<tr><td align="left">'.$langs->trans("ThirdParty").'</td><td align="left">';
if ($mode == 'customer') $filter='s.client in (1,2,3)';
if ($mode == 'supplier') $filter='s.fournisseur = 1';
print $form->select_company($socid,'socid',$filter,1,0,0,array(),0,'','style="width: 95%"');
print '</td></tr>';
// User
print '<tr><td align="left">'.$langs->trans("CreatedBy").'</td><td align="left">';
print $form->select_dolusers($userid, 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
// Status
print '<tr><td align="left">'.$langs->trans("Status").'</td><td align="left">';
if ($mode == 'customer')
{
$liststatus=array(
Commande::STATUS_DRAFT=>$langs->trans("StatusOrderDraft"),
Commande::STATUS_VALIDATED=>$langs->trans("StatusOrderValidated"),
Commande::STATUS_ACCEPTED=>$langs->trans("StatusOrderSent"),
Commande::STATUS_CLOSED=>$langs->trans("StatusOrderDelivered"),
Commande::STATUS_CANCELED=>$langs->trans("StatusOrderCanceled")
);
print $form->selectarray('object_status', $liststatus, GETPOST('object_status'), -4);
}
if ($mode == 'supplier')
{
$formorder->selectSupplierOrderStatus((strstr($object_status, ',')?-1:$object_status), 0, 'object_status');
}
print '</td></tr>';
// Year
print '<tr><td align="left">'.$langs->trans("Year").'</td><td align="left">';
if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year;
if (! in_array($nowyear,$arrayyears)) $arrayyears[$nowyear]=$nowyear;
arsort($arrayyears);
print $form->selectarray('year',$arrayyears,$year,0);
print '</td></tr>';
print '<tr><td align="center" colspan="2"><input type="submit" name="submit" class="button" value="'.$langs->trans("Refresh").'"></td></tr>';
print '</table>';
print '</form>';
print '<br><br>';
//}
// Show filter box
print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="mode" value="'.$mode.'">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
// Company
print '<tr><td align="left">'.$langs->trans("ThirdParty").'</td><td align="left">';
if ($mode == 'customer') $filter='s.client in (1,2,3)';
if ($mode == 'supplier') $filter='s.fournisseur = 1';
print $form->select_company($socid,'socid',$filter,1,0,0,array(),0,'','style="width: 95%"');
print '</td></tr>';
// User
print '<tr><td align="left">'.$langs->trans("CreatedBy").'</td><td align="left">';
print $form->select_dolusers($userid, 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
// Status
print '<tr><td align="left">'.$langs->trans("Status").'</td><td align="left">';
if ($mode == 'customer')
{
$liststatus=array(
Commande::STATUS_DRAFT=>$langs->trans("StatusOrderDraft"),
Commande::STATUS_VALIDATED=>$langs->trans("StatusOrderValidated"),
Commande::STATUS_ACCEPTED=>$langs->trans("StatusOrderSent"),
Commande::STATUS_CLOSED=>$langs->trans("StatusOrderDelivered"),
Commande::STATUS_CANCELED=>$langs->trans("StatusOrderCanceled")
);
print $form->selectarray('object_status', $liststatus, GETPOST('object_status'), -4);
}
if ($mode == 'supplier')
{
$formorder->selectSupplierOrderStatus((strstr($object_status, ',')?-1:$object_status), 0, 'object_status');
}
print '</td></tr>';
// Year
print '<tr><td align="left">'.$langs->trans("Year").'</td><td align="left">';
if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year;
if (! in_array($nowyear,$arrayyears)) $arrayyears[$nowyear]=$nowyear;
arsort($arrayyears);
print $form->selectarray('year',$arrayyears,$year,0);
print '</td></tr>';
print '<tr><td align="center" colspan="2"><input type="submit" name="submit" class="button" value="'.$langs->trans("Refresh").'"></td></tr>';
print '</table>';
print '</form>';
print '<br><br>';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre" height="24">';
@ -328,7 +326,6 @@ foreach ($data as $val)
$var=!$var;
print '<tr '.$bc[$var].' height="24">';
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'&amp;mode='.$mode.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$oldyear.'</a></td>';
print '<td align="right">0</td>';
print '<td align="right"></td>';
print '<td align="right">0</td>';

View File

@ -188,7 +188,7 @@ print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td class="liste_titre">'.$langs->trans("Month").'</td>';
for ($annee = $year_start ; $annee <= $year_end ; $annee++)
{
print '<td align="center" width="20%" colspan="2">'.$annee.'</td>';
print '<td align="center" width="20%" colspan="2" class="liste_titre borderrightlight">'.$annee.'</td>';
}
print '</tr>';
@ -196,7 +196,7 @@ print '<tr class="liste_titre">';
print '<td class="liste_titre">&nbsp;</td>';
for ($annee = $year_start ; $annee <= $year_end ; $annee++)
{
print '<td align="right">'.$langs->trans("Debit").'</td><td align="right">'.$langs->trans("Credit").'</td>';
print '<td class="liste_titre" align="center">'.$langs->trans("Debit").'</td><td class="liste_titre" align="center">'.$langs->trans("Credit").'</td>';
}
print '</tr>';
@ -218,7 +218,7 @@ for ($mois = 1 ; $mois < 13 ; $mois++)
}
print "</td>";
print '<td align="right" width="10%">&nbsp;';
print '<td align="right" class="borderrightlight" width="10%">&nbsp;';
if ($encaiss[$case]>0)
{
print price($encaiss[$case]);

View File

@ -54,6 +54,7 @@ $langs->load("loan");
$langs->load("donations");
$langs->load("trips");
$langs->load("members");
$langs->load("compta");
$id = GETPOST('id','int');
$ref = GETPOST('ref','alpha');
@ -501,7 +502,7 @@ $sql.=$hookmanager->resPrint;
$sql.= $db->order($sortfield,$sortorder);
$nbtotalofrecords = -1;
$nbtotalofrecords = '';
$nbtotalofpages = 0;
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
@ -620,7 +621,7 @@ if ($resql)
$last_ok=1;
}
$i++;
$liste='<a href="'.DOL_URL_ROOT.'/compta/bank/releve.php?account='.$acct->id.'&amp;num='.$objr->num_releve.'">'.$objr->num_releve.'</a> &nbsp; '.$liste;
$liste='<a href="'.DOL_URL_ROOT.'/compta/bank/releve.php?account='.$id.'&amp;num='.$objr->num_releve.'">'.$objr->num_releve.'</a> &nbsp; '.$liste;
}
if ($numr >= $nbmax) $liste="... &nbsp; ".$liste;
print $liste;
@ -1207,7 +1208,7 @@ if ($resql)
{
if ($objp->rappro) // If line not conciliated and account can be conciliated
{
print '<a href="releve.php?num='.$objp->num_releve.'&amp;account='.$object->id.'">'.$objp->num_releve.'</a>';
print '<a href="releve.php?num='.$objp->num_releve.'&amp;account='.$objp->bankid.'">'.$objp->num_releve.'</a>';
}
else if ($action == 'reconcile')
{
@ -1223,7 +1224,7 @@ if ($resql)
// Transaction reconciliated or edit link
if ($objp->rappro && $bankaccount->canBeConciliated() > 0) // If line not conciliated and account can be conciliated
{
print '<a href="'.DOL_URL_ROOT.'/compta/bank/ligne.php?rowid='.$objp->rowid.'&amp;account='.$object->id.'&amp;page='.$page.'">';
print '<a href="'.DOL_URL_ROOT.'/compta/bank/ligne.php?rowid='.$objp->rowid.'&amp;account='.$objp->bankid.'&amp;page='.$page.'">';
print img_edit();
print '</a>';
}
@ -1231,13 +1232,13 @@ if ($resql)
{
if ($user->rights->banque->modifier || $user->rights->banque->consolidate)
{
print '<a href="'.DOL_URL_ROOT.'/compta/bank/ligne.php?rowid='.$objp->rowid.'&amp;account='.$object->id.'&amp;page='.$page.'">';
print '<a href="'.DOL_URL_ROOT.'/compta/bank/ligne.php?rowid='.$objp->rowid.'&amp;account='.$objp->bankid.'&amp;page='.$page.'">';
print img_edit();
print '</a>';
}
else
{
print '<a href="'.DOL_URL_ROOT.'/compta/bank/ligne.php?rowid='.$objp->rowid.'&amp;account='.$object->id.'&amp;page='.$page.'">';
print '<a href="'.DOL_URL_ROOT.'/compta/bank/ligne.php?rowid='.$objp->rowid.'&amp;account='.$objp->bankid.'&amp;page='.$page.'">';
print img_view();
print '</a>';
}
@ -1251,7 +1252,7 @@ if ($resql)
print '&nbsp;';
if ($user->rights->banque->modifier)
{
print '<a href="'.$_SERVER["PHP_SELF"].'?action=delete&amp;rowid='.$objp->rowid.'&amp;id='.$object->id.'&amp;page='.$page.'">';
print '<a href="'.$_SERVER["PHP_SELF"].'?action=delete&amp;rowid='.$objp->rowid.'&amp;id='.$objp->bankid.'&amp;page='.$page.'">';
print img_delete();
print '</a>';
}

View File

@ -662,7 +662,7 @@ class Account extends CommonObject
*
* @param User $user Object user making action
* @param int $notrigger 1=Disable triggers
* @return int <0 si ko, >0 si ok
* @return int <0 if KO, >0 if OK
*/
function update(User $user = null, $notrigger = 0)
{

View File

@ -81,59 +81,13 @@ if ($id)
* Actions
*/
// Envoi fichier
if ($_POST["sendit"] && !empty($conf->global->MAIN_UPLOAD_DOC)) {
if ($object->fetch($id)) {
$upload_dir = $conf->bank->dir_output . "/" . $object->ref;
if (dol_mkdir($upload_dir) >= 0) {
$resupload = dol_move_uploaded_file($_FILES['userfile']['tmp_name'],
$upload_dir . "/" . dol_unescapefile($_FILES['userfile']['name']),
0, 0, $_FILES['userfile']['error']);
if (is_numeric($resupload) && $resupload > 0) {
if (image_format_supported($upload_dir . "/" . $_FILES['userfile']['name']) == 1)
{
// Create thumbs
$object->addThumbs($upload_dir . "/" . $_FILES['userfile']['name']);
}
$mesg = '<div class="ok">' . $langs->trans("FileTransferComplete") . '</div>';
}
else {
$langs->load("errors");
if ($resupload < 0) { // Unknown error
$mesg = '<div class="error">' . $langs->trans("ErrorFileNotUploaded") . '</div>';
}
else if (preg_match('/ErrorFileIsInfectedWithAVirus/',
$resupload)) { // Files infected by a virus
$mesg = '<div class="error">' . $langs->trans("ErrorFileIsInfectedWithAVirus") . '</div>';
}
else { // Known error
$mesg = '<div class="error">' . $langs->trans($resupload) . '</div>';
}
}
}
}
if ($object->id > 0)
{
$object->fetch_thirdparty();
$upload_dir = $conf->bank->dir_output . "/" . dol_sanitizeFileName($object->ref);
}
// Delete
else if ($action == 'confirm_deletefile' && $confirm == 'yes') {
if ($object->fetch($id)) {
$upload_dir = $conf->bank->dir_output;
$file = $upload_dir . '/' . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
$ret = dol_delete_file($file, 0, 0, 0, $object);
if ($ret) {
setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs');
} else {
setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors');
}
Header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id);
exit;
}
}
include_once DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php';
/*
@ -182,30 +136,12 @@ if ($id > 0 || !empty($ref)) {
dol_fiche_end();
dol_htmloutput_mesg($mesg, $mesgs);
/*
* Confirmation suppression fichier
*/
if ($action == 'delete') {
$ret = $form->form_confirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&urlfile=' . urlencode($_GET["urlfile"]),
$langs->trans('DeleteFile'),
$langs->trans('ConfirmDeleteFile'), 'confirm_deletefile',
'', 0, 1);
if ($ret == 'html')
print '<br>';
}
// Affiche formulaire upload
$formfile = new FormFile($db);
$formfile->form_attach_new_file(DOL_URL_ROOT . '/compta/bank/document.php?id=' . $object->id,
'', 0, 0, $user->rights->banque, 50, $object);
// List of document
$modulepart = 'bank';
$permission = $user->rights->banque->modifier;
$permtoedit = $user->rights->banque->modifier;
$param = '&id=' . $object->id;
$formfile->list_of_documents($filearray, $object, 'bank', $param);
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
}
else {
dol_print_error($db);

View File

@ -175,7 +175,7 @@ $sql.=$hookmanager->resPrint;
$sql.= $db->order($sortfield,$sortorder);
// Count total nb of records
$nbtotalofrecords = -1;
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$result = $db->query($sql);
@ -449,7 +449,7 @@ foreach ($accounts as $key=>$type)
// Ref
if (! empty($arrayfields['b.ref']['checked']))
{
print '<td class="titlefield">'.$acc->getNomUrl(1).'</td>';
print '<td>'.$acc->getNomUrl(1).'</td>';
if (! $i) $totalarray['nbfield']++;
}

View File

@ -299,6 +299,7 @@ else
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print "<input type=\"hidden\" name=\"action\" value=\"add\">";
print '<div class="div-table-responsive">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td align="center">'.$langs->trans("DateOperationShort").'</td>';
@ -348,8 +349,10 @@ else
$i = 0;
// Ligne Solde debut releve
print "<tr ".$bc[$var]."><td colspan=\"4\"><a href=\"releve.php?num=$num&amp;ve=1&amp;rel=$rel&amp;account=".$object->id."\">&nbsp;</a></td>";
print "<td align=\"right\" colspan=\"2\"><b>".$langs->trans("InitialBankBalance")." :</b></td><td align=\"right\"><b>".price($total)."</b></td><td>&nbsp;</td></tr>\n";
print "<tr ".$bc[$var]."><td colspan=\"3\"></td>";
print "<td colspan=\"3\"><b>".$langs->trans("InitialBankBalance")." :</b></td>";
print '<td align="right"><b>'.price($total).'</b></td><td>&nbsp;</td>';
print "</tr>\n";
while ($i < $numrows)
{
@ -552,8 +555,13 @@ else
print "\n".'<tr class="liste_total"><td align="right" colspan="4">'.$langs->trans("Total")." :</td><td align=\"right\">".price($totald)."</td><td align=\"right\">".price($totalc)."</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
// Line Balance
print "\n<tr><td align=\"right\" colspan=\"4\">&nbsp;</td><td align=\"right\" colspan=\"2\"><b>".$langs->trans("EndBankBalance")." :</b></td><td align=\"right\"><b>".price($total)."</b></td><td>&nbsp;</td></tr>\n";
print "</table></form>\n";
print "\n<tr><td align=\"right\" colspan=\"3\">&nbsp;</td><td colspan=\"3\"><b>".$langs->trans("EndBankBalance")." :</b></td>";
print "<td align=\"right\"><b>".price($total)."</b></td><td>&nbsp;</td>";
print "</tr>\n";
print "</table>";
print "</div>";
print "</form>\n";
}

View File

@ -93,15 +93,14 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
$head=bank_prepare_head($object);
dol_fiche_head($head,'cash',$langs->trans("FinancialAccount"),0,'account');
print '<table class="border" width="100%">';
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/bank/index.php">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, '', 0, '', '', 1);
dol_fiche_end();
print '<br>';
$solde = $object->solde(0);
// Show next coming entries

View File

@ -373,7 +373,7 @@ else if ($id)
print '</td></tr>';
// Public note
print '<tr><td valign="top">'.$langs->trans("NotePublic").'</td>';
print '<tr><td class="tdtop">'.$langs->trans("NotePublic").'</td>';
print '<td valign="top" colspan="3">';
$doleditor = new DolEditor('note_public', $object->note_public, '', 200, 'dolibarr_notes', 'In', false, true, true, ROWS_8, '90%');
@ -384,7 +384,7 @@ else if ($id)
// Private note
if (empty($user->societe_id))
{
print '<tr><td valign="top">'.$langs->trans("NotePrivate").'</td>';
print '<tr><td class="tdtop">'.$langs->trans("NotePrivate").'</td>';
print '<td valign="top" colspan="3">';
$doleditor = new DolEditor('note_private', $object->note_private, '', 200, 'dolibarr_notes', 'In', false, true, true, ROWS_8, '90%');
@ -456,7 +456,7 @@ else if ($id)
print '</td></tr>';
// Km/Price
print '<tr><td valign="top">';
print '<tr><td class="tdtop">';
print $form->editfieldkey("FeesKilometersOrAmout",'km',$object->km,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'numeric:6');
print '</td><td>';
print $form->editfieldval("FeesKilometersOrAmout",'km',$object->km,$object,$conf->global->MAIN_EDIT_ALSO_INLINE && $user->rights->deplacement->creer,'numeric:6');

View File

@ -1291,6 +1291,25 @@ if (empty($reshook))
if ($id > 0 && ! $error)
{
$db->commit();
// Define output language
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE) && count($object->lines))
{
$outputlangs = $langs;
$newlang = '';
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id')) $newlang = GETPOST('lang_id','alpha');
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->thirdparty->default_lang;
if (! empty($newlang)) {
$outputlangs = new Translate("", $conf);
$outputlangs->setDefaultLang($newlang);
}
$model=$object->modelpdf;
$ret = $object->fetch($id); // Reload to get new records
$result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
if ($result < 0) setEventMessages($object->error, $object->errors, 'errors');
}
header('Location: ' . $_SERVER["PHP_SELF"] . '?facid=' . $id);
exit();
}
@ -2208,7 +2227,7 @@ if ($action == 'create')
$optionsav .= '</option>';
}
print '<tr><td valign="top" class="fieldrequired">' . $langs->trans('Type') . '</td><td colspan="2">';
print '<tr><td class="tdtop fieldrequired">' . $langs->trans('Type') . '</td><td colspan="2">';
print '<div class="tagtable">' . "\n";
@ -3736,6 +3755,8 @@ else if ($id > 0 || ! empty($ref))
}
else // Credit note
{
$cssforamountpaymentcomplete='';
// Total already paid back
print '<tr><td colspan="' . $nbcols . '" align="right">';
print $langs->trans('AlreadyPaidBack');
@ -3751,7 +3772,7 @@ else if ($id > 0 || ! empty($ref))
else
print $langs->trans('ExcessPaydBack');
print ' :</td>';
print '<td align="right" bgcolor="#f0f0f0"><b>' . price($sign * $resteapayeraffiche) . '</b></td>';
print '<td align="right"'.($resteapayeraffiche?' class="amountremaintopayback"':(' class="'.$cssforamountpaymentcomplete.'"')).'>' . price($sign * $resteapayeraffiche) . '</td>';
print '<td class="nowrap">&nbsp;</td></tr>';
// Sold credit note

Some files were not shown because too many files have changed in this diff Show More