Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 5.0
Conflicts: htdocs/compta/facture/class/facture.class.php htdocs/compta/prelevement/class/bonprelevement.class.php htdocs/filefunc.inc.php
This commit is contained in:
commit
3555bd2bd7
@ -2648,7 +2648,7 @@ class Facture extends CommonInvoice
|
|||||||
* @param double $pu_ht_devise Unit price in currency
|
* @param double $pu_ht_devise Unit price in currency
|
||||||
* @return int < 0 if KO, > 0 if OK
|
* @return int < 0 if KO, > 0 if OK
|
||||||
*/
|
*/
|
||||||
function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $txtva, $txlocaltax1=0, $txlocaltax2=0, $price_base_type='HT', $info_bits=0, $type= self::TYPE_STANDARD, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='', $special_code=0, $array_options=0, $situation_percent=0, $fk_unit = null, $pu_ht_devise = 0)
|
function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $txtva, $txlocaltax1=0, $txlocaltax2=0, $price_base_type='HT', $info_bits=0, $type= self::TYPE_STANDARD, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='', $special_code=0, $array_options=0, $situation_percent=100, $fk_unit = null, $pu_ht_devise = 0)
|
||||||
{
|
{
|
||||||
global $conf,$user;
|
global $conf,$user;
|
||||||
// Deprecation warning
|
// Deprecation warning
|
||||||
|
|||||||
@ -1272,16 +1272,6 @@ class BonPrelevement extends CommonObject
|
|||||||
* section Debiteur (sepa Debiteurs bloc lines)
|
* section Debiteur (sepa Debiteurs bloc lines)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*$tmp_invoices = array();
|
|
||||||
|
|
||||||
$sql = "SELECT f.facnumber as fac FROM ".MAIN_DB_PREFIX."prelevement_lignes as pl, ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."prelevement_facture as pf, ".MAIN_DB_PREFIX."societe as soc, ".MAIN_DB_PREFIX."c_country as p, ".MAIN_DB_PREFIX."societe_rib as rib WHERE pl.fk_prelevement_bons = ".$this->id." AND pl.rowid = pf.fk_prelevement_lignes AND pf.fk_facture = f.rowid AND soc.fk_pays = p.rowid AND soc.rowid = f.fk_soc AND rib.fk_soc = f.fk_soc AND rib.default_rib = 1";
|
|
||||||
$resql=$this->db->query($sql);
|
|
||||||
if ($resql) {
|
|
||||||
while ($objfac = $this->db->fetch_object($resql)) {
|
|
||||||
$tmp_invoices[] = $objfac->fac;
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
$sql = "SELECT soc.code_client as code, soc.address, soc.zip, soc.town, c.code as country_code,";
|
$sql = "SELECT soc.code_client as code, soc.address, soc.zip, soc.town, c.code as country_code,";
|
||||||
$sql.= " pl.client_nom as nom, pl.code_banque as cb, pl.code_guichet as cg, pl.number as cc, pl.amount as somme,";
|
$sql.= " pl.client_nom as nom, pl.code_banque as cb, pl.code_guichet as cg, pl.number as cc, pl.amount as somme,";
|
||||||
$sql.= " f.facnumber as fac, pf.fk_facture as idfac, rib.datec, rib.iban_prefix as iban, rib.bic as bic, rib.rowid as drum";
|
$sql.= " f.facnumber as fac, pf.fk_facture as idfac, rib.datec, rib.iban_prefix as iban, rib.bic as bic, rib.rowid as drum";
|
||||||
@ -1365,35 +1355,6 @@ class BonPrelevement extends CommonObject
|
|||||||
fputs($this->file, ' </PmtInf>'.$CrLf);
|
fputs($this->file, ' </PmtInf>'.$CrLf);
|
||||||
fputs($this->file, ' </CstmrDrctDbtInitn>'.$CrLf);
|
fputs($this->file, ' </CstmrDrctDbtInitn>'.$CrLf);
|
||||||
fputs($this->file, '</Document>'.$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;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build file for Other Countries with unknow format
|
// Build file for Other Countries with unknow format
|
||||||
@ -1580,11 +1541,11 @@ class BonPrelevement extends CommonObject
|
|||||||
$XML_DEBITOR .=' </FinInstnId>'.$CrLf;
|
$XML_DEBITOR .=' </FinInstnId>'.$CrLf;
|
||||||
$XML_DEBITOR .=' </DbtrAgt>'.$CrLf;
|
$XML_DEBITOR .=' </DbtrAgt>'.$CrLf;
|
||||||
$XML_DEBITOR .=' <Dbtr>'.$CrLf;
|
$XML_DEBITOR .=' <Dbtr>'.$CrLf;
|
||||||
$XML_DEBITOR .=' <Nm>'.strtoupper(dol_string_unaccent($row_nom)).'</Nm>'.$CrLf;
|
$XML_DEBITOR .=' <Nm>'.dolEscapeXML(strtoupper(dol_string_unaccent($row_nom))).'</Nm>'.$CrLf;
|
||||||
$XML_DEBITOR .=' <PstlAdr>'.$CrLf;
|
$XML_DEBITOR .=' <PstlAdr>'.$CrLf;
|
||||||
$XML_DEBITOR .=' <Ctry>'.$row_country_code.'</Ctry>'.$CrLf;
|
$XML_DEBITOR .=' <Ctry>'.$row_country_code.'</Ctry>'.$CrLf;
|
||||||
$XML_DEBITOR .=' <AdrLine>'.dol_string_unaccent(strtr($row_address, array(CHR(13) => ", ", CHR(10) => ""))).'</AdrLine>'.$CrLf;
|
$XML_DEBITOR .=' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_unaccent(strtr($row_address, array(CHR(13) => ", ", CHR(10) => ""))),70,'right','UTF-8',true)).'</AdrLine>'.$CrLf;
|
||||||
$XML_DEBITOR .=' <AdrLine>'.dol_string_unaccent($row_zip.' '.$row_town).'</AdrLine>'.$CrLf;
|
$XML_DEBITOR .=' <AdrLine>'.dolEscapeXML(dol_string_unaccent($row_zip.' '.$row_town)).'</AdrLine>'.$CrLf;
|
||||||
$XML_DEBITOR .=' </PstlAdr>'.$CrLf;
|
$XML_DEBITOR .=' </PstlAdr>'.$CrLf;
|
||||||
$XML_DEBITOR .=' </Dbtr>'.$CrLf;
|
$XML_DEBITOR .=' </Dbtr>'.$CrLf;
|
||||||
$XML_DEBITOR .=' <DbtrAcct>'.$CrLf;
|
$XML_DEBITOR .=' <DbtrAcct>'.$CrLf;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user