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

This commit is contained in:
Laurent Destailleur 2019-10-16 14:02:24 +02:00
commit 226e5d81b6
11 changed files with 50 additions and 40 deletions

View File

@ -21,7 +21,7 @@
*/
/**
* \file htdocs/comm/action/list.php
* \file htdocs/comm/action/list.php
* \ingroup agenda
* \brief Page to list actions
*/
@ -239,7 +239,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
$sql = "SELECT";
if ($usergroup > 0) $sql.=" DISTINCT";
$sql.= " s.nom as societe, s.rowid as socid, s.client, s.email as socemail,";
$sql.= " a.id, a.label, a.note, a.datep as dp, a.datep2 as dp2,";
$sql.= " a.id, a.label, a.note, a.datep as dp, a.datep2 as dp2, a.fulldayevent, a.location,";
$sql.= ' a.fk_user_author,a.fk_user_action,';
$sql.= " a.fk_contact, a.note, a.percent as percent,";
$sql.= " a.fk_element, a.elementtype, a.datec, a.tms as datem,";
@ -288,14 +288,14 @@ if (! empty($actioncode))
elseif ($actioncode == 'AC_ALL_AUTO') $sql.= " AND c.type = 'systemauto'";
else
{
if (is_array($actioncode))
{
$sql.=" AND c.code IN ('".implode("','", $actioncode)."')";
}
else
{
$sql.=" AND c.code IN ('".implode("','", explode(',', $actioncode))."')";
}
if (is_array($actioncode))
{
$sql.=" AND c.code IN ('".implode("','", $actioncode)."')";
}
else
{
$sql.=" AND c.code IN ('".implode("','", explode(',', $actioncode))."')";
}
}
}
}
@ -462,7 +462,7 @@ if ($resql)
print $form->selectDate($datestart, 'datestart', 0, 0, 1, '', 1, 0);
print '</td>';
}
if (! empty($arrayfields['a.datep2']['checked'])) {
if (! empty($arrayfields['a.datep2']['checked'])) {
print '<td class="liste_titre nowraponall" align="center">';
print $form->selectDate($dateend, 'dateend', 0, 0, 1, '', 1, 0);
print '</td>';
@ -550,6 +550,7 @@ if ($resql)
$actionstatic->type_label=$obj->type_label;
$actionstatic->type_picto=$obj->type_picto;
$actionstatic->label=$obj->label;
$actionstatic->location = $obj->location;
$actionstatic->note=dol_htmlentitiesbr($obj->note);
print '<tr class="oddeven">';
@ -611,11 +612,11 @@ if ($resql)
print $form->textwithtooltip(dol_trunc($text, 40), $actionstatic->note);
print '</td>';
}
$formatToUse = $obj->fulldayevent?'day':'dayhour';
// Start date
if (! empty($arrayfields['a.datep']['checked'])) {
print '<td align="center">';
print dol_print_date($db->jdate($obj->dp), "dayhour");
print dol_print_date($db->jdate($obj->dp), $formatToUse);
$late=0;
if ($obj->percent == 0 && $obj->dp && $db->jdate($obj->dp) < ($now - $delay_warning)) $late=1;
if ($obj->percent == 0 && ! $obj->dp && $obj->dp2 && $db->jdate($obj->dp) < ($now - $delay_warning)) $late=1;
@ -628,7 +629,7 @@ if ($resql)
// End date
if (! empty($arrayfields['a.datep2']['checked'])) {
print '<td align="center">';
print dol_print_date($db->jdate($obj->dp2), "dayhour");
print dol_print_date($db->jdate($obj->dp2), $formatToUse);
print '</td>';
}

View File

@ -166,7 +166,7 @@ class box_last_modified_ticket extends ModeleBoxes
// Date creation
$this->info_box_contents[$i][$r] = array(
'td' => 'class="right"',
'text' => dol_print_date($this->db->idate($objp->datec), 'dayhour')
'text' => dol_print_date($datec, 'dayhour')
);
$r++;

View File

@ -166,7 +166,7 @@ class box_last_ticket extends ModeleBoxes
// Date creation
$this->info_box_contents[$i][$r] = array(
'td' => 'class="right"',
'text' => dol_print_date($this->db->idate($objp->datec), 'dayhour'),
'text' => dol_print_date($datec, 'dayhour'),
);
$r++;

View File

@ -5607,10 +5607,10 @@ class Form
$reset_scripts = "";
// Generate the date part, depending on the use or not of the javascript calendar
$reset_scripts .= 'jQuery(\'#'.$prefix.'\').val(\''.dol_print_date(dol_now(), 'day').'\');';
$reset_scripts .= 'jQuery(\'#'.$prefix.'day\').val(\''.dol_print_date(dol_now(), '%d').'\');';
$reset_scripts .= 'jQuery(\'#'.$prefix.'month\').val(\''.dol_print_date(dol_now(), '%m').'\');';
$reset_scripts .= 'jQuery(\'#'.$prefix.'year\').val(\''.dol_print_date(dol_now(), '%Y').'\');';
$reset_scripts .= 'jQuery(\'#'.$prefix.'\').val(\''.dol_print_date(dol_now(), 'day', 'tzuser').'\');';
$reset_scripts .= 'jQuery(\'#'.$prefix.'day\').val(\''.dol_print_date(dol_now(), '%d', 'tzuser').'\');';
$reset_scripts .= 'jQuery(\'#'.$prefix.'month\').val(\''.dol_print_date(dol_now(), '%m', 'tzuser').'\');';
$reset_scripts .= 'jQuery(\'#'.$prefix.'year\').val(\''.dol_print_date(dol_now(), '%Y', 'tzuser').'\');';
/*if ($usecalendar == "eldy")
{
$base=DOL_URL_ROOT.'/core/';
@ -5627,7 +5627,7 @@ class Form
{
if ($fullday) $reset_scripts .= " if (jQuery('#fullday:checked').val() == null) {";
//$reset_scripts .= 'this.form.elements[\''.$prefix.'hour\'].value=formatDate(new Date(), \'HH\'); ';
$reset_scripts .= 'jQuery(\'#'.$prefix.'hour\').val(\''.dol_print_date(dol_now(), '%H').'\');';
$reset_scripts .= 'jQuery(\'#'.$prefix.'hour\').val(\''.dol_print_date(dol_now(), '%H', 'tzuser').'\');';
if ($fullday) $reset_scripts .= ' } ';
}
// Update the minute part
@ -5635,7 +5635,7 @@ class Form
{
if ($fullday) $reset_scripts .= " if (jQuery('#fullday:checked').val() == null) {";
//$reset_scripts .= 'this.form.elements[\''.$prefix.'min\'].value=formatDate(new Date(), \'mm\'); ';
$reset_scripts .= 'jQuery(\'#'.$prefix.'min\').val(\''.dol_print_date(dol_now(), '%M').'\');';
$reset_scripts .= 'jQuery(\'#'.$prefix.'min\').val(\''.dol_print_date(dol_now(), '%M', 'tzuser').'\');';
if ($fullday) $reset_scripts .= ' } ';
}
// If reset_scripts is not empty, print the link with the reset_scripts in the onClick

View File

@ -269,7 +269,7 @@ class pdf_strato extends ModelePDFContract
$tab_top = 90;
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)?42:10);
// Affiche notes
// Display notes
if (! empty($object->note_public))
{
$tab_top -= 2;
@ -411,7 +411,7 @@ class pdf_strato extends ModelePDFContract
$pdf->setPage($pageposafter); $curY = $tab_top_newpage;
}
$pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut
$pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font
// Detect if some page were added automatically and output _tableau for past pages
while ($pagenb < $pageposafter)
@ -613,7 +613,7 @@ class pdf_strato extends ModelePDFContract
pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->CONTRACT_DRAFT_WATERMARK);
}
//Prepare la suite
//Prepare next
$pdf->SetTextColor(0, 0, 60);
$pdf->SetFont('', 'B', $default_font_size + 3);
@ -727,7 +727,7 @@ class pdf_strato extends ModelePDFContract
$this->recipient = $object->thirdparty;
//Recipient name
// On peut utiliser le nom de la societe du contact
// You can use the name of the contact company
if ($usecontact && !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) {
$thirdparty = $object->contact;
} else {

View File

@ -218,7 +218,7 @@ class pdf_espadon extends ModelePdfExpedition
if ($conf->expedition->dir_output)
{
// Definition de $dir et $file
// Definition of $dir and $file
if ($object->specimen)
{
$dir = $conf->expedition->dir_output."/sending";
@ -390,10 +390,10 @@ class pdf_espadon extends ModelePdfExpedition
}
// Use new auto collum system
// Use new auto column system
$this->prepareArrayColumnField($object, $outputlangs, $hidedetails, $hidedesc, $hideref);
// Simulation de tableau pour connaitre la hauteur de la ligne de titre
// Table simulation to know the height of the title line
$pdf->startTransaction();
$this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop);
$pdf->rollbackTransaction(true);
@ -606,10 +606,10 @@ class pdf_espadon extends ModelePdfExpedition
$bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
}
// Affiche zone totaux
// Display total area
$posy=$this->_tableau_tot($pdf, $object, 0, $bottomlasttab, $outputlangs);
// Pied de page
// Pagefoot
$this->_pagefoot($pdf, $object, $outputlangs);
if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages();
@ -653,12 +653,12 @@ class pdf_espadon extends ModelePdfExpedition
/**
* Show total to pay
*
* @param PDF $pdf Object PDF
* @param PDF $pdf Object PDF
* @param Facture $object Object invoice
* @param int $deja_regle Montant deja regle
* @param int $posy Position depart
* @param int $deja_regle Amount already paid
* @param int $posy Start Position
* @param Translate $outputlangs Objet langs
* @return int Position pour suite
* @return int Position for suite
*/
protected function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
{
@ -673,7 +673,7 @@ class pdf_espadon extends ModelePdfExpedition
$tab2_hl = 4;
$pdf->SetFont('', 'B', $default_font_size - 1);
// Tableau total
// Total table
$col1x = $this->posxweightvol-50; $col2x = $this->posxweightvol;
/*if ($this->page_largeur < 210) // To work with US executive format
{
@ -824,7 +824,7 @@ class pdf_espadon extends ModelePdfExpedition
pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->SHIPPING_DRAFT_WATERMARK);
}
//Prepare la suite
//Prepare next
$pdf->SetTextColor(0, 0, 60);
$pdf->SetFont('', 'B', $default_font_size + 3);
@ -1006,7 +1006,7 @@ class pdf_espadon extends ModelePdfExpedition
}
//Recipient name
// On peut utiliser le nom de la societe du contact
// You can use the name of the contact company
if ($usecontact && !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) {
$thirdparty = $object->contact;
} else {

View File

@ -85,6 +85,13 @@ class modProduct extends DolibarrModules
$this->const[$r][3] = 'Module to control product codes';
$this->const[$r][4] = 0;
$r++;
$this->const[$r][0] = "PRODUCT_PRICE_UNIQ";
$this->const[$r][1] = "chaine";
$this->const[$r][2] = "1";
$this->const[$r][3] = 'pricing rule by default';
$this->const[$r][4] = 0;
$r++;
/*$this->const[$r][0] = "PRODUCT_ADDON_PDF";
$this->const[$r][1] = "chaine";

View File

@ -349,7 +349,7 @@ if (empty($reshook))
{
$fk_parent_line = 0;
}
$result = $object->addline(
$result = $object->addline(
$desc,
$lines[$i]->subprice,
$lines[$i]->qty,

View File

@ -76,6 +76,7 @@ ContractSentByEMail=Contract %s sent by email
OrderSentByEMail=Sales order %s sent by email
InvoiceSentByEMail=Customer invoice %s sent by email
SupplierOrderSentByEMail=Purchase order %s sent by email
ORDER_SUPPLIER_DELETEInDolibarr=Purchase order %s deleted
SupplierInvoiceSentByEMail=Vendor invoice %s sent by email
ShippingSentByEMail=Shipment %s sent by email
ShippingValidated= Shipment %s validated

View File

@ -1,4 +1,3 @@
<?php
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) ---Put here your own copyright and developer email---

View File

@ -117,6 +117,7 @@ class Thirdparties extends DolibarrApi
* @param int $mode Set to 1 to show only customers
* Set to 2 to show only prospects
* Set to 3 to show only those are not customer neither prospect
* Set to 4 to show only suppliers
* @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.nom:like:'TheCompany%') and (t.date_creation:<:'20160101')"
* @return array Array of thirdparty objects
*/
@ -143,6 +144,7 @@ class Thirdparties extends DolibarrApi
if ($mode == 1) $sql.= " AND t.client IN (1, 3)";
if ($mode == 2) $sql.= " AND t.client IN (2, 3)";
if ($mode == 3) $sql.= " AND t.client IN (0)";
if ($mode == 4) $sql.= " AND t.fournisseur IN (1)";
$sql.= ' AND t.entity IN ('.getEntity('societe').')';
if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql.= " AND t.rowid = sc.fk_soc";
//if ($email != NULL) $sql.= " AND s.email = \"".$email."\"";