Doxygen
This commit is contained in:
parent
351a2974dd
commit
ec15a4ae3b
@ -518,7 +518,8 @@ $profid[3][1]=$langs->transcountry('ProfId4' ,$mysoc->pays_code);
|
|||||||
$var = true;
|
$var = true;
|
||||||
$i=0;
|
$i=0;
|
||||||
|
|
||||||
while ($i < sizeof($profid))
|
$nbofloop=count($profid);
|
||||||
|
while ($i < $nbofloop)
|
||||||
{
|
{
|
||||||
$var = !$var;
|
$var = !$var;
|
||||||
|
|
||||||
|
|||||||
@ -114,10 +114,11 @@ function tva_coll($db,$y,$q)
|
|||||||
/**
|
/**
|
||||||
* Gets VAT to pay for the given month of the given year
|
* Gets VAT to pay for the given month of the given year
|
||||||
* The function gets the VAT in split results, as the VAT declaration asks
|
* The function gets the VAT in split results, as the VAT declaration asks
|
||||||
* to report the amounts for different VAT rates as different lines.
|
* to report the amounts for different VAT rates as different lines
|
||||||
* @param object Database handler object
|
*
|
||||||
* @param y Year
|
* @param DoliDB $db Database handler object
|
||||||
* @param q Year quarter (1-4)
|
* @param int $y Year
|
||||||
|
* @param int $q Year quarter (1-4)
|
||||||
*/
|
*/
|
||||||
function tva_paye($db, $y,$q)
|
function tva_paye($db, $y,$q)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/product/canvas/service/product.service.class.php
|
* \file htdocs/product/canvas/service/actions_card_service.class.php
|
||||||
* \ingroup service
|
* \ingroup service
|
||||||
* \brief Fichier de la classe des services par defaut
|
* \brief Fichier de la classe des services par defaut
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \files htdocs/societe/class/companybankaccount.class.php
|
* \file htdocs/societe/class/companybankaccount.class.php
|
||||||
* \ingroup societe
|
* \ingroup societe
|
||||||
* \brief File of class to manage bank accounts description of third parties
|
* \brief File of class to manage bank accounts description of third parties
|
||||||
*/
|
*/
|
||||||
@ -26,159 +26,159 @@ require_once(DOL_DOCUMENT_ROOT ."/compta/bank/class/account.class.php");
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Class to manage bank accounts description of third parties
|
* \brief Class to manage bank accounts description of third parties
|
||||||
*/
|
*/
|
||||||
class CompanyBankAccount extends Account
|
class CompanyBankAccount extends Account
|
||||||
{
|
{
|
||||||
var $rowid;
|
var $rowid;
|
||||||
var $socid;
|
var $socid;
|
||||||
|
|
||||||
var $bank;
|
var $bank;
|
||||||
var $courant;
|
var $courant;
|
||||||
var $clos;
|
var $clos;
|
||||||
var $code_banque;
|
var $code_banque;
|
||||||
var $code_guichet;
|
var $code_guichet;
|
||||||
var $number;
|
var $number;
|
||||||
var $cle_rib;
|
var $cle_rib;
|
||||||
var $bic;
|
var $bic;
|
||||||
var $iban;
|
var $iban;
|
||||||
var $iban_prefix; // deprecated
|
var $iban_prefix; // deprecated
|
||||||
var $proprio;
|
var $proprio;
|
||||||
var $adresse_proprio;
|
var $adresse_proprio;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
function CompanyBankAccount($DB)
|
function CompanyBankAccount($DB)
|
||||||
{
|
{
|
||||||
$this->db = $DB;
|
$this->db = $DB;
|
||||||
|
|
||||||
$this->socid = 0;
|
$this->socid = 0;
|
||||||
$this->clos = 0;
|
$this->clos = 0;
|
||||||
$this->solde = 0;
|
$this->solde = 0;
|
||||||
$this->error_number = 0;
|
$this->error_number = 0;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create bank information record
|
* Create bank information record
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function create()
|
function create()
|
||||||
{
|
{
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."societe_rib (fk_soc, datec) values ($this->socid, ".$this->db->idate(mktime()).")";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."societe_rib (fk_soc, datec) values ($this->socid, ".$this->db->idate(mktime()).")";
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
if ($this->db->affected_rows($resql))
|
if ($this->db->affected_rows($resql))
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $this->db->error();
|
print $this->db->error();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function update($user='')
|
function update($user='')
|
||||||
{
|
{
|
||||||
|
|
||||||
$sql = "SELECT fk_soc FROM ".MAIN_DB_PREFIX."societe_rib";
|
$sql = "SELECT fk_soc FROM ".MAIN_DB_PREFIX."societe_rib";
|
||||||
$sql .= " WHERE fk_soc = ".$this->socid;
|
$sql .= " WHERE fk_soc = ".$this->socid;
|
||||||
|
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
if ($this->db->num_rows($result) == 0)
|
if ($this->db->num_rows($result) == 0)
|
||||||
{
|
{
|
||||||
$this->create();
|
$this->create();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($this->db);
|
dol_print_error($this->db);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."societe_rib SET ";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."societe_rib SET ";
|
||||||
$sql .= " bank = '" .$this->db->escape($this->bank)."'";
|
$sql .= " bank = '" .$this->db->escape($this->bank)."'";
|
||||||
$sql .= ",code_banque='".$this->code_banque."'";
|
$sql .= ",code_banque='".$this->code_banque."'";
|
||||||
$sql .= ",code_guichet='".$this->code_guichet."'";
|
$sql .= ",code_guichet='".$this->code_guichet."'";
|
||||||
$sql .= ",number='".$this->number."'";
|
$sql .= ",number='".$this->number."'";
|
||||||
$sql .= ",cle_rib='".$this->cle_rib."'";
|
$sql .= ",cle_rib='".$this->cle_rib."'";
|
||||||
$sql .= ",bic='".$this->bic."'";
|
$sql .= ",bic='".$this->bic."'";
|
||||||
$sql .= ",iban_prefix = '".$this->iban_prefix."'";
|
$sql .= ",iban_prefix = '".$this->iban_prefix."'";
|
||||||
$sql .= ",domiciliation='".$this->db->escape($this->domiciliation)."'";
|
$sql .= ",domiciliation='".$this->db->escape($this->domiciliation)."'";
|
||||||
$sql .= ",proprio = '".$this->db->escape($this->proprio)."'";
|
$sql .= ",proprio = '".$this->db->escape($this->proprio)."'";
|
||||||
$sql .= ",adresse_proprio = '".$this->db->escape($this->adresse_proprio)."'";
|
$sql .= ",adresse_proprio = '".$this->db->escape($this->adresse_proprio)."'";
|
||||||
$sql .= " WHERE fk_soc = ".$this->socid;
|
$sql .= " WHERE fk_soc = ".$this->socid;
|
||||||
|
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($this->db);
|
dol_print_error($this->db);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load record from database
|
* Load record from database
|
||||||
* @param id Id of record
|
* @param id Id of record
|
||||||
* @param socid Id of company
|
* @param socid Id of company
|
||||||
*/
|
*/
|
||||||
function fetch($id,$socid=0)
|
function fetch($id,$socid=0)
|
||||||
{
|
{
|
||||||
if (empty($id) && empty($socid)) return -1;
|
if (empty($id) && empty($socid)) return -1;
|
||||||
|
|
||||||
$sql = "SELECT rowid, fk_soc, bank, number, code_banque, code_guichet, cle_rib, bic, iban_prefix as iban, domiciliation, proprio, adresse_proprio";
|
$sql = "SELECT rowid, fk_soc, bank, number, code_banque, code_guichet, cle_rib, bic, iban_prefix as iban, domiciliation, proprio, adresse_proprio";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe_rib";
|
$sql.= " FROM ".MAIN_DB_PREFIX."societe_rib";
|
||||||
if ($id) $sql.= " WHERE rowid = ".$id;
|
if ($id) $sql.= " WHERE rowid = ".$id;
|
||||||
if ($socid) $sql.= " WHERE fk_soc = ".$socid;
|
if ($socid) $sql.= " WHERE fk_soc = ".$socid;
|
||||||
|
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
if ($this->db->num_rows($resql))
|
if ($this->db->num_rows($resql))
|
||||||
{
|
{
|
||||||
$obj = $this->db->fetch_object($resql);
|
$obj = $this->db->fetch_object($resql);
|
||||||
|
|
||||||
$this->id = $obj->rowid;
|
$this->id = $obj->rowid;
|
||||||
$this->socid = $obj->fk_soc;
|
$this->socid = $obj->fk_soc;
|
||||||
$this->bank = $obj->bank;
|
$this->bank = $obj->bank;
|
||||||
$this->courant = $obj->courant;
|
$this->courant = $obj->courant;
|
||||||
$this->clos = $obj->clos;
|
$this->clos = $obj->clos;
|
||||||
$this->code_banque = $obj->code_banque;
|
$this->code_banque = $obj->code_banque;
|
||||||
$this->code_guichet = $obj->code_guichet;
|
$this->code_guichet = $obj->code_guichet;
|
||||||
$this->number = $obj->number;
|
$this->number = $obj->number;
|
||||||
$this->cle_rib = $obj->cle_rib;
|
$this->cle_rib = $obj->cle_rib;
|
||||||
$this->bic = $obj->bic;
|
$this->bic = $obj->bic;
|
||||||
$this->iban = $obj->iban;
|
$this->iban = $obj->iban;
|
||||||
$this->iban_prefix = $obj->iban; // deprecated
|
$this->iban_prefix = $obj->iban; // deprecated
|
||||||
$this->domiciliation = $obj->domiciliation;
|
$this->domiciliation = $obj->domiciliation;
|
||||||
$this->proprio = $obj->proprio;
|
$this->proprio = $obj->proprio;
|
||||||
$this->adresse_proprio = $obj->adresse_proprio;
|
$this->adresse_proprio = $obj->adresse_proprio;
|
||||||
}
|
}
|
||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($this->db);
|
dol_print_error($this->db);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -127,8 +127,8 @@ input.ui-input-text, textarea.ui-input-text {
|
|||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
|
|
||||||
div.fiche {
|
div.fiche {
|
||||||
margin-<?php print $left; ?>: <?php print empty($conf->browser->phone)?'10':'2'; ?>px;
|
margin-<?php print $left; ?>: <?php print (empty($conf->browser->phone)?'10':'2'); ?>px;
|
||||||
margin-<?php print $right; ?>: <?php print empty($conf->browser->phone)?'6':''; ?>px;
|
margin-<?php print $right; ?>: <?php print (empty($conf->browser->phone)?'6':''); ?>px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.fichecenter {
|
div.fichecenter {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user