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

Conflicts:
	ChangeLog
This commit is contained in:
Florian HENRY 2014-09-04 18:29:17 +02:00
commit 85cabbf921
4 changed files with 27 additions and 20 deletions

View File

@ -13,6 +13,8 @@ For users:
- Fix: Trigger on create category call failed because user is not passed on card
- Fix: list event view lost type event filter
- Fix: Save also code event
- Fix: Iban was used instead of Bic into SEPA file.
- Fix: Must unaccent strings into SEPA file.
- Fix: Extrafield feature select from table should try to translate multiple column when not needed
***** ChangeLog for 3.6 compared to 3.5.* *****

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
*
@ -142,7 +142,7 @@ if ($object->id > 0)
/*
* Facture
*/
*/
print '<table class="border" width="100%">';
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
@ -450,7 +450,7 @@ if ($object->id > 0)
/*
* Buttons
*/
*/
print "\n<div class=\"tabsAction\">\n";
// Add a withdraw request
@ -467,7 +467,11 @@ if ($object->id > 0)
}
else
{
if ($num == 0) print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("AlreadyPayed")).'">'.$langs->trans("MakeWithdrawRequest").'</a>';
if ($num == 0)
{
if ($object->statut > 0) print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("AlreadyPayed")).'">'.$langs->trans("MakeWithdrawRequest").'</a>';
else print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("Draft")).'">'.$langs->trans("MakeWithdrawRequest").'</a>';
}
else print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("RequestAlreadyDone")).'">'.$langs->trans("MakeWithdrawRequest").'</a>';
}

View File

@ -1219,11 +1219,11 @@ class BonPrelevement extends CommonObject
/**
* Generate a withdrawal file. Generation Formats:
* France: CFONB
* Spain: AEB19 (if external module EsAEB is enabled)
* Others: Warning message
* File is generated with name this->filename
* Generate a withdrawal file.
* Generation Formats:
* - Europe: SEPA (France: CFONB no more supported, Spain: AEB19 if external module EsAEB is enabled)
* - Others countries: Warning message
* File is generated with name this->filename
*
* @return int 0 if OK, <0 if KO
*/
@ -1410,7 +1410,7 @@ class BonPrelevement extends CommonObject
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,";
@ -1419,14 +1419,14 @@ class BonPrelevement extends CommonObject
$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);
@ -1574,7 +1574,7 @@ class BonPrelevement extends CommonObject
* @param string $row_bic rib.bic AS bic,
* @param string $row_datec soc.datec,
* @param string $row_drum soc.rowid AS drum
* @return void
* @return string Return string with SEPA part DrctDbtTxInf
*/
function EnregDestinataireSEPA($row_code_client, $row_nom, $row_address, $row_zip, $row_town, $row_country_code, $row_cb, $row_cg, $row_cc, $row_somme, $row_facnumber, $row_idfac, $row_iban, $row_bic, $row_datec, $row_drum)
{
@ -1598,15 +1598,15 @@ class BonPrelevement extends CommonObject
$XML_DEBITOR .=' </DrctDbtTx>'.$CrLf;
$XML_DEBITOR .=' <DbtrAgt>'.$CrLf;
$XML_DEBITOR .=' <FinInstnId>'.$CrLf;
$XML_DEBITOR .=' <BIC>'.$row_iban.'</BIC>'.$CrLf;
$XML_DEBITOR .=' <BIC>'.$row_bic.'</BIC>'.$CrLf;
$XML_DEBITOR .=' </FinInstnId>'.$CrLf;
$XML_DEBITOR .=' </DbtrAgt>'.$CrLf;
$XML_DEBITOR .=' <Dbtr>'.$CrLf;
$XML_DEBITOR .=' <Nm>'.strtoupper($row_nom).'</Nm>'.$CrLf;
$XML_DEBITOR .=' <Nm>'.strtoupper(dol_string_unaccent($row_nom)).'</Nm>'.$CrLf;
$XML_DEBITOR .=' <PstlAdr>'.$CrLf;
$XML_DEBITOR .=' <Ctry>'.$row_country_code.'</Ctry>'.$CrLf;
$XML_DEBITOR .=' <AdrLine>'.strtr($row_adr, array(CHR(13) => ", ", CHR(10) => "")).'</AdrLine>'.$CrLf;
$XML_DEBITOR .=' <AdrLine>'.$row_zip.' '.$row_town.'</AdrLine>'.$CrLf;
$XML_DEBITOR .=' <AdrLine>'.dol_string_unaccent($row_zip.' '.$row_town).'</AdrLine>'.$CrLf;
$XML_DEBITOR .=' </PstlAdr>'.$CrLf;
$XML_DEBITOR .=' </Dbtr>'.$CrLf;
$XML_DEBITOR .=' <DbtrAcct>'.$CrLf;
@ -1689,7 +1689,8 @@ class BonPrelevement extends CommonObject
}
/**
* Write sender of request (me)
* Write sender of request (me).
* Note: The tag PmtInf is opened here but closed into caller
*
* @param string $configuration conf
* @param date $ladate Date

View File

@ -1148,7 +1148,7 @@ class FormFile
print '</td>';
print '<td align="center">' . dol_print_date(dol_now(), "dayhour", "tzuser") . '</td>';
print '<td align="right"></td>';
print '<td align="right" colspan="2">';
print '<td align="right">';
print '<input type="submit" name="save" class="button" value="' . dol_escape_htmltag($langs->trans('Save')) . '">';
print '<input type="submit" name="cancel" class="button" value="' . dol_escape_htmltag($langs->trans('Cancel')) . '">';
print '</td>';
@ -1163,7 +1163,7 @@ class FormFile
print '<td align="right"></td>';
print '<td align="center">' . dol_print_date($link->datea, "dayhour", "tzuser") . '</td>';
print '<td align="center"></td>';
print '<td align="right" colspan="2">';
print '<td align="right">';
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=update&linkid=' . $link->id . $param . '" class="editfilelink" >' . img_edit() . '</a>'; // id= is included into $param
if ($permtodelete) {
print ' &nbsp; <a href="'. $_SERVER['PHP_SELF'] .'?action=delete&linkid=' . $link->id . $param . '" class="deletefilelink">' . img_delete() . '</a>'; // id= is included into $param
@ -1176,7 +1176,7 @@ class FormFile
}
if ($nboflinks == 0)
{
print '<tr ' . $bc[$var] . '><td colspan="4">';
print '<tr ' . $bc[$var] . '><td colspan="5">';
print $langs->trans("NoLinkFound");
print '</td></tr>';
}