Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into fix_user_photo
This commit is contained in:
commit
09b967bb1b
@ -3,18 +3,30 @@ FROM php:7.0-apache
|
||||
ENV HOST_USER_ID 33
|
||||
ENV PHP_INI_DATE_TIMEZONE 'UTC'
|
||||
|
||||
RUN apt-get update && apt-get install -y libpng12-dev libjpeg-dev libldap2-dev \
|
||||
RUN apt-get update && apt-get install -y libpng-dev libjpeg-dev libldap2-dev \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
|
||||
&& docker-php-ext-install gd \
|
||||
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
|
||||
&& docker-php-ext-install ldap \
|
||||
&& docker-php-ext-install mysqli \
|
||||
&& apt-get purge -y libpng12-dev libjpeg-dev libldap2-dev
|
||||
&& apt-get purge -y libjpeg-dev libldap2-dev
|
||||
|
||||
COPY docker-run.sh /usr/local/bin/
|
||||
RUN chmod +x /usr/local/bin/docker-run.sh
|
||||
|
||||
RUN pecl install xdebug-2.5.5 && docker-php-ext-enable xdebug
|
||||
RUN echo 'zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20151012/xdebug.so"' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.remote_autostart=0' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.remote_enable=1' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.default_enable=0' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.remote_host=docker.for.mac.host.internal' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.remote_port=9000' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.remote_connect_back=0' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.profiler_enable=0' >> /usr/local/etc/php/php.ini
|
||||
RUN echo 'xdebug.remote_log="/tmp/xdebug.log"' >> /usr/local/etc/php/php.ini
|
||||
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
ENTRYPOINT ["docker-run.sh"]
|
||||
|
||||
@ -58,7 +58,7 @@ $pagenext = $page + 1;
|
||||
|
||||
|
||||
$search_date_start = dol_mktime(0, 0, 0, GETPOST('date_startmonth', 'int'), GETPOST('date_startday', 'int'), GETPOST('date_startyear', 'int'));
|
||||
$search_date_end = dol_mktime(0, 0, 0, GETPOST('date_endmonth', 'int'), GETPOST('date_endday', 'int'), GETPOST('date_endyear', 'int'));
|
||||
$search_date_end = dol_mktime(23, 59, 59, GETPOST('date_endmonth', 'int'), GETPOST('date_endday', 'int'), GETPOST('date_endyear', 'int'));
|
||||
|
||||
$search_accountancy_code_start = GETPOST('search_accountancy_code_start', 'alpha');
|
||||
if ($search_accountancy_code_start == - 1) {
|
||||
@ -127,7 +127,6 @@ if (! empty($search_accountancy_code_end)) {
|
||||
$param .= '&search_accountancy_code_end=' . $search_accountancy_code_end;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Action
|
||||
*/
|
||||
@ -154,7 +153,7 @@ if ($action == 'export_csv')
|
||||
$type_export = 'balance';
|
||||
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
|
||||
|
||||
$result = $object->fetchAllBalance($sortorder, $sortfield, 0, 0, $filter);
|
||||
$result = $object->fetchAllBalance($sortorder, $sortfield, $limit, 0, $filter);
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
|
||||
@ -211,7 +211,7 @@ class Lettering extends BookKeeping
|
||||
}
|
||||
|
||||
if (count($ids) > 1) {
|
||||
$result = $this->updatelettrage($ids);
|
||||
$result = $this->updateLettering($ids);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1280,7 +1280,7 @@ $db->close();
|
||||
function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint=0, $maxnbofchar=16, $newparam='', $showinfo=0, $minheight=60, $nonew=0)
|
||||
{
|
||||
global $user, $conf, $langs;
|
||||
global $action, $filter, $filtert, $status, $actioncode; // Filters used into search form
|
||||
global $action, $filter, $filtert, $status, $actioncode, $usergroup; // Filters used into search form
|
||||
global $theme_datacolor;
|
||||
global $cachethirdparties, $cachecontacts, $cacheusers, $colorindexused;
|
||||
|
||||
@ -1639,6 +1639,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/action/index.php?action='.$action.'&maxprint=0&month='.$monthshown.'&year='.$year;
|
||||
print ($status?'&status='.$status:'').($filter?'&filter='.$filter:'');
|
||||
print ($filtert?'&filtert='.$filtert:'');
|
||||
print ($usergroup?'&usergroup='.$usergroup:'');
|
||||
print ($actioncode!=''?'&actioncode='.$actioncode:'');
|
||||
print '">'.img_picto("all","1downarrow_selected.png").' ...';
|
||||
print ' +'.(count($eventarray[$daykey])-$maxprint);
|
||||
|
||||
@ -940,8 +940,8 @@ class Contact extends CommonObject
|
||||
|
||||
$error=0;
|
||||
|
||||
$this->old_lastname = $obj->lastname;
|
||||
$this->old_firstname = $obj->firstname;
|
||||
//$this->old_lastname = $obj->lastname;
|
||||
//$this->old_firstname = $obj->firstname;
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
|
||||
@ -322,6 +322,7 @@ if (strlen($search_facebook)) $sql.= natural_search('p.facebook', $search_
|
||||
if (strlen($search_email)) $sql.= natural_search('p.email', $search_email);
|
||||
if (strlen($search_zip)) $sql.= natural_search("p.zip",$search_zip);
|
||||
if (strlen($search_town)) $sql.= natural_search("p.town",$search_town);
|
||||
|
||||
if ($search_status != '' && $search_status >= 0) $sql.= " AND p.statut = ".$db->escape($search_status);
|
||||
if ($search_import_key) $sql.= natural_search("p.import_key",$search_import_key);
|
||||
if ($type == "o") // filtre sur type
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2012-2014 Charles-François BENKE <charles.fr@benke.fr>
|
||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||
/* Copyright (C) 2012-2018 Charlene BENKE <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -82,6 +82,9 @@ class box_task extends ModeleBoxes
|
||||
$totalMnt = 0;
|
||||
$totalnb = 0;
|
||||
$totalDuree=0;
|
||||
$totalplannedtot=0;
|
||||
$totaldurationtot=0;
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT."/projet/class/task.class.php";
|
||||
$taskstatic=new Task($db);
|
||||
|
||||
|
||||
@ -1017,7 +1017,6 @@ abstract class CommonDocGenerator
|
||||
global $hookmanager;
|
||||
|
||||
$parameters=array(
|
||||
'object' => $object,
|
||||
'curY' => &$curY,
|
||||
'columnText' => $columnText,
|
||||
'colKey' => $colKey
|
||||
|
||||
@ -6291,12 +6291,11 @@ abstract class CommonObject
|
||||
// Load language if required
|
||||
if (! empty($extrafields->attributes[$this->table_element]['langfile'][$key])) $langs->load($extrafields->attributes[$this->table_element]['langfile'][$key]);
|
||||
|
||||
$colspan='3';
|
||||
if (is_array($params) && count($params)>0) {
|
||||
if (array_key_exists('colspan',$params)) {
|
||||
$colspan=$params['colspan'];
|
||||
}
|
||||
}else {
|
||||
$colspan='3';
|
||||
}
|
||||
|
||||
switch($mode) {
|
||||
|
||||
@ -18,6 +18,7 @@
|
||||
* Copyright (C) 2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@ -332,7 +332,7 @@ class FormActions
|
||||
// phpcs:enable
|
||||
global $langs,$user,$form,$conf;
|
||||
|
||||
if (! is_object($form)) $form=new Form($db);
|
||||
if (! is_object($form)) $form=new Form($this->db);
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/cactioncomm.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
|
||||
@ -357,7 +357,7 @@ class FormActions
|
||||
}
|
||||
else
|
||||
{
|
||||
$out.=$form->selectarray($htmlname, $arraylist, $selected, 0, 0, 0, '', 0, 0, 0, '', '', 1);
|
||||
$out.=$form->selectarray($htmlname, $arraylist, $selected, 0, 0, 0, '', 0, 0, 0, '', 'minwidth200', 1);
|
||||
}
|
||||
|
||||
if ($user->admin && empty($onlyautoornot) && $hideinfohelp <= 0)
|
||||
|
||||
@ -342,8 +342,7 @@ class FormMail extends Form
|
||||
$model_id=$this->param["models_id"];
|
||||
}
|
||||
|
||||
// we set -1 if model_id empty
|
||||
$arraydefaultmessage = $this->getEMailTemplate($this->db, $this->param["models"], $user, $outputlangs, ($model_id ? $model_id : -1));
|
||||
$arraydefaultmessage=$this->getEMailTemplate($this->db, $this->param["models"], $user, $outputlangs, $model_id); // If $model_id is empty, preselect the first one
|
||||
}
|
||||
|
||||
// Define list of attached files
|
||||
|
||||
@ -1317,8 +1317,14 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
|
||||
if (! empty($conf->agenda->enabled))
|
||||
{
|
||||
// Recherche histo sur actioncomm
|
||||
$sql = "SELECT a.id, a.label,";
|
||||
$sql.= " a.datep as dp,";
|
||||
if (is_object($objcon) && $objcon->id) {
|
||||
$sql = "SELECT DISTINCT a.id, a.label,";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = "SELECT a.id, a.label,";
|
||||
}
|
||||
$sql.= " a.datep as dp,";
|
||||
$sql.= " a.datep2 as dp2,";
|
||||
$sql.= " a.note, a.percent,";
|
||||
$sql.= " a.fk_element, a.elementtype,";
|
||||
@ -1332,7 +1338,12 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_action";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_actioncomm as c ON a.fk_action = c.id";
|
||||
if (is_object($filterobj) && get_class($filterobj) == 'Societe') $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON a.fk_contact = sp.rowid";
|
||||
|
||||
if (is_object($objcon) && $objcon->id) {
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."actioncomm_resources as r ON a.id = r.fk_actioncomm";
|
||||
}
|
||||
|
||||
if (is_object($filterobj) && get_class($filterobj) == 'Societe') $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON a.fk_contact = sp.rowid";
|
||||
elseif (is_object($filterobj) && get_class($filterobj) == 'Dolresource') {
|
||||
$sql.= " INNER JOIN ".MAIN_DB_PREFIX."element_resources as er";
|
||||
$sql.= " ON er.resource_type = 'dolresource'";
|
||||
@ -1361,8 +1372,14 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
|
||||
$sql.= " AND a.fk_element = o.rowid AND a.elementtype = 'product'";
|
||||
if ($filterobj->id) $sql.= " AND a.fk_element = ".$filterobj->id;
|
||||
}
|
||||
//TODO check how ot work with new table actioncomm_resources and multiple contact affectation
|
||||
if (is_object($objcon) && $objcon->id) $sql.= " AND a.fk_contact = ".$objcon->id;
|
||||
|
||||
// Work with new table actioncomm_resources and multiple contact affectation.
|
||||
if (is_object($objcon) && $objcon->id)
|
||||
{
|
||||
$sql.= " AND r.element_type = '" . $objcon->table_element . "'" .
|
||||
" AND r.fk_element = " . $objcon->id;
|
||||
}
|
||||
|
||||
// Condition on actioncode
|
||||
if (! empty($actioncode))
|
||||
{
|
||||
|
||||
@ -1868,6 +1868,7 @@ function pdf_getlineremisepercent($object,$i,$outputlangs,$hidedetails=0)
|
||||
function pdf_getlineprogress($object, $i, $outputlangs, $hidedetails = 0, $hookmanager = null)
|
||||
{
|
||||
if (empty($hookmanager)) global $hookmanager;
|
||||
global $conf;
|
||||
|
||||
$reshook=0;
|
||||
$result='';
|
||||
|
||||
@ -357,10 +357,43 @@ class pdf_strato extends ModelePDFContract
|
||||
$txt.=$outputlangs->transnoentities("DateStartRealShort")." : <strong>".$daters.'</strong>';
|
||||
if ($objectligne->date_cloture) $txt.=" - ".$outputlangs->transnoentities("DateEndRealShort")." : '<strong>'".$datere.'</strong>';
|
||||
|
||||
$pdf->startTransaction();
|
||||
$pdf->writeHTMLCell(0, 0, $curX, $curY, dol_concatdesc($txtpredefinedservice, dol_concatdesc($txt, $desc)), 0, 1, 0);
|
||||
$pageposafter=$pdf->getPage();
|
||||
if ($pageposafter > $pageposbefore) // There is a pagebreak
|
||||
{
|
||||
$pdf->rollbackTransaction(true);
|
||||
$pageposafter=$pageposbefore;
|
||||
//print $pageposafter.'-'.$pageposbefore;exit;
|
||||
$pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it.
|
||||
$pdf->writeHTMLCell(0, 0, $curX, $curY, dol_concatdesc($txtpredefinedservice, dol_concatdesc($txt, $desc)), 0, 1, 0);
|
||||
$pageposafter=$pdf->getPage();
|
||||
$posyafter=$pdf->GetY();
|
||||
|
||||
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text
|
||||
{
|
||||
if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page
|
||||
{
|
||||
$pdf->AddPage('','',true);
|
||||
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
$pdf->setPage($pageposafter+1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// We found a page break
|
||||
$showpricebeforepagebreak=0;
|
||||
}
|
||||
}
|
||||
else // No pagebreak
|
||||
{
|
||||
$pdf->commitTransaction();
|
||||
}
|
||||
|
||||
$nexY = $pdf->GetY() + 2;
|
||||
$pageposafter=$pdf->getPage();
|
||||
|
||||
$pdf->setPage($pageposbefore);
|
||||
$pdf->setTopMargin($this->marge_haute);
|
||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||
@ -378,26 +411,27 @@ class pdf_strato extends ModelePDFContract
|
||||
$pdf->setPage($pagenb);
|
||||
if ($pagenb == 1)
|
||||
{
|
||||
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1);
|
||||
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext, 0, $outputlangs, 0, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
|
||||
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter - $heightforfreetext, 0, $outputlangs, 1, 1);
|
||||
}
|
||||
$this->_pagefoot($pdf,$object,$outputlangs,1);
|
||||
$pagenb++;
|
||||
$pdf->setPage($pagenb);
|
||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||
}
|
||||
|
||||
if (isset($object->lines[$i+1]->pagebreak) && $object->lines[$i+1]->pagebreak)
|
||||
{
|
||||
if ($pagenb == 1)
|
||||
{
|
||||
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1);
|
||||
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext, 0, $outputlangs, 0, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
|
||||
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter - $heightforfreetext, 0, $outputlangs, 1, 1);
|
||||
}
|
||||
$this->_pagefoot($pdf,$object,$outputlangs,1);
|
||||
// New page
|
||||
@ -412,14 +446,16 @@ class pdf_strato extends ModelePDFContract
|
||||
if ($pagenb == 1)
|
||||
{
|
||||
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0);
|
||||
$this->_tab_signature($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, $outputlangs);
|
||||
$bottomlasttab=$this->page_hauteur - $heightforfooter - $heightforfooter + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0);
|
||||
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0);
|
||||
$this->_tab_signature($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, $outputlangs);
|
||||
$bottomlasttab=$this->page_hauteur - $heightforfooter - $heightforfooter + 1;
|
||||
}
|
||||
|
||||
|
||||
$this->_pagefoot($pdf,$object,$outputlangs);
|
||||
if (method_exists($pdf,'AliasNbPages')) $pdf->AliasNbPages();
|
||||
|
||||
@ -506,25 +542,25 @@ class pdf_strato extends ModelePDFContract
|
||||
*/
|
||||
|
||||
// Output Rect
|
||||
$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height+3, $hidetop, $hidebottom); // Rect prend une longueur en 3eme param et 4eme param
|
||||
$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height+3); // Rect prend une longueur en 3eme param et 4eme param
|
||||
}
|
||||
|
||||
if (empty($hidebottom))
|
||||
{
|
||||
$posmiddle = $this->marge_gauche + round(($this->page_largeur - $this->marge_gauche - $this->marge_droite)/2);
|
||||
$posy = $tab_top + $tab_height + 3 + 3;
|
||||
function _tab_signature(&$pdf, $tab_top, $tab_height, $outputlangs) {
|
||||
$pdf->SetDrawColor(128,128,128);
|
||||
$posmiddle = $this->marge_gauche + round(($this->page_largeur - $this->marge_gauche - $this->marge_droite)/2);
|
||||
$posy = $tab_top + $tab_height + 3 + 3;
|
||||
|
||||
$pdf->SetXY($this->marge_gauche, $posy);
|
||||
$pdf->MultiCell($posmiddle - $this->marge_gauche - 5, 5, $outputlangs->transnoentities("ContactNameAndSignature", $this->emetteur->name),0,'L',0);
|
||||
$pdf->SetXY($this->marge_gauche, $posy);
|
||||
$pdf->MultiCell($posmiddle - $this->marge_gauche - 5, 5, $outputlangs->transnoentities("ContactNameAndSignature", $this->emetteur->name),0,'L',0);
|
||||
|
||||
$pdf->SetXY($this->marge_gauche, $posy + 5);
|
||||
$pdf->MultiCell($posmiddle - $this->marge_gauche - 5, 20, '', 1);
|
||||
$pdf->SetXY($this->marge_gauche, $posy + 5);
|
||||
$pdf->MultiCell($posmiddle - $this->marge_gauche - 5, 20, '', 1);
|
||||
|
||||
$pdf->SetXY($posmiddle + 5, $posy);
|
||||
$pdf->MultiCell($this->page_largeur-$this->marge_droite - $posmiddle - 5, 5, $outputlangs->transnoentities("ContactNameAndSignature", $this->recipient->name),0,'L',0);
|
||||
$pdf->SetXY($posmiddle + 5, $posy);
|
||||
$pdf->MultiCell($this->page_largeur-$this->marge_droite - $posmiddle - 5, 5, $outputlangs->transnoentities("ContactNameAndSignature", $this->recipient->name),0,'L',0);
|
||||
|
||||
$pdf->SetXY($posmiddle + 5, $posy + 5);
|
||||
$pdf->MultiCell($this->page_largeur-$this->marge_droite - $posmiddle - 5, 20, '', 1);
|
||||
}
|
||||
$pdf->SetXY($posmiddle + 5, $posy + 5);
|
||||
$pdf->MultiCell($this->page_largeur-$this->marge_droite - $posmiddle - 5, 20, '', 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -289,9 +289,9 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
||||
dol_mkdir($conf->expedition->dir_temp);
|
||||
|
||||
|
||||
// If BILLING contact defined on invoice, we use it
|
||||
// If SHIPMENT contact defined on invoice, we use it
|
||||
$usecontact=false;
|
||||
$arrayidcontact=$object->getIdContact('external','BILLING');
|
||||
$arrayidcontact=$object->getIdContact('external','SHIPPING');
|
||||
if (count($arrayidcontact) > 0)
|
||||
{
|
||||
$usecontact=true;
|
||||
@ -299,24 +299,27 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
||||
}
|
||||
|
||||
// Recipient name
|
||||
if (! empty($usecontact))
|
||||
{
|
||||
$contactobject = null;
|
||||
if (! empty($usecontact)) {
|
||||
// On peut utiliser le nom de la societe du contact
|
||||
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socobject = $object->contact;
|
||||
else $socobject = $object->thirdparty;
|
||||
}
|
||||
else
|
||||
{
|
||||
$socobject=$object->thirdparty;
|
||||
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT))
|
||||
$socobject = $object->contact;
|
||||
else {
|
||||
$socobject = $object->thirdparty;
|
||||
// if we have a SHIIPPING contact and we dont use it as recipient we store the contact object for later use
|
||||
$contactobject = $object->contact;
|
||||
}
|
||||
} else {
|
||||
$socobject = $object->thirdparty;
|
||||
}
|
||||
|
||||
// Make substitution
|
||||
$substitutionarray=array(
|
||||
'__FROM_NAME__' => $this->emetteur->name,
|
||||
'__FROM_EMAIL__' => $this->emetteur->email,
|
||||
'__TOTAL_TTC__' => $object->total_ttc,
|
||||
'__TOTAL_HT__' => $object->total_ht,
|
||||
'__TOTAL_VAT__' => $object->total_vat
|
||||
'__FROM_NAME__' => $this->emetteur->name,
|
||||
'__FROM_EMAIL__' => $this->emetteur->email,
|
||||
'__TOTAL_TTC__' => $object->total_ttc,
|
||||
'__TOTAL_HT__' => $object->total_ht,
|
||||
'__TOTAL_VAT__' => $object->total_vat
|
||||
);
|
||||
complete_substitutions_array($substitutionarray, $langs, $object);
|
||||
// Call the ODTSubstitution hook
|
||||
@ -430,6 +433,28 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
||||
dol_syslog($e->getMessage(), LOG_INFO);
|
||||
}
|
||||
}
|
||||
|
||||
if ($usecontact && is_object($contactobject)) {
|
||||
$tmparray=$this->get_substitutionarray_contact($contactobject,$outputlangs,'contact');
|
||||
foreach($tmparray as $key=>$value)
|
||||
{
|
||||
try {
|
||||
if (preg_match('/logo$/',$key)) // Image
|
||||
{
|
||||
if (file_exists($value)) $odfHandler->setImage($key, $value);
|
||||
else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8');
|
||||
}
|
||||
else // Text
|
||||
{
|
||||
$odfHandler->setVars($key, $value, true, 'UTF-8');
|
||||
}
|
||||
}
|
||||
catch(OdfException $e)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Replace tags of object + external modules
|
||||
$tmparray=$this->get_substitutionarray_shipment($object,$outputlangs);
|
||||
complete_substitutions_array($tmparray, $outputlangs, $object);
|
||||
|
||||
@ -300,20 +300,18 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
||||
}
|
||||
|
||||
// Recipient name
|
||||
$contactobject=null;
|
||||
if (! empty($usecontact))
|
||||
{
|
||||
$contactobject = null;
|
||||
if (! empty($usecontact)) {
|
||||
// On peut utiliser le nom de la societe du contact
|
||||
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socobject = $object->contact;
|
||||
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT))
|
||||
$socobject = $object->contact;
|
||||
else {
|
||||
$socobject = $object->thirdparty;
|
||||
// if we have a BILLING contact and we dont use it as recipient we store the contact object for later use
|
||||
$contactobject = $object->contact;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$socobject=$object->thirdparty;
|
||||
$socobject = $object->thirdparty;
|
||||
// if we have a BILLING contact and we dont use it as recipient we store the contact object for later use
|
||||
$contactobject = $object->contact;
|
||||
}
|
||||
} else {
|
||||
$socobject = $object->thirdparty;
|
||||
}
|
||||
|
||||
// Fetch info for linked propal
|
||||
|
||||
@ -323,7 +323,7 @@ class modAdherent extends DolibarrModules
|
||||
'a.datec'=>'DateCreation','a.datefin'=>'DateEndSubscription'
|
||||
);
|
||||
// Add extra fields
|
||||
$sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'adherent' AND entity = ".$conf->entity;
|
||||
$sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'adherent' AND entity IN (0,".$conf->entity.")";
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql) // This can fail when class is used on old database (during migration for example)
|
||||
{
|
||||
|
||||
@ -91,7 +91,7 @@ class modDav extends DolibarrModules
|
||||
$this->requiredby = array(); // List of module ids to disable if this one is disabled
|
||||
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
|
||||
$this->langfiles = array("admin");
|
||||
$this->phpmin = array(5,4); // Minimum version of PHP required by module
|
||||
$this->phpmin = array(5,6); // Minimum version of PHP required by module
|
||||
$this->need_dolibarr_version = array(7,0); // Minimum version of Dolibarr required by module
|
||||
$this->warnings_activation = array(); // Warning to show when we activate module. array('always'='text') or array('FR'='textfr','ES'='textes'...)
|
||||
$this->warnings_activation_ext = array(); // Warning to show when we activate an external module. array('always'='text') or array('FR'='textfr','ES'='textes'...)
|
||||
|
||||
@ -317,7 +317,7 @@ class modProduct extends DolibarrModules
|
||||
if (! empty($conf->global->PRODUCT_USE_UNITS)) $this->import_fields_array[$r]['p.fk_unit'] = 'Unit';
|
||||
// Add extra fields
|
||||
$import_extrafield_sample=array();
|
||||
$sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'product' AND entity IN (0, ".$conf->entity.')';
|
||||
$sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'product' AND entity IN (0, ".$conf->entity.")";
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql) // This can fail when class is used on old database (during migration for example)
|
||||
{
|
||||
|
||||
@ -278,7 +278,7 @@ class modProjet extends DolibarrModules
|
||||
$this->import_tables_array[$r]=array('t'=>MAIN_DB_PREFIX.'projet_task','extra'=>MAIN_DB_PREFIX.'projet_task_extrafields'); // List of tables to insert into (insert done in same order)
|
||||
$this->import_fields_array[$r]=array('t.fk_projet'=>'ProjectRef*','t.ref'=>'RefTask*','t.label'=>'LabelTask*','t.dateo'=>"DateStart",'t.datee'=>"DateEnd",'t.planned_workload'=>"PlannedWorkload",'t.progress'=>"Progress",'t.note_private'=>"NotePrivate",'t.note_public'=>"NotePublic",'t.datec'=>"DateCreation");
|
||||
// Add extra fields
|
||||
$sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'projet_task' AND entity = ".$conf->entity;
|
||||
$sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'projet_task' AND entity IN (0,".$conf->entity.")";
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql) // This can fail when class is used on old database (during migration for example)
|
||||
{
|
||||
|
||||
@ -265,7 +265,7 @@ class modResource extends DolibarrModules
|
||||
$this->import_tables_array[$r]=array('r'=>MAIN_DB_PREFIX.'resource','extra'=>MAIN_DB_PREFIX.'resource_extrafields'); // List of tables to insert into (insert done in same order)
|
||||
$this->import_fields_array[$r]=array('r.ref'=>"ResourceFormLabel_ref*",'r.fk_code_type_resource'=>'ResourceTypeCode','r.description'=>'ResourceFormLabel_description','r.note_private'=>"NotePrivate",'r.note_public'=>"NotePublic",'r.asset_number'=>'AssetNumber','r.datec'=>'DateCreation');
|
||||
// Add extra fields
|
||||
$sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'resource' AND entity = ".$conf->entity;
|
||||
$sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'resource' AND entity IN (0,".$conf->entity.")";
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql) // This can fail when class is used on old database (during migration for example)
|
||||
{
|
||||
|
||||
@ -255,7 +255,7 @@ class modService extends DolibarrModules
|
||||
if (! empty($conf->barcode->enabled)) $this->import_fields_array[$r]=array_merge($this->import_fields_array[$r],array('p.barcode'=>'BarCode'));
|
||||
if (! empty($conf->global->PRODUCT_USE_UNITS)) $this->import_fields_array[$r]['p.fk_unit'] = 'Unit';
|
||||
// Add extra fields
|
||||
$sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'product' AND entity = ".$conf->entity;
|
||||
$sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'product' AND entity IN (0,".$conf->entity.")";
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql) // This can fail when class is used on old database (during migration for example)
|
||||
{
|
||||
|
||||
@ -395,7 +395,7 @@ class modSociete extends DolibarrModules
|
||||
's.barcode'=>'BarCode','s.datec'=>"DateCreation"
|
||||
);
|
||||
// Add extra fields
|
||||
$sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'societe' AND entity = ".$conf->entity;
|
||||
$sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'societe' AND entity IN (0,".$conf->entity.")";
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql) // This can fail when class is used on old database (during migration for example)
|
||||
{
|
||||
@ -441,11 +441,11 @@ class modSociete extends DolibarrModules
|
||||
$this->import_tables_array[$r]=array('s'=>MAIN_DB_PREFIX.'socpeople','extra'=>MAIN_DB_PREFIX.'socpeople_extrafields'); // List of tables to insert into (insert done in same order)
|
||||
$this->import_fields_array[$r]=array(
|
||||
's.fk_soc'=>'ThirdPartyName','s.civility'=>'UserTitle','s.lastname'=>"Lastname*",'s.firstname'=>"Firstname",'s.address'=>"Address",'s.zip'=>"Zip",
|
||||
's.town'=>"Town",'s.fk_pays'=>"CountryCode",'s.birthday'=>"BirthdayDate",'s.poste'=>"Role",'s.phone'=>"Phone",'s.phone_perso'=>"PhonePerso",
|
||||
's.town'=>"Town",'s.fk_departement'=>"StateId",'s.fk_pays'=>"CountryCode",'s.birthday'=>"BirthdayDate",'s.poste'=>"Role",'s.phone'=>"Phone",'s.phone_perso'=>"PhonePerso",
|
||||
's.phone_mobile'=>"PhoneMobile",'s.fax'=>"Fax",'s.email'=>"Email",'s.note_private'=>"Note",'s.note_public'=>"Note",'s.datec'=>"DateCreation"
|
||||
);
|
||||
// Add extra fields
|
||||
$sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'socpeople' AND entity = ".$conf->entity;
|
||||
$sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'socpeople' AND entity IN (0,".$conf->entity.")";
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql) // This can fail when class is used on old database (during migration for example)
|
||||
{
|
||||
@ -461,7 +461,7 @@ class modSociete extends DolibarrModules
|
||||
$this->import_convertvalue_array[$r]=array(
|
||||
's.fk_soc'=>array('rule'=>'fetchidfromref','file'=>'/societe/class/societe.class.php','class'=>'Societe','method'=>'fetch','element'=>'ThirdParty'),
|
||||
's.fk_departement'=>array('rule'=>'fetchidfromcodeid','classfile'=>'/core/class/cstate.class.php','class'=>'Cstate','method'=>'fetch','dict'=>'DictionaryState'),
|
||||
's.fk_pays'=>array('rule'=>'fetchidfromcodeid','classfile'=>'/core/class/ccountry.class.php','class'=>'Ccountry','method'=>'fetch','dict'=>'DictionaryCountry'),
|
||||
's.fk_pays'=>array('rule'=>'fetchidfromcodeid','classfile'=>'/core/class/ccountry.class.php','class'=>'Ccountry','method'=>'fetch','dict'=>'DictionaryCountry'),
|
||||
);
|
||||
//$this->import_convertvalue_array[$r]=array('s.fk_soc'=>array('rule'=>'lastrowid',table='t');
|
||||
$this->import_regex_array[$r]=array('s.birthday'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$','s.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]( [0-9][0-9]:[0-9][0-9]:[0-9][0-9])?$');
|
||||
@ -480,11 +480,14 @@ class modSociete extends DolibarrModules
|
||||
$this->import_tables_array[$r]=array('sr'=>MAIN_DB_PREFIX.'societe_rib');
|
||||
$this->import_fields_array[$r]=array('sr.fk_soc'=>"ThirdPartyName*",'sr.bank'=>"Bank",
|
||||
'sr.code_banque'=>"BankCode",'sr.code_guichet'=>"DeskCode",'sr.number'=>"BankAccountNumber*",
|
||||
'sr.cle_rib'=>"BankAccountNumberKey",'sr.bic'=>"BIC",'sr.iban_prefix'=>"IBAN", 'sr.domiciliation'=>"BankAccountDomiciliation",'sr.proprio' => "BankAccountOwner", 'sr.owner_address' => "BankAccountOwnerAddress", 'sr.default_rib' => 'Default'
|
||||
'sr.cle_rib'=>"BankAccountNumberKey",'sr.bic'=>"BIC",'sr.iban_prefix'=>"IBAN", 'sr.domiciliation'=>"BankAccountDomiciliation",'sr.proprio' => "BankAccountOwner", 'sr.owner_address' => "BankAccountOwnerAddress", 'sr.default_rib' => 'Default',
|
||||
'sr.fk_departement'=>"StateId",'sr.fk_pays'=>"CountryCode"
|
||||
);
|
||||
|
||||
$this->import_convertvalue_array[$r]=array(
|
||||
'sr.fk_soc'=>array('rule'=>'fetchidfromref','classfile'=>'/societe/class/societe.class.php','class'=>'Societe','method'=>'fetch','element'=>'ThirdParty')
|
||||
'sr.fk_soc'=>array('rule'=>'fetchidfromref','classfile'=>'/societe/class/societe.class.php','class'=>'Societe','method'=>'fetch','element'=>'ThirdParty'),
|
||||
'sr.fk_departement'=>array('rule'=>'fetchidfromcodeid','classfile'=>'/core/class/cstate.class.php','class'=>'Cstate','method'=>'fetch','dict'=>'DictionaryState'),
|
||||
'sr.fk_pays'=>array('rule'=>'fetchidfromcodeid','classfile'=>'/core/class/ccountry.class.php','class'=>'Ccountry','method'=>'fetch','dict'=>'DictionaryCountry'),
|
||||
);
|
||||
$this->import_examplevalues_array[$r]=array('sr.fk_soc'=>"MyBigCompany",'sr.bank'=>"ING",
|
||||
'sr.code_banque'=>"0000", 'sr.code_guichet'=>"1111",'sr.number'=>"3333333333",
|
||||
|
||||
@ -261,7 +261,7 @@ class modUser extends DolibarrModules
|
||||
'u.dateemployment'=>'DateEmployment','u.salary'=>'Salary','u.color'=>'Color','u.api_key'=>'ApiKey','u.datec'=>"DateCreation"
|
||||
);
|
||||
// Add extra fields
|
||||
$sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'user' AND entity = ".$conf->entity;
|
||||
$sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'user' AND entity IN (0,".$conf->entity.")";
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql) // This can fail when class is used on old database (during migration for example)
|
||||
{
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015 Charlie Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2018 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015-2018 Charlene Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2018 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -191,10 +191,11 @@ class pdf_beluga extends ModelePDFProjects
|
||||
|
||||
// Complete object by loading several other informations
|
||||
$task = new Task($this->db);
|
||||
$tasksarray = $task->getTasksArray(0,0,$object->id);
|
||||
$tasksarray = array();
|
||||
$tasksarray = $task->getTasksArray(0, 0, $object->id);
|
||||
|
||||
if (! $object->id > 0) // Special case when used with object = specimen, we may return all lines
|
||||
{
|
||||
// Special case when used with object = specimen, we may return all lines
|
||||
if (! $object->id > 0) {
|
||||
$tasksarray=array_slice($tasksarray, 0, min(5, count($tasksarray)));
|
||||
}
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2006-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Charles-Fr BENKE <charles.fr@benke.fr>
|
||||
* Copyright (C) 2015-2018 Charlene BENKE <charlie@patas-monkey.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -346,7 +346,7 @@ class pdf_paiement
|
||||
*/
|
||||
function _pagehead(&$pdf, $page, $showaddress, $outputlangs)
|
||||
{
|
||||
global $langs;
|
||||
global $langs, $conf;
|
||||
|
||||
// Do not add the BACKGROUND as this is a report
|
||||
//pdf_pagehead($pdf,$outputlangs,$this->page_hauteur);
|
||||
|
||||
@ -96,7 +96,7 @@ class EmailCollector extends CommonObject
|
||||
'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'visible'=>1, 'enabled'=>1, 'position'=>30, 'notnull'=>-1, 'searchall'=>1, 'help'=>'Example: My Email collector'),
|
||||
'description' => array('type'=>'text', 'label'=>'Description', 'visible'=>-1, 'enabled'=>1, 'position'=>60, 'notnull'=>-1),
|
||||
'host' => array('type'=>'varchar(255)', 'label'=>'EMailHost', 'visible'=>1, 'enabled'=>1, 'position'=>100, 'notnull'=>1, 'searchall'=>1, 'comment'=>"IMAP server", 'help'=>'Example: imap.gmail.com'),
|
||||
'user' => array('type'=>'varchar(128)', 'label'=>'Login', 'visible'=>1, 'enabled'=>1, 'position'=>101, 'notnull'=>1, 'index'=>1, 'comment'=>"IMAP login", 'help'=>'Example: myacount@gmail.com'),
|
||||
'login' => array('type'=>'varchar(128)', 'label'=>'Login', 'visible'=>1, 'enabled'=>1, 'position'=>101, 'notnull'=>1, 'index'=>1, 'comment'=>"IMAP login", 'help'=>'Example: myacount@gmail.com'),
|
||||
'password' => array('type'=>'password', 'label'=>'Password', 'visible'=>-1, 'enabled'=>1, 'position'=>102, 'notnull'=>1, 'comment'=>"IMAP password"),
|
||||
'source_directory' => array('type'=>'varchar(255)', 'label'=>'MailboxSourceDirectory', 'visible'=>-1, 'enabled'=>1, 'position'=>103, 'notnull'=>1, 'default' => 'Inbox', 'help'=>'Example: INBOX'),
|
||||
//'filter' => array('type'=>'text', 'label'=>'Filter', 'visible'=>1, 'enabled'=>1, 'position'=>105),
|
||||
@ -161,7 +161,7 @@ class EmailCollector extends CommonObject
|
||||
|
||||
|
||||
public $host;
|
||||
public $user;
|
||||
public $login;
|
||||
public $password;
|
||||
public $source_directory;
|
||||
public $target_directory;
|
||||
@ -829,7 +829,7 @@ class EmailCollector extends CommonObject
|
||||
$this->error=$langs->trans('ErrorFieldRequired', 'EMailHost');
|
||||
return -1;
|
||||
}
|
||||
if (empty($this->user))
|
||||
if (empty($this->login))
|
||||
{
|
||||
$this->error=$langs->trans('ErrorFieldRequired', 'Login');
|
||||
return -1;
|
||||
@ -855,7 +855,7 @@ class EmailCollector extends CommonObject
|
||||
$connectstringsource = $connectstringserver.imap_utf7_encode($sourcedir);
|
||||
$connectstringtarget = $connectstringserver.imap_utf7_encode($targetdir);
|
||||
|
||||
$connection = imap_open($connectstringsource, $this->user, $this->password);
|
||||
$connection = imap_open($connectstringsource, $this->login, $this->password);
|
||||
if (! $connection)
|
||||
{
|
||||
$this->error = 'Failed to open IMAP connection '.$connectstringsource;
|
||||
|
||||
@ -289,7 +289,7 @@ if (empty($reshook))
|
||||
if (! $error)
|
||||
{
|
||||
// Actions on extra fields
|
||||
$result = $object->insertExtraFields('FICHINTER_MODIFY');
|
||||
$result = $object->insertExtraFields('EXPENSEREPORT_MODIFY');
|
||||
if ($result < 0)
|
||||
{
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
|
||||
@ -612,6 +612,7 @@ class PaiementFourn extends Paiement
|
||||
$this->ref = 'SPECIMEN';
|
||||
$this->specimen=1;
|
||||
$this->facid = 1;
|
||||
$this->socid = 1;
|
||||
$this->datepaye = $nownotime;
|
||||
}
|
||||
|
||||
|
||||
@ -728,3 +728,5 @@ UPDATE llx_cronjob set entity = 0 where entity = 1 and label in ('PurgeDeleteTem
|
||||
|
||||
-- VMYSQL4.3 ALTER TABLE llx_c_shipment_mode MODIFY COLUMN tracking varchar(255) NULL;
|
||||
-- VPGSQL8.2 ALTER TABLE llx_c_shipment_mode ALTER COLUMN tracking DROP NOT NULL;
|
||||
|
||||
ALTER TABLE llx_paiementfourn ADD COLUMN fk_user_modif integer AFTER fk_user_author;
|
||||
|
||||
@ -159,7 +159,7 @@ CREATE TABLE llx_emailcollector_emailcollector(
|
||||
label varchar(255),
|
||||
description text,
|
||||
host varchar(255),
|
||||
user varchar(128),
|
||||
login varchar(128),
|
||||
password varchar(128),
|
||||
source_directory varchar(255) NOT NULL,
|
||||
target_directory varchar(255),
|
||||
|
||||
@ -22,7 +22,7 @@ CREATE TABLE llx_emailcollector_emailcollector(
|
||||
label varchar(255),
|
||||
description text,
|
||||
host varchar(255),
|
||||
user varchar(128),
|
||||
login varchar(128),
|
||||
password varchar(128),
|
||||
source_directory varchar(255) NOT NULL,
|
||||
target_directory varchar(255),
|
||||
|
||||
@ -489,7 +489,6 @@ if (! $error && $db->connected && $action == "set")
|
||||
'thirdparties' => 'thirdparty',
|
||||
'usergroups' => 'usergroups',
|
||||
'users' => 'user',
|
||||
'usergroups' => 'usergroups',
|
||||
);
|
||||
foreach($docs as $cursordir => $cursorfile)
|
||||
{
|
||||
|
||||
@ -39,6 +39,6 @@ Floors=Floors
|
||||
Floor=Floor
|
||||
AddTable=Add table
|
||||
Place=Place
|
||||
TakeboxNecesary='TakeBOX' application required
|
||||
TakeposConnectorNecesary='TakePOS Connector' required
|
||||
OrderPrinters=Order printers
|
||||
SearchProduct=Search product
|
||||
|
||||
@ -37,5 +37,5 @@ Floors=Salones
|
||||
Floor=Salón
|
||||
AddTable=Añadir mesa
|
||||
Place=Puesto
|
||||
TakeboxNecesary=Aplicación 'TakeBOX' requerida
|
||||
TakeposConnectorNecesary=TakePOS Connector requerido
|
||||
OrderPrinters=Impresoras de pedido
|
||||
|
||||
@ -38,6 +38,6 @@ Floors=Etages
|
||||
Floor=Etage
|
||||
AddTable=Ajouter une table
|
||||
Place=Marché
|
||||
TakeboxNecesary=Application 'TakeBOX' requise
|
||||
TakeposConnectorNecesary=Application 'TakePOS Connector' requise
|
||||
OrderPrinters=Commande imprimantes
|
||||
SearchProduct=Rechercher un produit
|
||||
|
||||
@ -38,6 +38,6 @@ Floors=Stāvi
|
||||
Floor=Stāvs
|
||||
AddTable=Pievienot tabulu
|
||||
Place=Vieta
|
||||
TakeboxNecesary=Nepieciešams lietot "TakeBOX"
|
||||
TakeposConnectorNecesary=Nepieciešams lietot "TakePOS Connector"
|
||||
OrderPrinters=Pasūtīt printerus
|
||||
SearchProduct=Meklēt produktu
|
||||
|
||||
@ -543,7 +543,7 @@ if ($resql)
|
||||
print '</td>';
|
||||
}
|
||||
// Duration
|
||||
if (! empty($arrayfields['p.duration']['checked']))
|
||||
if ((string) $type == '1' && ! empty($arrayfields['p.duration']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print ' ';
|
||||
@ -643,7 +643,7 @@ if ($resql)
|
||||
if (! empty($arrayfields['p.label']['checked'])) print_liste_field_titre($arrayfields['p.label']['label'], $_SERVER["PHP_SELF"],"p.label","",$param,"",$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.fk_product_type']['checked'])) print_liste_field_titre($arrayfields['p.fk_product_type']['label'], $_SERVER["PHP_SELF"],"p.fk_product_type","",$param,"",$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.barcode']['checked'])) print_liste_field_titre($arrayfields['p.barcode']['label'], $_SERVER["PHP_SELF"],"p.barcode","",$param,"",$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.duration']['checked'])) print_liste_field_titre($arrayfields['p.duration']['label'], $_SERVER["PHP_SELF"],"p.duration","",$param,'align="center"',$sortfield,$sortorder);
|
||||
if ((string) $type == '1' && ! empty($arrayfields['p.duration']['checked'])) print_liste_field_titre($arrayfields['p.duration']['label'], $_SERVER["PHP_SELF"],"p.duration","",$param,'align="center"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.sellprice']['checked'])) print_liste_field_titre($arrayfields['p.sellprice']['label'], $_SERVER["PHP_SELF"],"","",$param,'align="right"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.minbuyprice']['checked'])) print_liste_field_titre($arrayfields['p.minbuyprice']['label'], $_SERVER["PHP_SELF"],"","",$param,'align="right"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.numbuyprice']['checked'])) print_liste_field_titre($arrayfields['p.numbuyprice']['label'], $_SERVER["PHP_SELF"],"","",$param,'align="right"',$sortfield,$sortorder);
|
||||
@ -759,7 +759,7 @@ if ($resql)
|
||||
}
|
||||
|
||||
// Duration
|
||||
if (! empty($arrayfields['p.duration']['checked']))
|
||||
if ((string) $type == '1' && ! empty($arrayfields['p.duration']['checked']))
|
||||
{
|
||||
print '<td align="center">';
|
||||
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -1459,8 +1460,8 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action=='showlog_default_
|
||||
// Log of previous customer prices
|
||||
$backbutton='<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '">' . $langs->trans("Back") . '</a>';
|
||||
|
||||
if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print_barre_liste($langs->trans("DefaultPrice"), 0, $_SERVER["PHP_SELF"], '', '', '', $backbutton, $num, $num, 'title_accountancy.png');
|
||||
else print_barre_liste($langs->trans("PriceByCustomerLog"), 0, $_SERVER["PHP_SELF"], '', '', '', '', $num, $num, 'title_accountancy.png');
|
||||
if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print_barre_liste($langs->trans("DefaultPrice"), 0, $_SERVER["PHP_SELF"], '', '', '', $backbutton, 0, $num, 'title_accountancy.png');
|
||||
else print_barre_liste($langs->trans("PriceByCustomerLog"), 0, $_SERVER["PHP_SELF"], '', '', '', '', 0, $num, 'title_accountancy.png');
|
||||
//if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print_barre_liste($langs->trans("DefaultPrice"),'','','','','',$backbutton, 0, 0, 'title_accountancy.png');
|
||||
//else print_barre_liste($langs->trans("PriceByCustomerLog"),'','','','','','', 0, 0, 'title_accountancy.png');
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@ $sortfield = GETPOST("sortfield");
|
||||
$sortorder = GETPOST("sortorder");
|
||||
if (!$sortorder) $sortorder = 'DESC';
|
||||
if (!$sortfield) $sortfield = 'cf.date_creation';
|
||||
$page = GETPOST("page");
|
||||
$page = GETPOST('page','int') ? GETPOST('page','int') : 0;
|
||||
if ($page < 0) $page = 0;
|
||||
$offset = $limit * $page;
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2006-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2009-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2018 Juanjo Menent <jmenent@2byte.e>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -938,7 +939,7 @@ if ($source == 'invoice')
|
||||
|
||||
if ($action != 'dopayment') // Do not change amount if we just click on first dopayment
|
||||
{
|
||||
$amount=price2num($invoice->total_ttc - $invoice->getSommePaiement());
|
||||
$amount=price2num($invoice->total_ttc - ($invoice->getSommePaiement() + $invoice->getSumCreditNotesUsed()));
|
||||
if (GETPOST("amount",'int')) $amount=GETPOST("amount",'int');
|
||||
$amount=price2num($amount);
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2008 Patrick Raguin <patrick.raguin@auguria.net>
|
||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2018 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2013 Peter Fontaine <contact@peterfontaine.fr>
|
||||
@ -86,7 +86,7 @@ class Societe extends CommonObject
|
||||
'entity' =>array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'default'=>1, 'notnull'=>1, 'index'=>1, 'position'=>20),
|
||||
'note_public' =>array('type'=>'text', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>60),
|
||||
'note_private' =>array('type'=>'text', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>61),
|
||||
'date_creation' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>500),
|
||||
'datec' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>500),
|
||||
'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>501),
|
||||
//'date_valid' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'position'=>502),
|
||||
'fk_user_creat' =>array('type'=>'integer', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>510),
|
||||
|
||||
@ -170,14 +170,14 @@ if (! empty($conf->service->enabled))
|
||||
|
||||
// Use Takepos printing
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("DolibarrReceiptPrinter").' TakeBOX (<a href="http://en.takepos.com/takebox">'.$langs->trans("TakeboxNecesary").'</a>)';
|
||||
print $langs->trans("DolibarrReceiptPrinter").' (<a href="http://en.takepos.com/connector">'.$langs->trans("TakeposConnectorNecesary").'</a>)';
|
||||
print '<td colspan="2">';
|
||||
print $form->selectyesno("TAKEBOX",$conf->global->TAKEBOX,1);
|
||||
print "</td></tr>\n";
|
||||
|
||||
if ($conf->global->TAKEBOX){
|
||||
print '<tr class="oddeven value"><td>';
|
||||
print $langs->trans("IPAddress").' (<a href="http://en.takepos.com/takebox">'.$langs->trans("TakeboxNecesary").'</a>)';
|
||||
print $langs->trans("IPAddress").' (<a href="http://en.takepos.com/connector">'.$langs->trans("TakeposConnectorNecesary").'</a>)';
|
||||
print '<td colspan="2">';
|
||||
print '<input type="text" size="20" id="TAKEPOS_PRINT_SERVER" name="TAKEPOS_PRINT_SERVER" value="'.$conf->global->TAKEPOS_PRINT_SERVER.'">';
|
||||
print '</td></tr>';
|
||||
|
||||
@ -47,6 +47,21 @@ button.calcbutton2 {
|
||||
height:24%;
|
||||
}
|
||||
|
||||
button.calcbutton3 {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
padding: 0;
|
||||
line-height: normal;
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
font-size:120%;
|
||||
overflow: visible; /* removes extra width in IE */
|
||||
width:12%;
|
||||
height:24%;
|
||||
|
||||
}
|
||||
|
||||
button.actionbutton {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
@ -110,5 +125,5 @@ div.description{
|
||||
p.description_content{
|
||||
padding:10px;
|
||||
margin:0px;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -57,6 +57,7 @@ else{
|
||||
if ($action == 'valid' && $user->rights->facture->creer){
|
||||
if ($pay=="cash") $bankaccount=$conf->global->CASHDESK_ID_BANKACCOUNT_CASH;
|
||||
else if ($pay=="card") $bankaccount=$conf->global->CASHDESK_ID_BANKACCOUNT_CB;
|
||||
else if ($pay=="cheque") $bankaccount=$conf->global->CASHDESK_ID_BANKACCOUNT_CHEQUE;
|
||||
$now=dol_now();
|
||||
$invoice = new Facture($db);
|
||||
$invoice->fetch($placeid);
|
||||
@ -69,6 +70,7 @@ if ($action == 'valid' && $user->rights->facture->creer){
|
||||
$payment->amounts[$invoice->id]=$invoice->total_ttc;
|
||||
if ($pay=="cash") $payment->paiementid=4;
|
||||
else if ($pay=="card") $payment->paiementid=6;
|
||||
else if ($pay=="cheque") $payment->paiementid=7;
|
||||
$payment->num_paiement=$invoice->facnumber;
|
||||
$payment->create($user);
|
||||
$payment->addPaymentToBank($user, 'payment', '(CustomerInvoicePayment)', $bankaccount, '', '');
|
||||
|
||||
@ -101,20 +101,21 @@ $langs->loadLangs(array("main", "bills", "cashdesk"));
|
||||
<button type="button" class="calcbutton" onclick="addreceived(10);">10</button>
|
||||
<button type="button" class="calcbutton" onclick="addreceived(20);">20</button>
|
||||
<button type="button" class="calcbutton" onclick="addreceived(50);">50</button>
|
||||
<button type="button" <?php if ($placeid==0) echo "disabled";?> class="calcbutton2" onclick="Validate('cash');"><?php echo $langs->trans("Cash"); ?></button>
|
||||
<button type="button" class="calcbutton2" onclick="Validate('cash');"><?php echo $langs->trans("Cash"); ?></button>
|
||||
<button type="button" class="calcbutton" onclick="addreceived(1);">1</button>
|
||||
<button type="button" class="calcbutton" onclick="addreceived(2);">2</button>
|
||||
<button type="button" class="calcbutton" onclick="addreceived(5);">5</button>
|
||||
<button type="button" <?php if ($placeid==0) echo "disabled";?> class="calcbutton2" onclick="Validate('card');"><?php echo $langs->trans("PaymentTypeCB"); ?></button>
|
||||
<button type="button" class="calcbutton2" onclick="Validate('card');"><?php echo $langs->trans("PaymentTypeCB"); ?></button>
|
||||
<button type="button" class="calcbutton" onclick="addreceived(0.10);">0.10</button>
|
||||
<button type="button" class="calcbutton" onclick="addreceived(0.20);">0.20</button>
|
||||
<button type="button" class="calcbutton" onclick="addreceived(0.50);">0.50</button>
|
||||
<button type="button" class="calcbutton2" onclick="parent.$.colorbox.close();"><span id="printtext"><?php echo $langs->trans("GoBack"); ?></span></button>
|
||||
<button type="button" class="calcbutton2" onclick="Validate('cheque');"><?php echo $langs->trans("Cheque"); ?></button>
|
||||
<button type="button" class="calcbutton" onclick="addreceived(0.01);">0.01</button>
|
||||
<button type="button" class="calcbutton" onclick="addreceived(0.02);">0.02</button>
|
||||
<button type="button" class="calcbutton" onclick="addreceived(0.05);">0.05</button>
|
||||
<button type="button" class="calcbutton2" onclick="reset();"><span style='font-size: 150%;'>C</span></button>
|
||||
<button type="button" class="calcbutton3" onclick="reset();"><span style='font-size: 150%;'>C</span></button>
|
||||
<button type="button" class="calcbutton3" onclick="printclick();"><span id="printtext"><?php echo $langs->trans("GoBack"); ?></span></button>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
* \brief File Class ticket
|
||||
*/
|
||||
|
||||
require_once "ticket.class.php";
|
||||
require_once DOL_DOCUMENT_ROOT . '/ticket/class/ticket.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/contrat/class/contrat.class.php';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user