Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.6
This commit is contained in:
commit
7505537a3e
16
ChangeLog
16
ChangeLog
@ -2,6 +2,9 @@
|
|||||||
English Dolibarr ChangeLog
|
English Dolibarr ChangeLog
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
|
|
||||||
|
***** ChangeLog for 3.6.4 compared to 3.6.3 *****
|
||||||
|
- Fix: [ bug #2893 ] Dolibarr error when viewing an invoice after changing invoice mask
|
||||||
|
|
||||||
***** ChangeLog for 3.6.3 compared to 3.6.2 *****
|
***** ChangeLog for 3.6.3 compared to 3.6.2 *****
|
||||||
- Fix: ref_ext was not saved when recording a customer order from web service
|
- Fix: ref_ext was not saved when recording a customer order from web service
|
||||||
- Fix: amarok is a bugged theme making dolidroid failed. We switch to eldy automatically with dolidroid.
|
- Fix: amarok is a bugged theme making dolidroid failed. We switch to eldy automatically with dolidroid.
|
||||||
@ -38,6 +41,11 @@ English Dolibarr ChangeLog
|
|||||||
- Fix: [ bug #2542 ] Contracts store localtax preferences
|
- Fix: [ bug #2542 ] Contracts store localtax preferences
|
||||||
- Fix: Bad permission assignments for stock movements actions
|
- Fix: Bad permission assignments for stock movements actions
|
||||||
- Fix: [ bug #2891 ] Category hooks do not work
|
- Fix: [ bug #2891 ] Category hooks do not work
|
||||||
|
- Fix: [ bug #2696 ] Adding complementary attribute fails if code is numerics
|
||||||
|
- Fix: [ bug #3074 ] Accruals accounting use payment date instead of commitment date in turnover reports for salaries
|
||||||
|
- Fix: Not showing product supplier reference when page break
|
||||||
|
- Fix: [ bug #3341 ] Missing translation in /compta/paiement_charge.php
|
||||||
|
- Fix: [ bug #3342 ] Taxes dictionary page does not accept localized decimals for localtax2 rate
|
||||||
|
|
||||||
***** ChangeLog for 3.6.2 compared to 3.6.1 *****
|
***** ChangeLog for 3.6.2 compared to 3.6.1 *****
|
||||||
- Fix: fix ErrorBadValueForParamNotAString error message in price customer multiprice.
|
- Fix: fix ErrorBadValueForParamNotAString error message in price customer multiprice.
|
||||||
@ -211,6 +219,14 @@ Fix: [ bug #2861 ] Undefined variable $res when migrating
|
|||||||
Fix: [ bug #2837 ] Product list table column header does not match column body
|
Fix: [ bug #2837 ] Product list table column header does not match column body
|
||||||
Fix: [ bug #2835 ] Customer prices of a product shows incorrect history order
|
Fix: [ bug #2835 ] Customer prices of a product shows incorrect history order
|
||||||
Fix: [ bug #2814 ] JPEG photos are not displayed in Product photos page
|
Fix: [ bug #2814 ] JPEG photos are not displayed in Product photos page
|
||||||
|
Fix: [ bug #2715 ] Statistics page has broken layout with long thirdparty names
|
||||||
|
Fix: [ bug #2570 ] [Contacts] Page should not process if ID is invalid
|
||||||
|
Fix: [ bug #3268 ] SQL error when accessing thirdparty log page without a socid parameter
|
||||||
|
Fix: [ bug #3180 ] formObjectOptions hook when editing thirdparty card does not print result
|
||||||
|
Fix: [ bug #1791 ] Margin menu not available if any Finance module is not enabled
|
||||||
|
Fix: [ bug #3310 ] OrderLine::fetch, FactureLigne::fetch and PropaleLigne::fetch do not return anything
|
||||||
|
Fix: [ bug #3206 ] PropaleLigne, OrderLine and FactureLigne given to triggers through update function does not contain all the information
|
||||||
|
Fix: [ bug #3313 ] Error enabling module with PostgreSQL database
|
||||||
|
|
||||||
***** ChangeLog for 3.5.6 compared to 3.5.5 *****
|
***** ChangeLog for 3.5.6 compared to 3.5.5 *****
|
||||||
Fix: Avoid missing class error for fetch_thirdparty method #1973
|
Fix: Avoid missing class error for fetch_thirdparty method #1973
|
||||||
|
|||||||
@ -984,7 +984,7 @@ if ($nboftargetok) {
|
|||||||
print "Remove target $FILENAMEEXEDOLIWAMP.exe...\n";
|
print "Remove target $FILENAMEEXEDOLIWAMP.exe...\n";
|
||||||
unlink "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe";
|
unlink "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe";
|
||||||
|
|
||||||
print "Check that in your Wine setup, you create a Z: drive that point to your /tmp directory.\n";
|
print "Check that in your Wine setup, you create a Z: drive that point to your / directory.\n";
|
||||||
|
|
||||||
$SOURCEBACK=$SOURCE;
|
$SOURCEBACK=$SOURCE;
|
||||||
$SOURCEBACK =~ s/\//\\/g;
|
$SOURCEBACK =~ s/\//\\/g;
|
||||||
|
|||||||
@ -516,7 +516,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
|||||||
$i=0;
|
$i=0;
|
||||||
foreach ($listfieldinsert as $f => $value)
|
foreach ($listfieldinsert as $f => $value)
|
||||||
{
|
{
|
||||||
if ($value == 'price' || preg_match('/^amount/i',$value)) {
|
if ($value == 'price' || preg_match('/^amount/i',$value) || preg_match('/^localtax/i',$value) || $value == 'taux') {
|
||||||
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
|
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
|
||||||
}
|
}
|
||||||
else if ($value == 'entity') {
|
else if ($value == 'entity') {
|
||||||
@ -564,7 +564,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
foreach ($listfieldmodify as $field)
|
foreach ($listfieldmodify as $field)
|
||||||
{
|
{
|
||||||
if ($field == 'price' || preg_match('/^amount/i',$field)) {
|
if ($field == 'price' || preg_match('/^amount/i',$field) || preg_match('/^localtax/i',$field) || $field == 'taux') {
|
||||||
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
|
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
|
||||||
}
|
}
|
||||||
else if ($field == 'entity') {
|
else if ($field == 'entity') {
|
||||||
@ -1080,17 +1080,20 @@ if ($id)
|
|||||||
$align="center";
|
$align="center";
|
||||||
}
|
}
|
||||||
else if ($fieldlist[$field]=='localtax1') {
|
else if ($fieldlist[$field]=='localtax1') {
|
||||||
|
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
|
||||||
if ($obj->localtax1 == 0)
|
if ($obj->localtax1 == 0)
|
||||||
$valuetoshow = '';
|
$valuetoshow = '';
|
||||||
$align="right";
|
$align="right";
|
||||||
}
|
}
|
||||||
else if ($fieldlist[$field]=='localtax2') {
|
else if ($fieldlist[$field]=='localtax2') {
|
||||||
|
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
|
||||||
if ($obj->localtax2 == 0)
|
if ($obj->localtax2 == 0)
|
||||||
$valuetoshow = '';
|
$valuetoshow = '';
|
||||||
$align="right";
|
$align="right";
|
||||||
}
|
}
|
||||||
else if (in_array($fieldlist[$field],array('taux','localtax1','localtax2')))
|
else if (in_array($fieldlist[$field],array('taux','localtax1','localtax2')))
|
||||||
{
|
{
|
||||||
|
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
|
||||||
$align="right";
|
$align="right";
|
||||||
}
|
}
|
||||||
else if (in_array($fieldlist[$field],array('recuperableonly')))
|
else if (in_array($fieldlist[$field],array('recuperableonly')))
|
||||||
|
|||||||
@ -535,13 +535,14 @@ class Propal extends CommonObject
|
|||||||
$price = $pu - $remise;
|
$price = $pu - $remise;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update line
|
//Fetch current line from the database and then clone the object and set it in $oldline property
|
||||||
$this->line=new PropaleLigne($this->db);
|
$line = new PropaleLigne($this->db);
|
||||||
|
$line->fetch($rowid);
|
||||||
|
|
||||||
// Stock previous line records
|
$staticline = clone $line;
|
||||||
$staticline=new PropaleLigne($this->db);
|
|
||||||
$staticline->fetch($rowid);
|
$line->oldline = $staticline;
|
||||||
$this->line->oldline = $staticline;
|
$this->line = $line;
|
||||||
|
|
||||||
// Reorder if fk_parent_line change
|
// Reorder if fk_parent_line change
|
||||||
if (! empty($fk_parent_line) && ! empty($staticline->fk_parent_line) && $fk_parent_line != $staticline->fk_parent_line)
|
if (! empty($fk_parent_line) && ! empty($staticline->fk_parent_line) && $fk_parent_line != $staticline->fk_parent_line)
|
||||||
@ -2862,10 +2863,12 @@ class PropaleLigne extends CommonObject
|
|||||||
$this->date_end = $this->db->jdate($objp->date_end);
|
$this->date_end = $this->db->jdate($objp->date_end);
|
||||||
|
|
||||||
$this->db->free($result);
|
$this->db->free($result);
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($this->db);
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2893,11 +2896,12 @@ class PropaleLigne extends CommonObject
|
|||||||
if (empty($this->total_localtax2)) $this->total_localtax2=0;
|
if (empty($this->total_localtax2)) $this->total_localtax2=0;
|
||||||
if (empty($this->rang)) $this->rang=0;
|
if (empty($this->rang)) $this->rang=0;
|
||||||
if (empty($this->remise)) $this->remise=0;
|
if (empty($this->remise)) $this->remise=0;
|
||||||
if (empty($this->remise_percent)) $this->remise_percent=0;
|
if (empty($this->remise_percent) || ! is_numeric($this->remise_percent)) $this->remise_percent=0;
|
||||||
if (empty($this->info_bits)) $this->info_bits=0;
|
if (empty($this->info_bits)) $this->info_bits=0;
|
||||||
if (empty($this->special_code)) $this->special_code=0;
|
if (empty($this->special_code)) $this->special_code=0;
|
||||||
if (empty($this->fk_parent_line)) $this->fk_parent_line=0;
|
if (empty($this->fk_parent_line)) $this->fk_parent_line=0;
|
||||||
if (empty($this->fk_fournprice)) $this->fk_fournprice=0;
|
if (empty($this->fk_fournprice)) $this->fk_fournprice=0;
|
||||||
|
if (! is_numeric($this->qty)) $this->qty = 0;
|
||||||
|
|
||||||
if (empty($this->pa_ht)) $this->pa_ht=0;
|
if (empty($this->pa_ht)) $this->pa_ht=0;
|
||||||
|
|
||||||
|
|||||||
@ -2403,13 +2403,14 @@ class Commande extends CommonOrder
|
|||||||
$price = ($pu - $remise);
|
$price = ($pu - $remise);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update line
|
//Fetch current line from the database and then clone the object and set it in $oldline property
|
||||||
$this->line=new OrderLine($this->db);
|
$line = new OrderLine($this->db);
|
||||||
|
$line->fetch($rowid);
|
||||||
|
|
||||||
// Stock previous line records
|
$staticline = clone $line;
|
||||||
$staticline=new OrderLine($this->db);
|
|
||||||
$staticline->fetch($rowid);
|
$line->oldline = $staticline;
|
||||||
$this->line->oldline = $staticline;
|
$this->line = $line;
|
||||||
|
|
||||||
// Reorder if fk_parent_line change
|
// Reorder if fk_parent_line change
|
||||||
if (! empty($fk_parent_line) && ! empty($staticline->fk_parent_line) && $fk_parent_line != $staticline->fk_parent_line)
|
if (! empty($fk_parent_line) && ! empty($staticline->fk_parent_line) && $fk_parent_line != $staticline->fk_parent_line)
|
||||||
@ -3218,10 +3219,12 @@ class OrderLine extends CommonOrderLine
|
|||||||
$this->date_end = $this->db->jdate($objp->date_end);
|
$this->date_end = $this->db->jdate($objp->date_end);
|
||||||
|
|
||||||
$this->db->free($result);
|
$this->db->free($result);
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($this->db);
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1133,7 +1133,6 @@ class AccountLine extends CommonObject
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($this->db);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -419,7 +419,7 @@ else
|
|||||||
|
|
||||||
// State
|
// State
|
||||||
print '<tr><td>'.$langs->trans('State').'</td><td>';
|
print '<tr><td>'.$langs->trans('State').'</td><td>';
|
||||||
if ($account->fk_departement > 0) print getState($account->fk_departement);
|
if ($account->state_id > 0) print getState($account->state_id);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Conciliate
|
// Conciliate
|
||||||
|
|||||||
@ -2173,13 +2173,24 @@ class Facture extends CommonInvoice
|
|||||||
$pu_tva = $tabprice[4];
|
$pu_tva = $tabprice[4];
|
||||||
$pu_ttc = $tabprice[5];
|
$pu_ttc = $tabprice[5];
|
||||||
|
|
||||||
// Update line into database
|
// Old properties: $price, $remise (deprecated)
|
||||||
$this->line=new FactureLigne($this->db);
|
$price = $pu;
|
||||||
|
$remise = 0;
|
||||||
|
if ($remise_percent > 0)
|
||||||
|
{
|
||||||
|
$remise = round(($pu * $remise_percent / 100),2);
|
||||||
|
$price = ($pu - $remise);
|
||||||
|
}
|
||||||
|
$price = price2num($price);
|
||||||
|
|
||||||
// Stock previous line records
|
//Fetch current line from the database and then clone the object and set it in $oldline property
|
||||||
$staticline=new FactureLigne($this->db);
|
$line = new FactureLigne($this->db);
|
||||||
$staticline->fetch($rowid);
|
$line->fetch($rowid);
|
||||||
$this->line->oldline = $staticline;
|
|
||||||
|
$staticline = clone $line;
|
||||||
|
|
||||||
|
$line->oldline = $staticline;
|
||||||
|
$this->line = $line;
|
||||||
|
|
||||||
// Reorder if fk_parent_line change
|
// Reorder if fk_parent_line change
|
||||||
if (! empty($fk_parent_line) && ! empty($staticline->fk_parent_line) && $fk_parent_line != $staticline->fk_parent_line)
|
if (! empty($fk_parent_line) && ! empty($staticline->fk_parent_line) && $fk_parent_line != $staticline->fk_parent_line)
|
||||||
@ -2547,15 +2558,16 @@ class Facture extends CommonInvoice
|
|||||||
$numref = "";
|
$numref = "";
|
||||||
$numref = $obj->getNextValue($soc,$this,$mode);
|
$numref = $obj->getNextValue($soc,$this,$mode);
|
||||||
|
|
||||||
if ($numref != "")
|
/**
|
||||||
{
|
* $numref can be empty in case we ask for the last value because if there is no invoice created with the
|
||||||
return $numref;
|
* set up mask.
|
||||||
}
|
*/
|
||||||
else
|
if ($mode != 'last' && !$numref) {
|
||||||
{
|
|
||||||
dol_print_error($db,"Facture::getNextNumRef ".$obj->error);
|
dol_print_error($db,"Facture::getNextNumRef ".$obj->error);
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return $numref;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -3436,10 +3448,12 @@ class FactureLigne extends CommonInvoiceLine
|
|||||||
$this->product_desc = $objp->product_desc;
|
$this->product_desc = $objp->product_desc;
|
||||||
|
|
||||||
$this->db->free($result);
|
$this->db->free($result);
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($this->db);
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -217,6 +217,13 @@ complete_head_from_modules($conf,$langs,null,$head,$h,$type);
|
|||||||
|
|
||||||
dol_fiche_head($head,'byyear',$langs->trans("Statistics"));
|
dol_fiche_head($head,'byyear',$langs->trans("Statistics"));
|
||||||
|
|
||||||
|
$tmp_companies = $form->select_thirdparty_list($socid,'socid',$filter,1, 0, 0, array(), '', 1);
|
||||||
|
//Array passed as an argument to Form::selectarray to build a proper select input
|
||||||
|
$companies = array();
|
||||||
|
|
||||||
|
foreach ($tmp_companies as $value) {
|
||||||
|
$companies[$value['value']] = $value['label'];
|
||||||
|
}
|
||||||
|
|
||||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||||
|
|
||||||
@ -232,7 +239,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
|||||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
||||||
if ($mode == 'customer') $filter='s.client in (1,2,3)';
|
if ($mode == 'customer') $filter='s.client in (1,2,3)';
|
||||||
if ($mode == 'supplier') $filter='s.fournisseur = 1';
|
if ($mode == 'supplier') $filter='s.fournisseur = 1';
|
||||||
print $form->select_company($socid,'socid',$filter,1);
|
print $form->selectarray('socid', $companies, $socid, 1, 0, 0, 'style="width: 100%"');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
// User
|
// User
|
||||||
print '<tr><td>'.$langs->trans("CreatedBy").'</td><td>';
|
print '<tr><td>'.$langs->trans("CreatedBy").'</td><td>';
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
|
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -574,7 +575,7 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
|
|||||||
$chargestatic->lib=$obj->libelle;
|
$chargestatic->lib=$obj->libelle;
|
||||||
$chargestatic->paye=$obj->paye;
|
$chargestatic->paye=$obj->paye;
|
||||||
print '<td>'.$chargestatic->getNomUrl(1).'</td>';
|
print '<td>'.$chargestatic->getNomUrl(1).'</td>';
|
||||||
print '<td align="center">'.dol_print_date($obj->date_ech,'day').'</td>';
|
print '<td align="center">'.dol_print_date($db->jdate($obj->date_ech),'day').'</td>';
|
||||||
print '<td align="right">'.price($obj->amount).'</td>';
|
print '<td align="right">'.price($obj->amount).'</td>';
|
||||||
print '<td align="right">'.price($obj->sumpaid).'</td>';
|
print '<td align="right">'.price($obj->sumpaid).'</td>';
|
||||||
print '<td align="center">'.$chargestatic->getLibStatut(3).'</td>';
|
print '<td align="center">'.$chargestatic->getLibStatut(3).'</td>';
|
||||||
@ -915,7 +916,7 @@ if ($resql)
|
|||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
|
|
||||||
print "<tr ".$bc[$var]."><td>".dol_print_date($obj->da,"day")."</td>";
|
print "<tr ".$bc[$var]."><td>".dol_print_date($db->jdate($obj->da),"day")."</td>";
|
||||||
print "<td><a href=\"action/fiche.php\">$obj->libelle $obj->label</a></td></tr>";
|
print "<td><a href=\"action/fiche.php\">$obj->libelle $obj->label</a></td></tr>";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -178,7 +178,7 @@ if ($_GET["action"] == 'create')
|
|||||||
|
|
||||||
print '<table cellspacing="0" class="border" width="100%" cellpadding="2">';
|
print '<table cellspacing="0" class="border" width="100%" cellpadding="2">';
|
||||||
|
|
||||||
print "<tr class=\"liste_titre\"><td colspan=\"3\">Charge</td>";
|
print "<tr class=\"liste_titre\"><td colspan=\"3\">".$langs->trans('Charge')."</td>";
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Ref").'</td><td colspan="2"><a href="'.DOL_URL_ROOT.'/compta/sociales/charges.php?id='.$chid.'">'.$chid.'</a></td></tr>';
|
print '<tr><td>'.$langs->trans("Ref").'</td><td colspan="2"><a href="'.DOL_URL_ROOT.'/compta/sociales/charges.php?id='.$chid.'">'.$chid.'</a></td></tr>';
|
||||||
print '<tr><td>'.$langs->trans("Type")."</td><td colspan=\"2\">".$charge->type_libelle."</td></tr>\n";
|
print '<tr><td>'.$langs->trans("Type")."</td><td colspan=\"2\">".$charge->type_libelle."</td></tr>\n";
|
||||||
|
|||||||
@ -87,7 +87,7 @@ class RejetPrelevement
|
|||||||
|
|
||||||
dol_syslog("RejetPrelevement::Create id $id");
|
dol_syslog("RejetPrelevement::Create id $id");
|
||||||
$bankaccount = $conf->global->PRELEVEMENT_ID_BANKACCOUNT;
|
$bankaccount = $conf->global->PRELEVEMENT_ID_BANKACCOUNT;
|
||||||
$facs = $this->getListInvoices();
|
$facs = $this->getListInvoices(1);
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ class RejetPrelevement
|
|||||||
for ($i = 0; $i < $num; $i++)
|
for ($i = 0; $i < $num; $i++)
|
||||||
{
|
{
|
||||||
$fac = new Facture($this->db);
|
$fac = new Facture($this->db);
|
||||||
$fac->fetch($facs[$i]);
|
$fac->fetch($facs[$i][0]);
|
||||||
|
|
||||||
// Make a negative payment
|
// Make a negative payment
|
||||||
$pai = new Paiement($this->db);
|
$pai = new Paiement($this->db);
|
||||||
@ -144,7 +144,7 @@ class RejetPrelevement
|
|||||||
* PHP installs sends only the part integer negative
|
* PHP installs sends only the part integer negative
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$pai->amounts[$facs[$i]] = price2num($fac->total_ttc * -1);
|
$pai->amounts[$facs[$i][0]] = price2num($facs[$i][1] * -1);
|
||||||
$pai->datepaye = $date_rejet;
|
$pai->datepaye = $date_rejet;
|
||||||
$pai->paiementid = 3; // type of payment: withdrawal
|
$pai->paiementid = 3; // type of payment: withdrawal
|
||||||
$pai->num_paiement = $fac->ref;
|
$pai->num_paiement = $fac->ref;
|
||||||
@ -152,7 +152,7 @@ class RejetPrelevement
|
|||||||
if ($pai->create($this->user) < 0) // we call with no_commit
|
if ($pai->create($this->user) < 0) // we call with no_commit
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
dol_syslog("RejetPrelevement::Create Error creation payment invoice ".$facs[$i]);
|
dol_syslog("RejetPrelevement::Create Error creation payment invoice ".$facs[$i][0]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -270,21 +270,23 @@ class RejetPrelevement
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve the list of invoices
|
* Retrieve the list of invoices
|
||||||
|
* @param int $amounts If you want to get the amount of the order for each invoice
|
||||||
*
|
*
|
||||||
* @return void
|
* @return Array List of invoices related to the withdrawal line
|
||||||
|
* @TODO A withdrawal line is today linked to one and only one invoice. So the function should return only one object ?
|
||||||
*/
|
*/
|
||||||
private function getListInvoices()
|
private function getListInvoices($amounts=0)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$arr = array();
|
$arr = array();
|
||||||
|
|
||||||
//Returns all invoices of a withdrawal
|
//Returns all invoices of a withdrawal
|
||||||
$sql = "SELECT f.rowid as facid";
|
$sql = "SELECT f.rowid as facid, pl.amount";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."prelevement_facture as pf";
|
$sql.= " FROM ".MAIN_DB_PREFIX."prelevement_facture as pf";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."facture as f";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON (pf.fk_facture = f.rowid)";
|
||||||
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."prelevement_lignes as pl ON (pf.fk_prelevement_lignes = pl.rowid)";
|
||||||
$sql.= " WHERE pf.fk_prelevement_lignes = ".$this->id;
|
$sql.= " WHERE pf.fk_prelevement_lignes = ".$this->id;
|
||||||
$sql.= " AND pf.fk_facture = f.rowid";
|
|
||||||
$sql.= " AND f.entity = ".$conf->entity;
|
$sql.= " AND f.entity = ".$conf->entity;
|
||||||
|
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
@ -298,7 +300,14 @@ class RejetPrelevement
|
|||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$row = $this->db->fetch_row($resql);
|
$row = $this->db->fetch_row($resql);
|
||||||
$arr[$i] = $row[0];
|
if (!$amounts) $arr[$i] = $row[0];
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$arr[$i] = array(
|
||||||
|
$row[0],
|
||||||
|
$row[1]
|
||||||
|
);
|
||||||
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,13 +543,19 @@ if ($mysoc->tva_assuj == 'franchise') // Non assujeti
|
|||||||
* Salaries
|
* Salaries
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if ($modecompta == 'CREANCES-DETTES') {
|
||||||
|
$column = 'p.datev';
|
||||||
|
} else {
|
||||||
|
$column = 'p.datep';
|
||||||
|
}
|
||||||
|
|
||||||
print '<tr><td colspan="4">'.$langs->trans("Salaries").'</td></tr>';
|
print '<tr><td colspan="4">'.$langs->trans("Salaries").'</td></tr>';
|
||||||
$sql = "SELECT p.label as nom, date_format(p.datep,'%Y-%m') as dm, sum(p.amount) as amount, u.firstname, u.lastname, p.fk_user";
|
$sql = "SELECT p.label as nom, date_format($column,'%Y-%m') as dm, sum(p.amount) as amount, u.firstname, u.lastname, p.fk_user";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as p";
|
$sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as p";
|
||||||
$sql.= " INNER JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid=p.fk_user";
|
$sql.= " INNER JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid=p.fk_user";
|
||||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||||
if (! empty($date_start) && ! empty($date_end))
|
if (! empty($date_start) && ! empty($date_end))
|
||||||
$sql.= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'";
|
$sql.= " AND $column >= '".$db->idate($date_start)."' AND $column <= '".$db->idate($date_end)."'";
|
||||||
|
|
||||||
$sql.= " GROUP BY u.rowid, p.label, p.datep, p.fk_user";
|
$sql.= " GROUP BY u.rowid, p.label, p.datep, p.fk_user";
|
||||||
$sql.= " ORDER BY u.firstname";
|
$sql.= " ORDER BY u.firstname";
|
||||||
|
|||||||
@ -473,9 +473,16 @@ $reshook=$hookmanager->executeHooks('addStatisticLine',$parameters,$object,$acti
|
|||||||
/*
|
/*
|
||||||
* Salaries
|
* Salaries
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if ($modecompta == 'CREANCES-DETTES') {
|
||||||
|
$column = 'p.datev';
|
||||||
|
} else {
|
||||||
|
$column = 'p.datep';
|
||||||
|
}
|
||||||
|
|
||||||
$subtotal_ht = 0;
|
$subtotal_ht = 0;
|
||||||
$subtotal_ttc = 0;
|
$subtotal_ttc = 0;
|
||||||
$sql = "SELECT p.label as nom, date_format(p.datep,'%Y-%m') as dm, sum(p.amount) as amount";
|
$sql = "SELECT p.label as nom, date_format($column,'%Y-%m') as dm, sum(p.amount) as amount";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as p";
|
$sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as p";
|
||||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||||
$sql.= " GROUP BY p.label, dm";
|
$sql.= " GROUP BY p.label, dm";
|
||||||
|
|||||||
@ -33,21 +33,23 @@ $id = GETPOST('id', 'int');
|
|||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'contact', $id, 'socpeople&societe');
|
$result = restrictedArea($user, 'contact', $id, 'socpeople&societe');
|
||||||
|
|
||||||
|
$contact = new Contact($db);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$form = new Form($db);
|
||||||
|
|
||||||
$title = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses"));
|
$title = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses"));
|
||||||
|
|
||||||
llxHeader('',$title,'EN:Module_Third_Parties|FR:Module_Tiers|ES:Módulo_Empresas');
|
llxHeader('',$title,'EN:Module_Third_Parties|FR:Module_Tiers|ES:Módulo_Empresas');
|
||||||
|
|
||||||
$form = new Form($db);
|
if ($id > 0)
|
||||||
|
{
|
||||||
$contact = new Contact($db);
|
|
||||||
$contact->fetch($id, $user);
|
$contact->fetch($id, $user);
|
||||||
|
|
||||||
|
|
||||||
$head = contact_prepare_head($contact);
|
$head = contact_prepare_head($contact);
|
||||||
|
|
||||||
dol_fiche_head($head, 'exportimport', $title, 0, 'contact');
|
dol_fiche_head($head, 'exportimport', $title, 0, 'contact');
|
||||||
@ -103,9 +105,7 @@ print '<a href="'.DOL_URL_ROOT.'/contact/vcard.php?id='.$contact->id.'">';
|
|||||||
print img_picto($langs->trans("VCard"),'vcard.png').' ';
|
print img_picto($langs->trans("VCard"),'vcard.png').' ';
|
||||||
print $langs->trans("VCard");
|
print $langs->trans("VCard");
|
||||||
print '</a>';
|
print '</a>';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
|
|||||||
@ -35,6 +35,8 @@ $contactid = GETPOST("id",'int');
|
|||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'contact', $contactid, 'socpeople&societe');
|
$result = restrictedArea($user, 'contact', $contactid, 'socpeople&societe');
|
||||||
|
|
||||||
|
$contact = new Contact($db);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -43,9 +45,10 @@ $result = restrictedArea($user, 'contact', $contactid, 'socpeople&societe');
|
|||||||
|
|
||||||
llxHeader('',$langs->trans("ContactsAddresses"),'EN:Module_Third_Parties|FR:Module_Tiers|ES:Módulo_Empresas');
|
llxHeader('',$langs->trans("ContactsAddresses"),'EN:Module_Third_Parties|FR:Module_Tiers|ES:Módulo_Empresas');
|
||||||
|
|
||||||
|
if ($contactid > 0)
|
||||||
|
{
|
||||||
|
$result = $contact->fetch($contactid, $user);
|
||||||
|
|
||||||
$contact = new Contact($db);
|
|
||||||
$contact->fetch($contactid, $user);
|
|
||||||
$contact->info($contactid);
|
$contact->info($contactid);
|
||||||
|
|
||||||
|
|
||||||
@ -60,6 +63,7 @@ print '</td></tr></table>';
|
|||||||
dol_print_object_info($contact);
|
dol_print_object_info($contact);
|
||||||
|
|
||||||
print "</div>";
|
print "</div>";
|
||||||
|
}
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
|||||||
@ -40,8 +40,10 @@ if ($user->societe_id) $socid=$user->societe_id;
|
|||||||
$result = restrictedArea($user, 'contact', $id, 'socpeople&societe');
|
$result = restrictedArea($user, 'contact', $id, 'socpeople&societe');
|
||||||
|
|
||||||
$contact = new Contact($db);
|
$contact = new Contact($db);
|
||||||
$contact->fetch($id, $user);
|
|
||||||
|
|
||||||
|
if ($id > 0)
|
||||||
|
{
|
||||||
|
$contact->fetch($id, $user);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
@ -73,18 +75,21 @@ if ($action == 'dolibarr2ldap')
|
|||||||
$db->rollback();
|
$db->rollback();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$form = new Form($db);
|
||||||
|
|
||||||
$title = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses"));
|
$title = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses"));
|
||||||
|
|
||||||
llxHeader('',$title,'EN:Module_Third_Parties|FR:Module_Tiers|ES:Módulo_Empresas');
|
llxHeader('',$title,'EN:Module_Third_Parties|FR:Module_Tiers|ES:Módulo_Empresas');
|
||||||
|
|
||||||
$form = new Form($db);
|
if ($id > 0)
|
||||||
|
{
|
||||||
$head = contact_prepare_head($contact);
|
$head = contact_prepare_head($contact);
|
||||||
|
|
||||||
dol_fiche_head($head, 'ldap', $title, 0, 'contact');
|
dol_fiche_head($head, 'ldap', $title, 0, 'contact');
|
||||||
@ -207,7 +212,7 @@ else
|
|||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -38,14 +38,16 @@ if ($user->societe_id) $socid=$user->societe_id;
|
|||||||
$result = restrictedArea($user, 'contact', $id, 'socpeople&societe');
|
$result = restrictedArea($user, 'contact', $id, 'socpeople&societe');
|
||||||
$object = new Contact($db);
|
$object = new Contact($db);
|
||||||
|
|
||||||
|
$result = $object->fetch($id, $user);
|
||||||
|
|
||||||
|
if ($id > 0)
|
||||||
|
{
|
||||||
/*
|
/*
|
||||||
* Action
|
* Action
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($action == 'update' && ! $_POST["cancel"] && $user->rights->societe->contact->creer)
|
if ($action == 'update' && ! $_POST["cancel"] && $user->rights->societe->contact->creer)
|
||||||
{
|
{
|
||||||
$ret = $object->fetch($id);
|
|
||||||
|
|
||||||
// Note: Correct date should be completed with location to have exact GM time of birth.
|
// Note: Correct date should be completed with location to have exact GM time of birth.
|
||||||
$object->birthday = dol_mktime(0,0,0,$_POST["birthdaymonth"],$_POST["birthdayday"],$_POST["birthdayyear"]);
|
$object->birthday = dol_mktime(0,0,0,$_POST["birthdaymonth"],$_POST["birthdayday"],$_POST["birthdayyear"]);
|
||||||
$object->birthday_alert = $_POST["birthday_alert"];
|
$object->birthday_alert = $_POST["birthday_alert"];
|
||||||
@ -61,22 +63,22 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->societe->contact
|
|||||||
$error = $object->error;
|
$error = $object->error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$form = new Form($db);
|
||||||
|
|
||||||
$now=dol_now();
|
$now=dol_now();
|
||||||
|
|
||||||
$title = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses"));
|
$title = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses"));
|
||||||
|
|
||||||
llxHeader('',$title,'EN:Module_Third_Parties|FR:Module_Tiers|ES:Módulo_Empresas');
|
llxHeader('',$title,'EN:Module_Third_Parties|FR:Module_Tiers|ES:Módulo_Empresas');
|
||||||
|
|
||||||
$form = new Form($db);
|
if ($id > 0)
|
||||||
|
{
|
||||||
$object->fetch($id, $user);
|
|
||||||
|
|
||||||
$head = contact_prepare_head($object);
|
$head = contact_prepare_head($object);
|
||||||
|
|
||||||
dol_fiche_head($head, 'perso', $title, 0, 'contact');
|
dol_fiche_head($head, 'perso', $title, 0, 'contact');
|
||||||
@ -244,6 +246,7 @@ if ($action != 'edit')
|
|||||||
print "</div>";
|
print "</div>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|||||||
@ -35,6 +35,9 @@ $id = GETPOST('id', 'int');
|
|||||||
$result = restrictedArea($user, 'contact', $id, 'socpeople&societe');
|
$result = restrictedArea($user, 'contact', $id, 'socpeople&societe');
|
||||||
|
|
||||||
$contact = new Contact($db);
|
$contact = new Contact($db);
|
||||||
|
|
||||||
|
if ($id > 0)
|
||||||
|
{
|
||||||
$result=$contact->fetch($id);
|
$result=$contact->fetch($id);
|
||||||
|
|
||||||
$physicalperson=1;
|
$physicalperson=1;
|
||||||
@ -100,4 +103,5 @@ header("Connection: close");
|
|||||||
header("Content-Type: text/x-vcard; name=\"".$filename."\"");
|
header("Content-Type: text/x-vcard; name=\"".$filename."\"");
|
||||||
|
|
||||||
print $output;
|
print $output;
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@ -118,7 +118,7 @@ if ($action == 'add')
|
|||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
// attrname must be alphabetical and lower case only
|
// attrname must be alphabetical and lower case only
|
||||||
if (isset($_POST["attrname"]) && preg_match("/^[a-z0-9-_]+$/",$_POST['attrname']))
|
if (isset($_POST["attrname"]) && preg_match("/^[a-z0-9-_]+$/",$_POST['attrname']) && !is_numeric($_POST["attrname"]))
|
||||||
{
|
{
|
||||||
// Construct array for parameter (value of select list)
|
// Construct array for parameter (value of select list)
|
||||||
$default_value = GETPOST('default_value');
|
$default_value = GETPOST('default_value');
|
||||||
|
|||||||
@ -136,7 +136,6 @@ class box_prospect extends ModeleBoxes
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
dol_syslog("box_prospect::loadBox not allowed de read this box content",LOG_ERR);
|
|
||||||
$this->info_box_contents[0][0] = array('td' => 'align="left"',
|
$this->info_box_contents[0][0] = array('td' => 'align="left"',
|
||||||
'text' => $langs->trans("ReadPermissionNotAllowed"));
|
'text' => $langs->trans("ReadPermissionNotAllowed"));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -847,7 +847,7 @@ class Form
|
|||||||
$out.= '<option value="'.$obj->rowid.'">'.$label.'</option>';
|
$out.= '<option value="'.$obj->rowid.'">'.$label.'</option>';
|
||||||
}
|
}
|
||||||
|
|
||||||
array_push($outarray, array('key'=>$obj->rowid, 'value'=>$obj->name, 'label'=>$obj->name));
|
array_push($outarray, array('key'=>$obj->rowid, 'value'=>$obj->rowid, 'label'=>$label));
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
if (($i % 10) == 0) $out.="\n";
|
if (($i % 10) == 0) $out.="\n";
|
||||||
|
|||||||
@ -150,7 +150,7 @@ class vCard
|
|||||||
{
|
{
|
||||||
$this->properties["N;CHARSET=".$this->encoding] = encode($family).";".encode($first).";".encode($additional).";".encode($prefix).";".encode($suffix);
|
$this->properties["N;CHARSET=".$this->encoding] = encode($family).";".encode($first).";".encode($additional).";".encode($prefix).";".encode($suffix);
|
||||||
$this->filename = "$first%20$family.vcf";
|
$this->filename = "$first%20$family.vcf";
|
||||||
if ($this->properties["FN"]=="") $this->setFormattedName(trim("$prefix $first $additional $family $suffix"));
|
if (empty($this->properties["FN"])) $this->setFormattedName(trim("$prefix $first $additional $family $suffix"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -134,9 +134,11 @@ function print_eldy_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Financial
|
// Financial
|
||||||
$tmpentry=array('enabled'=>(! empty($conf->comptabilite->enabled) || ! empty($conf->accounting->enabled) || ! empty($conf->facture->enabled) || ! empty($conf->don->enabled) || ! empty($conf->tax->enabled) || ! empty($conf->salaries->enabled) || ! empty($conf->fournisseur->enabled)),
|
$tmpentry=array(
|
||||||
'perms'=>(! empty($user->rights->compta->resultat->lire) || ! empty($user->rights->accounting->plancompte->lire) || ! empty($user->rights->facture->lire) || ! empty($user->rights->don->lire) || ! empty($user->rights->tax->charges->lire) || ! empty($user->rights->salaries->read) || ! empty($user->rights->fournisseur->facture->lire)),
|
'enabled' => (! empty($conf->comptabilite->enabled) || ! empty($conf->accounting->enabled) || ! empty($conf->facture->enabled) || ! empty($conf->don->enabled) || ! empty($conf->tax->enabled) || ! empty($conf->margin->enabled) || ! empty($conf->salaries->enabled) || ! empty($conf->fournisseur->enabled)),
|
||||||
'module'=>'comptabilite|accounting|facture|don|tax|salaries');
|
'perms' => (! empty($user->rights->compta->resultat->lire) || ! empty($user->rights->accounting->plancompte->lire) || ! empty($user->rights->facture->lire) || ! empty($user->rights->don->lire) || ! empty($user->rights->tax->charges->lire) || !empty($user->rights->margins->liretous) || ! empty($user->rights->salaries->read) || ! empty($user->rights->fournisseur->facture->lire)),
|
||||||
|
'module' => 'comptabilite|accounting|facture|don|tax|salaries|margin'
|
||||||
|
);
|
||||||
$showmode=dol_eldy_showmenu($type_user, $tmpentry, $listofmodulesforexternal);
|
$showmode=dol_eldy_showmenu($type_user, $tmpentry, $listofmodulesforexternal);
|
||||||
if ($showmode)
|
if ($showmode)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1013,7 +1013,6 @@ abstract class DolibarrModules
|
|||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
//var_dump($this->menu); exit;
|
|
||||||
foreach ($this->menu as $key => $value)
|
foreach ($this->menu as $key => $value)
|
||||||
{
|
{
|
||||||
$menu = new Menubase($this->db);
|
$menu = new Menubase($this->db);
|
||||||
@ -1022,11 +1021,9 @@ abstract class DolibarrModules
|
|||||||
if (! $this->menu[$key]['fk_menu'])
|
if (! $this->menu[$key]['fk_menu'])
|
||||||
{
|
{
|
||||||
$menu->fk_menu=0;
|
$menu->fk_menu=0;
|
||||||
//print 'aaa'.$this->menu[$key]['fk_menu'];
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//print 'xxx'.$this->menu[$key]['fk_menu'];exit;
|
|
||||||
$foundparent=0;
|
$foundparent=0;
|
||||||
$fk_parent=$this->menu[$key]['fk_menu'];
|
$fk_parent=$this->menu[$key]['fk_menu'];
|
||||||
if (preg_match('/^r=/',$fk_parent)) // old deprecated method
|
if (preg_match('/^r=/',$fk_parent)) // old deprecated method
|
||||||
|
|||||||
@ -301,7 +301,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
$pageposafter=$pageposbefore;
|
$pageposafter=$pageposbefore;
|
||||||
//print $pageposafter.'-'.$pageposbefore;exit;
|
//print $pageposafter.'-'.$pageposbefore;exit;
|
||||||
$pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it.
|
$pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it.
|
||||||
pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,4,$curX,$curY,$hideref,$hidedesc);
|
pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,4,$curX,$curY,$hideref,$hidedesc,1);
|
||||||
$posyafter=$pdf->GetY();
|
$posyafter=$pdf->GetY();
|
||||||
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text
|
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text
|
||||||
{
|
{
|
||||||
|
|||||||
@ -309,7 +309,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
$pageposafter=$pageposbefore;
|
$pageposafter=$pageposbefore;
|
||||||
//print $pageposafter.'-'.$pageposbefore;exit;
|
//print $pageposafter.'-'.$pageposbefore;exit;
|
||||||
$pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it.
|
$pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it.
|
||||||
pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,4,$curX,$curY,$hideref,$hidedesc);
|
pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,4,$curX,$curY,$hideref,$hidedesc,1);
|
||||||
$posyafter=$pdf->GetY();
|
$posyafter=$pdf->GetY();
|
||||||
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text
|
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1105,6 +1105,8 @@ class Expedition extends CommonObject
|
|||||||
$obj = $this->db->fetch_object($resql);
|
$obj = $this->db->fetch_object($resql);
|
||||||
|
|
||||||
$line->line_id = $obj->line_id;
|
$line->line_id = $obj->line_id;
|
||||||
|
$line->rowid = $obj->line_id; // TODO deprecated
|
||||||
|
$line->id = $obj->line_id;
|
||||||
$line->fk_origin_line = $obj->fk_origin_line;
|
$line->fk_origin_line = $obj->fk_origin_line;
|
||||||
$line->origin_line_id = $obj->fk_origin_line; // TODO deprecated
|
$line->origin_line_id = $obj->fk_origin_line; // TODO deprecated
|
||||||
$line->entrepot_id = $obj->fk_entrepot;
|
$line->entrepot_id = $obj->fk_entrepot;
|
||||||
|
|||||||
@ -29,7 +29,7 @@
|
|||||||
* \brief File that include conf.php file and commons lib like functions.lib.php
|
* \brief File that include conf.php file and commons lib like functions.lib.php
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (! defined('DOL_VERSION')) define('DOL_VERSION','3.6.4');
|
if (! defined('DOL_VERSION')) define('DOL_VERSION','3.6.5');
|
||||||
if (! defined('EURO')) define('EURO',chr(128));
|
if (! defined('EURO')) define('EURO',chr(128));
|
||||||
|
|
||||||
// Define syslog constants
|
// Define syslog constants
|
||||||
|
|||||||
BIN
htdocs/includes/tcpdf/fonts/dejavusanscondensed.ctg.z
Executable file
BIN
htdocs/includes/tcpdf/fonts/dejavusanscondensed.ctg.z
Executable file
Binary file not shown.
BIN
htdocs/includes/tcpdf/fonts/dejavusanscondensed.z
Executable file
BIN
htdocs/includes/tcpdf/fonts/dejavusanscondensed.z
Executable file
Binary file not shown.
BIN
htdocs/includes/tcpdf/fonts/dejavusanscondensedb.ctg.z
Executable file
BIN
htdocs/includes/tcpdf/fonts/dejavusanscondensedb.ctg.z
Executable file
Binary file not shown.
BIN
htdocs/includes/tcpdf/fonts/dejavusanscondensedb.z
Executable file
BIN
htdocs/includes/tcpdf/fonts/dejavusanscondensedb.z
Executable file
Binary file not shown.
BIN
htdocs/includes/tcpdf/fonts/dejavusanscondensedbi.ctg.z
Executable file
BIN
htdocs/includes/tcpdf/fonts/dejavusanscondensedbi.ctg.z
Executable file
Binary file not shown.
BIN
htdocs/includes/tcpdf/fonts/dejavusanscondensedbi.z
Executable file
BIN
htdocs/includes/tcpdf/fonts/dejavusanscondensedbi.z
Executable file
Binary file not shown.
BIN
htdocs/includes/tcpdf/fonts/dejavusanscondensedi.ctg.z
Executable file
BIN
htdocs/includes/tcpdf/fonts/dejavusanscondensedi.ctg.z
Executable file
Binary file not shown.
BIN
htdocs/includes/tcpdf/fonts/dejavusanscondensedi.z
Executable file
BIN
htdocs/includes/tcpdf/fonts/dejavusanscondensedi.z
Executable file
Binary file not shown.
BIN
htdocs/includes/tcpdf/fonts/dejavusansextralight.ctg.z
Executable file
BIN
htdocs/includes/tcpdf/fonts/dejavusansextralight.ctg.z
Executable file
Binary file not shown.
BIN
htdocs/includes/tcpdf/fonts/dejavusansextralight.z
Executable file
BIN
htdocs/includes/tcpdf/fonts/dejavusansextralight.z
Executable file
Binary file not shown.
BIN
htdocs/includes/tcpdf/fonts/dejavusansmono.ctg.z
Executable file
BIN
htdocs/includes/tcpdf/fonts/dejavusansmono.ctg.z
Executable file
Binary file not shown.
BIN
htdocs/includes/tcpdf/fonts/dejavusansmono.z
Executable file
BIN
htdocs/includes/tcpdf/fonts/dejavusansmono.z
Executable file
Binary file not shown.
BIN
htdocs/includes/tcpdf/fonts/dejavusansmonob.ctg.z
Executable file
BIN
htdocs/includes/tcpdf/fonts/dejavusansmonob.ctg.z
Executable file
Binary file not shown.
BIN
htdocs/includes/tcpdf/fonts/dejavusansmonob.z
Executable file
BIN
htdocs/includes/tcpdf/fonts/dejavusansmonob.z
Executable file
Binary file not shown.
BIN
htdocs/includes/tcpdf/fonts/dejavusansmonobi.ctg.z
Executable file
BIN
htdocs/includes/tcpdf/fonts/dejavusansmonobi.ctg.z
Executable file
Binary file not shown.
BIN
htdocs/includes/tcpdf/fonts/dejavusansmonobi.z
Executable file
BIN
htdocs/includes/tcpdf/fonts/dejavusansmonobi.z
Executable file
Binary file not shown.
BIN
htdocs/includes/tcpdf/fonts/dejavusansmonoi.ctg.z
Executable file
BIN
htdocs/includes/tcpdf/fonts/dejavusansmonoi.ctg.z
Executable file
Binary file not shown.
BIN
htdocs/includes/tcpdf/fonts/dejavusansmonoi.z
Executable file
BIN
htdocs/includes/tcpdf/fonts/dejavusansmonoi.z
Executable file
Binary file not shown.
@ -65,7 +65,7 @@ ErrorNoValueForCheckBoxType=Please fill value for checkbox list
|
|||||||
ErrorNoValueForRadioType=Please fill value for radio list
|
ErrorNoValueForRadioType=Please fill value for radio list
|
||||||
ErrorBadFormatValueList=The list value cannot have more than one come : <u>%s</u>, but need at least one: llave,valores
|
ErrorBadFormatValueList=The list value cannot have more than one come : <u>%s</u>, but need at least one: llave,valores
|
||||||
ErrorFieldCanNotContainSpecialCharacters=Field <b>%s</b> must not contains special characters.
|
ErrorFieldCanNotContainSpecialCharacters=Field <b>%s</b> must not contains special characters.
|
||||||
ErrorFieldCanNotContainSpecialNorUpperCharacters=Field <b>%s</b> must not contains special characters, nor upper case characters.
|
ErrorFieldCanNotContainSpecialNorUpperCharacters=Field <b>%s</b> must not contain special characters, nor upper case characters and cannot contain only numbers.
|
||||||
ErrorNoAccountancyModuleLoaded=No accountancy module activated
|
ErrorNoAccountancyModuleLoaded=No accountancy module activated
|
||||||
ErrorExportDuplicateProfil=This profile name already exists for this export set.
|
ErrorExportDuplicateProfil=This profile name already exists for this export set.
|
||||||
ErrorLDAPSetupNotComplete=Dolibarr-LDAP matching is not complete.
|
ErrorLDAPSetupNotComplete=Dolibarr-LDAP matching is not complete.
|
||||||
|
|||||||
@ -50,9 +50,9 @@ $pagenext = $page + 1;
|
|||||||
$startdate=$enddate='';
|
$startdate=$enddate='';
|
||||||
|
|
||||||
if (!empty($_POST['startdatemonth']))
|
if (!empty($_POST['startdatemonth']))
|
||||||
$startdate = dol_mktime(12, 0, 0, $_POST['startdatemonth'], $_POST['startdateday'], $_POST['startdateyear']);
|
$startdate = dol_mktime(0, 0, 0, $_POST['startdatemonth'], $_POST['startdateday'], $_POST['startdateyear']);
|
||||||
if (!empty($_POST['enddatemonth']))
|
if (!empty($_POST['enddatemonth']))
|
||||||
$enddate = dol_mktime(12, 0, 0, $_POST['enddatemonth'], $_POST['enddateday'], $_POST['enddateyear']);
|
$enddate = dol_mktime(23, 59, 59, $_POST['enddatemonth'], $_POST['enddateday'], $_POST['enddateyear']);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
|
|||||||
@ -72,9 +72,9 @@ $pagenext = $page + 1;
|
|||||||
$startdate=$enddate='';
|
$startdate=$enddate='';
|
||||||
|
|
||||||
if (!empty($_POST['startdatemonth']))
|
if (!empty($_POST['startdatemonth']))
|
||||||
$startdate = dol_mktime(12, 0, 0, $_POST['startdatemonth'], $_POST['startdateday'], $_POST['startdateyear']);
|
$startdate = dol_mktime(0, 0, 0, $_POST['startdatemonth'], $_POST['startdateday'], $_POST['startdateyear']);
|
||||||
if (!empty($_POST['enddatemonth']))
|
if (!empty($_POST['enddatemonth']))
|
||||||
$enddate = dol_mktime(12, 0, 0, $_POST['enddatemonth'], $_POST['enddateday'], $_POST['enddateyear']);
|
$enddate = dol_mktime(23, 59, 59, $_POST['enddatemonth'], $_POST['enddateday'], $_POST['enddateyear']);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -770,6 +770,7 @@ class Task extends CommonObject
|
|||||||
{
|
{
|
||||||
$tasktime_id = $this->db->last_insert_id(MAIN_DB_PREFIX."projet_task_time");
|
$tasktime_id = $this->db->last_insert_id(MAIN_DB_PREFIX."projet_task_time");
|
||||||
$ret = $tasktime_id;
|
$ret = $tasktime_id;
|
||||||
|
$this->timespent_id = $ret;
|
||||||
|
|
||||||
if (! $notrigger)
|
if (! $notrigger)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -186,7 +186,7 @@ if ($type_element == 'order')
|
|||||||
$where = " WHERE c.fk_soc = s.rowid AND s.rowid = ".$socid;
|
$where = " WHERE c.fk_soc = s.rowid AND s.rowid = ".$socid;
|
||||||
$where.= " AND d.fk_commande = c.rowid";
|
$where.= " AND d.fk_commande = c.rowid";
|
||||||
$where.= " AND c.entity = ".$conf->entity;
|
$where.= " AND c.entity = ".$conf->entity;
|
||||||
$dateprint = 'c.datef';
|
$datePrint = 'c.date_commande';
|
||||||
$doc_number='c.ref';
|
$doc_number='c.ref';
|
||||||
$thirdTypeSelect='customer';
|
$thirdTypeSelect='customer';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -40,6 +40,7 @@ $result = restrictedArea($user, 'societe', $socid, '&societe');
|
|||||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||||
$hookmanager->initHooks(array('infothirdparty'));
|
$hookmanager->initHooks(array('infothirdparty'));
|
||||||
|
|
||||||
|
$soc = new Societe($db);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -59,8 +60,10 @@ $error=$hookmanager->error; $errors=array_merge($errors, (array) $hookmanager->e
|
|||||||
$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
|
$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
|
||||||
llxHeader('',$langs->trans("ThirdParty"),$help_url);
|
llxHeader('',$langs->trans("ThirdParty"),$help_url);
|
||||||
|
|
||||||
$soc = new Societe($db);
|
if ($socid > 0)
|
||||||
$soc->fetch($socid);
|
{
|
||||||
|
$result = $soc->fetch($socid);
|
||||||
|
|
||||||
$soc->info($socid);
|
$soc->info($socid);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -71,13 +74,12 @@ $head = societe_prepare_head($soc);
|
|||||||
dol_fiche_head($head, 'info', $langs->trans("ThirdParty"), 0, 'company');
|
dol_fiche_head($head, 'info', $langs->trans("ThirdParty"), 0, 'company');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print '<table width="100%"><tr><td>';
|
print '<table width="100%"><tr><td>';
|
||||||
dol_print_object_info($soc);
|
dol_print_object_info($soc);
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
print '</div>';
|
dol_fiche_end();
|
||||||
|
}
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
|||||||
@ -1025,6 +1025,7 @@ else
|
|||||||
// Other attributes
|
// Other attributes
|
||||||
$parameters=array('colspan' => ' colspan="3"', 'colspanvalue' => '3');
|
$parameters=array('colspan' => ' colspan="3"', 'colspanvalue' => '3');
|
||||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||||
|
print $hookmanager->resPrint;
|
||||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||||
{
|
{
|
||||||
print $object->showOptionals($extrafields,'edit');
|
print $object->showOptionals($extrafields,'edit');
|
||||||
@ -1436,6 +1437,7 @@ else
|
|||||||
// Other attributes
|
// Other attributes
|
||||||
$parameters=array('colspan' => ' colspan="3"', 'colspanvalue' => '3');
|
$parameters=array('colspan' => ' colspan="3"', 'colspanvalue' => '3');
|
||||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||||
|
print $hookmanager->resPrint;
|
||||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||||
{
|
{
|
||||||
print $object->showOptionals($extrafields,'edit');
|
print $object->showOptionals($extrafields,'edit');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user