This commit is contained in:
Laurent Destailleur 2012-09-08 02:17:08 +02:00
parent a7fdbcbddc
commit 0cf89eac08
7 changed files with 38 additions and 31 deletions

View File

@ -372,7 +372,6 @@ $db->close();
/** Backup the db OR just a table without mysqldump binary (does not require any exec permission) /** Backup the db OR just a table without mysqldump binary (does not require any exec permission)
* Author: David Walsh (http://davidwalsh.name/backup-mysql-database-php) * Author: David Walsh (http://davidwalsh.name/backup-mysql-database-php)
* Updated and enhanced by Stephen Larroque (lrq3000) and by the many commentators from the blog * Updated and enhanced by Stephen Larroque (lrq3000) and by the many commentators from the blog
*
* Note about foreign keys constraints: for Dolibarr, since there are a lot of constraints and when imported the tables will be inserted in the dumped order, not in constraints order, then we ABSOLUTELY need to use SET FOREIGN_KEY_CHECKS=0; when importing the sql dump. * Note about foreign keys constraints: for Dolibarr, since there are a lot of constraints and when imported the tables will be inserted in the dumped order, not in constraints order, then we ABSOLUTELY need to use SET FOREIGN_KEY_CHECKS=0; when importing the sql dump.
* Note2: db2SQL by Howard Yeend can be an alternative, by using SHOW FIELDS FROM and SHOW KEYS FROM we could generate a more precise dump (eg: by getting the type of the field and then precisely outputting the right formatting - in quotes, numeric or null - instead of trying to guess like we are doing now). * Note2: db2SQL by Howard Yeend can be an alternative, by using SHOW FIELDS FROM and SHOW KEYS FROM we could generate a more precise dump (eg: by getting the type of the field and then precisely outputting the right formatting - in quotes, numeric or null - instead of trying to guess like we are doing now).
* *

View File

@ -340,7 +340,7 @@ class BonPrelevement extends CommonObject
if ($error == 0) if ($error == 0)
{ {
$facs = array(); $facs = array();
$facs = $this->_get_list_factures(); $facs = $this->getListInvoices();
$num=count($facs); $num=count($facs);
for ($i = 0; $i < $num; $i++) for ($i = 0; $i < $num; $i++)
@ -429,7 +429,7 @@ class BonPrelevement extends CommonObject
$facs = array(); $facs = array();
$amounts = array(); $amounts = array();
$facs = $this->_get_list_factures(); $facs = $this->getListInvoices();
$num=count($facs); $num=count($facs);
for ($i = 0; $i < $num; $i++) for ($i = 0; $i < $num; $i++)
@ -587,7 +587,7 @@ class BonPrelevement extends CommonObject
* *
* @return array id of invoices * @return array id of invoices
*/ */
private function _get_list_factures() private function getListInvoices()
{ {
global $conf; global $conf;
@ -625,7 +625,7 @@ class BonPrelevement extends CommonObject
} }
else else
{ {
dol_syslog(get_class($this)."::_get_list_factures Erreur"); dol_syslog(get_class($this)."::getListInvoices Erreur");
} }
return $arr; return $arr;

View File

@ -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->_get_list_factures(); $facs = $this->getListInvoices();
$this->db->begin(); $this->db->begin();
@ -272,7 +272,7 @@ class RejetPrelevement
* *
* @return void * @return void
*/ */
private function _get_list_factures() private function getListInvoices()
{ {
global $conf; global $conf;

View File

@ -1010,6 +1010,7 @@ class CommandeFournisseur extends CommonOrder
* @param double $pu_ttc Unit price TTC * @param double $pu_ttc Unit price TTC
* @param int $type Type of line (0=product, 1=service) * @param int $type Type of line (0=product, 1=service)
* @param int $info_bits More information * @param int $info_bits More information
* @param int $notrigger Disable triggers
* @return int <=0 if KO, >0 if OK * @return int <=0 if KO, >0 if OK
*/ */
function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $fk_prod_fourn_price=0, $fourn_ref='', $remise_percent=0, $price_base_type='HT', $pu_ttc=0, $type=0, $info_bits=0, $notrigger=false) function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $fk_prod_fourn_price=0, $fourn_ref='', $remise_percent=0, $price_base_type='HT', $pu_ttc=0, $type=0, $info_bits=0, $notrigger=false)
@ -1596,6 +1597,7 @@ class CommandeFournisseur extends CommonOrder
* @param double $price_base_type Type of price base * @param double $price_base_type Type of price base
* @param int $info_bits Miscellanous informations * @param int $info_bits Miscellanous informations
* @param int $type Type of line (0=product, 1=service) * @param int $type Type of line (0=product, 1=service)
* @param int $notrigger Disable triggers
* @return int < 0 if error, > 0 if ok * @return int < 0 if error, > 0 if ok
*/ */
function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0, $txlocaltax2=0, $price_base_type='HT', $info_bits=0, $type=0, $notrigger=false) function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0, $txlocaltax2=0, $price_base_type='HT', $info_bits=0, $type=0, $notrigger=false)

View File

@ -974,6 +974,7 @@ class FactureFournisseur extends CommonInvoice
* @param string $price_base_type HT ou TTC * @param string $price_base_type HT ou TTC
* @param int $type Type of line (0=product, 1=service) * @param int $type Type of line (0=product, 1=service)
* @param int $rang Position of line * @param int $rang Position of line
* @param int $notrigger Disable triggers
* @return int >0 if OK, <0 if KO * @return int >0 if OK, <0 if KO
*/ */
function addline($desc, $pu, $txtva, $txlocaltax1, $txlocaltax2, $qty, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits='', $price_base_type='HT', $type=0, $rang=-1, $notrigger=false) function addline($desc, $pu, $txtva, $txlocaltax1, $txlocaltax2, $qty, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits='', $price_base_type='HT', $type=0, $rang=-1, $notrigger=false)
@ -1062,6 +1063,7 @@ class FactureFournisseur extends CommonInvoice
* @param int $info_bits Miscellanous informations of line * @param int $info_bits Miscellanous informations of line
* @param int $type Type of line (0=product, 1=service) * @param int $type Type of line (0=product, 1=service)
* @param double $remise_percent Pourcentage de remise de la ligne * @param double $remise_percent Pourcentage de remise de la ligne
* @param int $notrigger Disable triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function updateline($id, $label, $pu, $vatrate, $txlocaltax1=0, $txlocaltax2=0, $qty=1, $idproduct=0, $price_base_type='HT', $info_bits=0, $type=0, $remise_percent=0, $notrigger=false) function updateline($id, $label, $pu, $vatrate, $txlocaltax1=0, $txlocaltax2=0, $qty=1, $idproduct=0, $price_base_type='HT', $info_bits=0, $type=0, $remise_percent=0, $notrigger=false)

View File

@ -53,6 +53,7 @@ class MailmanSpip
/** /**
* Function used to check if SPIP is enabled on the system * Function used to check if SPIP is enabled on the system
*
* @return boolean * @return boolean
*/ */
function isSpipEnabled() function isSpipEnabled()
@ -67,6 +68,7 @@ class MailmanSpip
/** /**
* Function used to check if the SPIP config is correct * Function used to check if the SPIP config is correct
*
* @return boolean * @return boolean
*/ */
function checkSpipConfig() function checkSpipConfig()
@ -84,7 +86,8 @@ class MailmanSpip
/** /**
* Function used to connect to SPIP * Function used to connect to SPIP
* @return boolean|DoliDB *
* @return boolean|DoliDB Boolean of DoliDB
*/ */
function connectSpip() function connectSpip()
{ {
@ -102,9 +105,10 @@ class MailmanSpip
/** /**
* Function used to connect to Mailman * Function used to connect to Mailman
* @param object $object Object with the data *
* @param string $url Mailman URL to be called with patterns * @param object $object Object with the data
* @return boolean|string * @param string $url Mailman URL to be called with patterns
* @return mixed Boolean or string
*/ */
function callMailman($object, $url) function callMailman($object, $url)
{ {

View File

@ -268,19 +268,19 @@ if ($action == 'add')
{ {
$to=$adh->makeSubstitution($conf->global->MAIN_INFO_SOCIETE_MAIL); $to=$adh->makeSubstitution($conf->global->MAIN_INFO_SOCIETE_MAIL);
$from=$conf->global->ADHERENT_MAIL_FROM; $from=$conf->global->ADHERENT_MAIL_FROM;
$mailfile = new CMailFile( $mailfile = new CMailFile(
$conf->global->ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT, $conf->global->ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT,
$to, $to,
$from, $from,
$adh->makeSubstitution($conf->global->ADHERENT_AUTOREGISTER_NOTIF_MAIL), $adh->makeSubstitution($conf->global->ADHERENT_AUTOREGISTER_NOTIF_MAIL),
array(), array(),
array(), array(),
array(), array(),
"", "",
"", "",
0, 0,
-1 -1
); );
if (! $mailfile->sendfile()) if (! $mailfile->sendfile())
{ {