Skip to content

Commit

Permalink
Merge branch 'Upstream/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
aspangaro committed Jun 17, 2014
2 parents 27f0cbd + b70c695 commit 5769782
Show file tree
Hide file tree
Showing 212 changed files with 1,825 additions and 1,374 deletions.
10 changes: 10 additions & 0 deletions ChangeLog
Expand Up @@ -105,6 +105,15 @@ removed. You must now use the 6 parameters way. See file modMyModule.class.php f
- Properties "civilite_id" were renamed into "civility_id".



***** ChangeLog for 3.5.4 compared to 3.5.3 *****
Fix: [ bug #1415 ] Intervention document model name and suppliers model names is not shown
properly in module configuration
Fix: [ bug #1416 ] Supplier order does not list document models in the select box of the
supplier order card
Fix: [ bug #1443 ] Payment conditions is erased after editing supplier invoice label or
limit date for payment

***** ChangeLog for 3.5.3 compared to 3.5.2 *****
Fix: Error on field accountancy code for export profile of invoices.
Fix: [ bug #1351 ] VIES verification link broken.
Expand Down Expand Up @@ -139,6 +148,7 @@ Fix: [ bug #1388 ] Wrong date when invoicing several orders.
Fix: [ bug #1411 ] Unable to set an expedition note if invoices module is not enabled.
Fix: [ bug #1407 ] Rouget pdf overlapped when using tracking number and public notes.
Fix: [ bug #1405 ] Rouget PDF expedition incorrect when two expeditions under the same commande
Fix: [ bug #1434 ] Muscadet supplier order document model linked objects overlap the text

***** ChangeLog for 3.5.2 compared to 3.5.1 *****
Fix: Can't add user for a task.
Expand Down
7 changes: 7 additions & 0 deletions build/debian/changelog
Expand Up @@ -5,6 +5,13 @@ dolibarr (3.6.0-1) unstable; urgency=low

-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Sat, 9 May 2014 12:00:00 +0100

dolibarr (3.5.4-3) unstable; urgency=low

[ Laurent Destailleur (eldy) ]
* New upstream release.

-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Tue, 1 July 2014 12:00:00 +0100

dolibarr (3.5.3-3) unstable; urgency=low

[ Laurent Destailleur (eldy) ]
Expand Down
8 changes: 4 additions & 4 deletions build/debian/control
Expand Up @@ -39,10 +39,10 @@ Description: Web based software to manage a company or foundation
It's a web software you can install as a standalone program or on any web
hosting provider to use it from anywhere with any web browser.
.
Dolibarr was designed to be easy to use. Only the features that you need are
visible, depending on which modules were activated.
Dolibarr was designed to be easy to use. Only the features that you need
are visible, depending on which modules were activated.
.
Most common used modules are:
This is an example of most common used modules:
.
Customers, Suppliers or Prospects directory,
Contacts directory,
Expand All @@ -66,6 +66,6 @@ Description: Web based software to manage a company or foundation
Wizards to export and import data,
LDAP connectivity,
PDF exports,
And a lot of more modules...
And a lot more modules...
.
You can also add third parties external modules or develop yours.
3 changes: 3 additions & 0 deletions build/rpm/dolibarr_fedora.spec
Expand Up @@ -336,6 +336,9 @@ fi
* Fri May 9 2014 Laurent Destailleur 3.6.0-0.2.b
- Upstream release

* Tue July 1 2014 Laurent Destailleur 3.5.4-0.3
- Upstream release

* Fri May 2 2014 Laurent Destailleur 3.5.3-0.3
- Upstream release

Expand Down
3 changes: 3 additions & 0 deletions build/rpm/dolibarr_generic.spec
Expand Up @@ -572,6 +572,9 @@ fi
* Fri May 9 2014 Laurent Destailleur 3.6.0-0.2.b
- Upstream release

* Tue July 1 2014 Laurent Destailleur 3.5.4-0.3
- Upstream release

* Fri May 2 2014 Laurent Destailleur 3.5.3-0.3
- Upstream release

Expand Down
3 changes: 3 additions & 0 deletions build/rpm/dolibarr_mandriva.spec
Expand Up @@ -341,6 +341,9 @@ fi
* Fri May 9 2014 Laurent Destailleur 3.6.0-0.2.b
- Upstream release

* Tue July 1 2014 Laurent Destailleur 3.5.4-0.3
- Upstream release

* Fri May 2 2014 Laurent Destailleur 3.5.3-0.3
- Upstream release

Expand Down
3 changes: 3 additions & 0 deletions build/rpm/dolibarr_opensuse.spec
Expand Up @@ -352,6 +352,9 @@ fi
* Fri May 9 2014 Laurent Destailleur 3.6.0-0.2.b
- Upstream release

* Tue July 1 2014 Laurent Destailleur 3.5.4-0.3
- Upstream release

* Fri May 2 2014 Laurent Destailleur 3.5.3-0.3
- Upstream release

Expand Down
2 changes: 1 addition & 1 deletion htdocs/admin/facture.php
Expand Up @@ -500,7 +500,7 @@
clearstatcache();

$var=true;
foreach ($dirmodels as $reldir)
foreach ($def as $reldir)
{
foreach (array('','/doc') as $valdir)
{
Expand Down
7 changes: 5 additions & 2 deletions htdocs/admin/fichinter.php
Expand Up @@ -376,13 +376,16 @@
{
if (substr($file, dol_strlen($file) -12) == '.modules.php' && substr($file,0,4) == 'pdf_')
{
$var=!$var;

$name = substr($file, 4, dol_strlen($file) -16);
$classname = substr($file, 0, dol_strlen($file) -12);

$var=!$var;
require_once $dir.'/'.$file;
$module = new $classname($db);

print '<tr '.$bc[$var].'><td>';
echo "$name";
print (empty($module->name)?$name:$module->name);
print "</td><td>\n";
require_once $dir.$file;
$module = new $classname($db);
Expand Down
7 changes: 6 additions & 1 deletion htdocs/admin/supplier_invoice.php
Expand Up @@ -372,9 +372,14 @@
$name = substr($file, 4, dol_strlen($file) -16);
$classname = substr($file, 0, dol_strlen($file) -12);

require_once $dir.'/'.$file;
$module = new $classname($db, new FactureFournisseur($db));

$var=!$var;
print "<tr ".$bc[$var].">\n";
print "<td>".$name."</td>\n";
print "<td>";
print (empty($module->name)?$name:$module->name);
print "</td>\n";
print "<td>\n";
require_once $dir.$file;
$module = new $classname($db,$specimenthirdparty);
Expand Down
8 changes: 7 additions & 1 deletion htdocs/admin/supplier_order.php
Expand Up @@ -42,6 +42,7 @@

$type=GETPOST('type', 'alpha');
$value=GETPOST('value', 'alpha');
$label = GETPOST('label','alpha');
$action=GETPOST('action', 'alpha');

$specimenthirdparty=new Societe($db);
Expand Down Expand Up @@ -367,9 +368,14 @@
$name = substr($file, 4, dol_strlen($file) -16);
$classname = substr($file, 0, dol_strlen($file) -12);

require_once $dir.'/'.$file;
$module = new $classname($db, new CommandeFournisseur($db));

$var=!$var;
print "<tr ".$bc[$var].">\n";
print "<td>".$name."</td>\n";
print "<td>";
print (empty($module->name)?$name:$module->name);
print "</td>\n";
print "<td>\n";
require_once $dir.$file;
$module = new $classname($db,$specimenthirdparty);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/comm/propal.php
Expand Up @@ -473,7 +473,7 @@
$result = $interface->run_triggers('PROPAL_SENTBYMAIL', $object, $user, $langs, $conf);
if ($result < 0) {
$error ++;
$this->errors = $interface->errors;
$object->errors = $interface->errors;
}
// Fin appel triggers

Expand Down
12 changes: 7 additions & 5 deletions htdocs/comm/propal/class/propal.class.php
Expand Up @@ -1349,10 +1349,10 @@ function valid($user, $notrigger=0)
{
// Rename of propal directory ($this->ref = old ref, $num = new ref)
// to not lose the linked files
$facref = dol_sanitizeFileName($this->ref);
$snumfa = dol_sanitizeFileName($num);
$dirsource = $conf->propal->dir_output.'/'.$facref;
$dirdest = $conf->propal->dir_output.'/'.$snumfa;
$oldref = dol_sanitizeFileName($this->ref);
$newref = dol_sanitizeFileName($num);
$dirsource = $conf->propal->dir_output.'/'.$oldref;
$dirdest = $conf->propal->dir_output.'/'.$newref;
if (file_exists($dirsource))
{
dol_syslog(get_class($this)."::validate rename dir ".$dirsource." into ".$dirdest);
Expand All @@ -1362,15 +1362,17 @@ function valid($user, $notrigger=0)

dol_syslog("Rename ok");
// Deleting old PDF in new rep
dol_delete_file($conf->propal->dir_output.'/'.$snumfa.'/'.$facref.'*.*');
dol_delete_file($conf->propal->dir_output.'/'.$newref.'/'.$oldref.'*.*');
}
}
}

$this->ref=$num;
$this->brouillon=0;
$this->statut = 1;
$this->user_valid_id=$user->id;
$this->datev=$now;

$this->db->commit();
return 1;
}
Expand Down
6 changes: 3 additions & 3 deletions htdocs/comm/remise.php
Expand Up @@ -130,7 +130,7 @@

// Nouvelle valeur
print '<tr><td colspan="2">';
print $langs->trans("NewValue").'</td><td colspan="2"><input type="text" size="5" name="remise" value="'.($_POST["remise"]?$_POST["remise"]:$objsoc->remise_percent).'">%</td></tr>';
print $langs->trans("NewValue").'</td><td colspan="2"><input type="text" size="5" name="remise" value="'.($_POST["remise"]?$_POST["remise"]:'').'">%</td></tr>';

// Motif/Note
print '<tr><td colspan="2" width="25%">';
Expand All @@ -155,9 +155,9 @@


/*
* Liste de l'historique des avoirs
* List log of all percent discounts
*/
$sql = "SELECT rc.rowid,rc.remise_client,rc.note, rc.datec as dc,";
$sql = "SELECT rc.rowid, rc.remise_client as remise_percent, rc.note, rc.datec as dc,";
$sql.= " u.login, u.rowid as user_id";
$sql.= " FROM ".MAIN_DB_PREFIX."societe_remise as rc, ".MAIN_DB_PREFIX."user as u";
$sql.= " WHERE rc.fk_soc =". $objsoc->id;
Expand Down
4 changes: 2 additions & 2 deletions htdocs/compta/bank/account.php
Expand Up @@ -784,8 +784,8 @@
print '<tr class="liste_total"><td align="left" colspan="8">';
if ($sep > 0) print '&nbsp;'; // If we had at least one line in future
else print $langs->trans("CurrentBalance");
print '</td>';
print '<td align="right" nowrap><b>'.price($total).'</b></td>';
print ' '.$object->currency_code.'</td>';
print '<td align="right" nowrap><b>'.price($total, 0, $langs, 0, 0, -1, $object->currency_code).'</b></td>';
print '<td>&nbsp;</td>';
print '</tr>';
}
Expand Down
34 changes: 21 additions & 13 deletions htdocs/compta/bank/index.php
Expand Up @@ -90,7 +90,7 @@
print '<td align="right" width="100">'.$langs->trans("BankBalance").'</td>';
print "</tr>\n";

$total = 0; $found = 0;
$total = array(); $found = 0;
$var=true;
foreach ($accounts as $key=>$type)
{
Expand Down Expand Up @@ -119,17 +119,19 @@
print '</td>';
print '<td align="center">'.$acc->getLibStatut(2).'</td>';
print '<td align="right">';
print '<a href="account.php?account='.$acc->id.'">'.price($solde).'</a>';
print '<a href="account.php?account='.$acc->id.'">'.price($solde, 0, $langs, 0, 0, -1, $acc->currency_code).'</a>';
print '</td>';
print '</tr>';

$total += $solde;
$total[$acc->currency_code] += $solde;
}
}
if (! $found) print '<tr '.$bc[$var].'><td colspan="6">'.$langs->trans("None").'</td></tr>';
// Total
print '<tr class="liste_total"><td colspan="5" class="liste_total">'.$langs->trans("Total").'</td><td align="right" class="liste_total">'.price($total).'</td></tr>';

foreach ($total as $key=>$solde)
{
print '<tr class="liste_total"><td colspan="5" class="liste_total">'.$langs->trans("Total ").$key.'</td><td align="right" class="liste_total">'.price($solde, 0, $langs, 0, 0, -1, $key).'</td></tr>';
}

//print '<tr><td colspan="5">&nbsp;</td></tr>';

Expand All @@ -144,7 +146,7 @@
print '<td align="right" width="100">'.$langs->trans("BankBalance").'</td>';
print "</tr>\n";

$total = 0; $found = 0;
$total = array(); $found = 0;
$var=true;
foreach ($accounts as $key=>$type)
{
Expand All @@ -165,16 +167,19 @@
print '<td>&nbsp;</td>';
print '<td align="center">'.$acc->getLibStatut(2).'</td>';
print '<td align="right">';
print '<a href="account.php?account='.$acc->id.'">'.price($solde).'</a>';
print '<a href="account.php?account='.$acc->id.'">'.price($solde, 0, $langs, 0, 0, -1, $acc->currency_code).'</a>';
print '</td>';
print '</tr>';

$total += $solde;
$total[$acc->currency_code] += $solde;
}
}
if (! $found) print '<tr '.$bc[$var].'><td colspan="6">'.$langs->trans("None").'</td></tr>';
// Total
print '<tr class="liste_total"><td colspan="5" class="liste_total">'.$langs->trans("Total").'</td><td align="right" class="liste_total">'.price($total).'</td></tr>';
foreach ($total as $key=>$solde)
{
print '<tr class="liste_total"><td colspan="5" class="liste_total">'.$langs->trans("Total ").$key.'</td><td align="right" class="liste_total">'.price($solde, 0, $langs, 0, 0, -1, $key).'</td></tr>';
}



Expand All @@ -193,7 +198,7 @@
print '<td align="right" width="100">'.$langs->trans("BankBalance").'</td>';
print "</tr>\n";

$total = 0; $found = 0;
$total = array(); $found = 0;
$var=true;
foreach ($accounts as $key=>$type)
{
Expand Down Expand Up @@ -222,16 +227,19 @@
print '</td>';
print '<td align="center">'.$acc->getLibStatut(2).'</td>';
print '<td align="right">';
print '<a href="account.php?account='.$acc->id.'">'.price($solde).'</a>';
print '<a href="account.php?account='.$acc->id.'">'.price($solde, 0, $langs, 0, 0, -1, $acc->currency_code).'</a>';
print '</td>';
print '</tr>';

$total += $solde;
$total[$acc->currency_code] += $solde;
}
}
if (! $found) print '<tr '.$bc[$var].'><td colspan="6">'.$langs->trans("None").'</td></tr>';
// Total
print '<tr class="liste_total"><td colspan="5" class="liste_total">'.$langs->trans("Total").'</td><td align="right" class="liste_total">'.price($total).'</td></tr>';
foreach ($total as $key=>$solde)
{
print '<tr class="liste_total"><td colspan="5" class="liste_total">'.$langs->trans("Total ").$key.'</td><td align="right" class="liste_total">'.price($solde, 0, $langs, 0, 0, -1, $key).'</td></tr>';
}

print "</table>";

Expand Down
2 changes: 1 addition & 1 deletion htdocs/compta/facture.php
Expand Up @@ -1607,7 +1607,7 @@
$result = $interface->run_triggers('BILL_SENTBYMAIL', $object, $user, $langs, $conf);
if ($result < 0) {
$error ++;
$this->errors = $interface->errors;
$object->errors = $interface->errors;
}
// Fin appel triggers

Expand Down
30 changes: 29 additions & 1 deletion htdocs/compta/prelevement/class/bonprelevement.class.php
Expand Up @@ -651,7 +651,7 @@ function SommeAPrelever()
{
global $conf;

$sql = "SELECT sum(f.total_ttc)";
$sql = "SELECT sum(f.total_ttc) as nb";
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f,";
$sql.= " ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd";
//$sql.= " ,".MAIN_DB_PREFIX."c_paiement as cp";
Expand Down Expand Up @@ -1410,6 +1410,34 @@ function Generate()
fputs($this->file, ' </PmtInf>'.$CrLf);
fputs($this->file, ' </CstmrDrctDbtInitn>'.$CrLf);
fputs($this->file, '</Document>'.$CrLf);

$sql = "SELECT pl.amount";
$sql.= " FROM";
$sql.= " ".MAIN_DB_PREFIX."prelevement_lignes as pl,";
$sql.= " ".MAIN_DB_PREFIX."facture as f,";
$sql.= " ".MAIN_DB_PREFIX."prelevement_facture as pf";
$sql.= " WHERE pl.fk_prelevement_bons = ".$this->id;
$sql.= " AND pl.rowid = pf.fk_prelevement_lignes";
$sql.= " AND pf.fk_facture = f.rowid";

//Lines
$i = 0;
$resql=$this->db->query($sql);
if ($resql)
{
$num = $this->db->num_rows($resql);

while ($i < $num)
{
$obj = $this->db->fetch_object($resql);
$this->total = $this->total + $obj->amount;
$i++;
}
}
else
{
$result = -2;
}

}

Expand Down

0 comments on commit 5769782

Please sign in to comment.