Restore changes after 27 may due to from savannah Crash.
This commit is contained in:
parent
087208b7fa
commit
d4a3038240
@ -36,10 +36,10 @@ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php");
|
|||||||
*/
|
*/
|
||||||
class modMyModule extends DolibarrModules
|
class modMyModule extends DolibarrModules
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* \brief Constructor. Define names, constants, directories, boxes, permissions
|
* \brief Constructor. Define names, constants, directories, boxes, permissions
|
||||||
* \param DB Database handler
|
* \param DB Database handler
|
||||||
*/
|
*/
|
||||||
function modMyModule($DB)
|
function modMyModule($DB)
|
||||||
{
|
{
|
||||||
$this->db = $DB;
|
$this->db = $DB;
|
||||||
@ -111,10 +111,10 @@ class modMyModule extends DolibarrModules
|
|||||||
|
|
||||||
// Add here list of php file(s) stored in includes/boxes that contains class to show a box.
|
// Add here list of php file(s) stored in includes/boxes that contains class to show a box.
|
||||||
// Example:
|
// Example:
|
||||||
//$this->boxes[$r][1] = "myboxa.php";
|
//$this->boxes[$r][1] = "myboxa.php";
|
||||||
//$r++;
|
//$r++;
|
||||||
//$this->boxes[$r][1] = "myboxb.php";
|
//$this->boxes[$r][1] = "myboxb.php";
|
||||||
//$r++;
|
//$r++;
|
||||||
|
|
||||||
|
|
||||||
// Permissions
|
// Permissions
|
||||||
@ -145,6 +145,7 @@ class modMyModule extends DolibarrModules
|
|||||||
// 'url'=>'/mymodule/pagetop.php',
|
// 'url'=>'/mymodule/pagetop.php',
|
||||||
// 'langs'=>'mylangfile', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
// 'langs'=>'mylangfile', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||||
// 'position'=>100,
|
// 'position'=>100,
|
||||||
|
// 'enabled'=>'1', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled.
|
||||||
// 'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
// 'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
||||||
// 'target'=>'',
|
// 'target'=>'',
|
||||||
// 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
|
// 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
|
||||||
@ -158,6 +159,7 @@ class modMyModule extends DolibarrModules
|
|||||||
// 'url'=>'/mymodule/pagelevel1.php',
|
// 'url'=>'/mymodule/pagelevel1.php',
|
||||||
// 'langs'=>'mylangfile', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
// 'langs'=>'mylangfile', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||||
// 'position'=>100,
|
// 'position'=>100,
|
||||||
|
// 'enabled'=>'1', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled.
|
||||||
// 'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
// 'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
||||||
// 'target'=>'',
|
// 'target'=>'',
|
||||||
// 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
|
// 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
|
||||||
@ -171,6 +173,7 @@ class modMyModule extends DolibarrModules
|
|||||||
// 'url'=>'/mymodule/pagelevel2.php',
|
// 'url'=>'/mymodule/pagelevel2.php',
|
||||||
// 'langs'=>'mylangfile', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
// 'langs'=>'mylangfile', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||||
// 'position'=>100,
|
// 'position'=>100,
|
||||||
|
// 'enabled'=>'1', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled.
|
||||||
// 'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
// 'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
||||||
// 'target'=>'',
|
// 'target'=>'',
|
||||||
// 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
|
// 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
|
||||||
@ -178,58 +181,58 @@ class modMyModule extends DolibarrModules
|
|||||||
|
|
||||||
|
|
||||||
// Exports
|
// Exports
|
||||||
$r=1;
|
$r=1;
|
||||||
|
|
||||||
// Example:
|
// Example:
|
||||||
// $this->export_code[$r]=$this->rights_class.'_'.$r;
|
// $this->export_code[$r]=$this->rights_class.'_'.$r;
|
||||||
// $this->export_label[$r]='CustomersInvoicesAndInvoiceLines'; // Translation key (used only if key ExportDataset_xxx_z not found)
|
// $this->export_label[$r]='CustomersInvoicesAndInvoiceLines'; // Translation key (used only if key ExportDataset_xxx_z not found)
|
||||||
// $this->export_permission[$r]=array(array("facture","facture","export"));
|
// $this->export_permission[$r]=array(array("facture","facture","export"));
|
||||||
// $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePayed",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_taux'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef');
|
// $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePayed",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_taux'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef');
|
||||||
// $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_taux'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product');
|
// $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_taux'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product');
|
||||||
// $this->export_alias_array[$r]=array('s.rowid'=>"socid",'s.nom'=>'soc_name','s.address'=>'soc_adres','s.cp'=>'soc_zip','s.ville'=>'soc_ville','s.fk_pays'=>'soc_pays','s.tel'=>'soc_tel','s.siren'=>'soc_siren','s.siret'=>'soc_siret','s.ape'=>'soc_ape','s.idprof4'=>'soc_idprof4','s.code_compta'=>'soc_customer_accountancy','s.code_compta_fournisseur'=>'soc_supplier_accountancy','f.rowid'=>"invoiceid",'f.facnumber'=>"ref",'f.datec'=>"datecreation",'f.datef'=>"dateinvoice",'f.total'=>"totalht",'f.total_ttc'=>"totalttc",'f.tva'=>"totalvat",'f.paye'=>"paid",'f.fk_statut'=>'status','f.note'=>"note",'fd.rowid'=>'lineid','fd.description'=>"linedescription",'fd.price'=>"lineprice",'fd.total_ht'=>"linetotalht",'fd.total_tva'=>"linetotaltva",'fd.total_ttc'=>"linetotalttc",'fd.tva_taux'=>"linevatrate",'fd.qty'=>"lineqty",'fd.date_start'=>"linedatestart",'fd.date_end'=>"linedateend",'fd.fk_product'=>'productid','p.ref'=>'productref');
|
// $this->export_alias_array[$r]=array('s.rowid'=>"socid",'s.nom'=>'soc_name','s.address'=>'soc_adres','s.cp'=>'soc_zip','s.ville'=>'soc_ville','s.fk_pays'=>'soc_pays','s.tel'=>'soc_tel','s.siren'=>'soc_siren','s.siret'=>'soc_siret','s.ape'=>'soc_ape','s.idprof4'=>'soc_idprof4','s.code_compta'=>'soc_customer_accountancy','s.code_compta_fournisseur'=>'soc_supplier_accountancy','f.rowid'=>"invoiceid",'f.facnumber'=>"ref",'f.datec'=>"datecreation",'f.datef'=>"dateinvoice",'f.total'=>"totalht",'f.total_ttc'=>"totalttc",'f.tva'=>"totalvat",'f.paye'=>"paid",'f.fk_statut'=>'status','f.note'=>"note",'fd.rowid'=>'lineid','fd.description'=>"linedescription",'fd.price'=>"lineprice",'fd.total_ht'=>"linetotalht",'fd.total_tva'=>"linetotaltva",'fd.total_ttc'=>"linetotalttc",'fd.tva_taux'=>"linevatrate",'fd.qty'=>"lineqty",'fd.date_start'=>"linedatestart",'fd.date_end'=>"linedateend",'fd.fk_product'=>'productid','p.ref'=>'productref');
|
||||||
// $this->export_sql_start[$r]='SELECT DISTINCT ';
|
// $this->export_sql_start[$r]='SELECT DISTINCT ';
|
||||||
// $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'facture as f, '.MAIN_DB_PREFIX.'facturedet as fd, '.MAIN_DB_PREFIX.'societe as s)';
|
// $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'facture as f, '.MAIN_DB_PREFIX.'facturedet as fd, '.MAIN_DB_PREFIX.'societe as s)';
|
||||||
// $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (fd.fk_product = p.rowid)';
|
// $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (fd.fk_product = p.rowid)';
|
||||||
// $this->export_sql_end[$r] .=' WHERE f.fk_soc = s.rowid AND f.rowid = fd.fk_facture';
|
// $this->export_sql_end[$r] .=' WHERE f.fk_soc = s.rowid AND f.rowid = fd.fk_facture';
|
||||||
// $r++;
|
// $r++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Function called when module is enabled.
|
* \brief Function called when module is enabled.
|
||||||
* The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database.
|
* The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database.
|
||||||
* It also creates data directories.
|
* It also creates data directories.
|
||||||
* \return int 1 if OK, 0 if KO
|
* \return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function init()
|
function init()
|
||||||
{
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
$result=$this->load_tables();
|
$result=$this->load_tables();
|
||||||
|
|
||||||
return $this->_init($sql);
|
return $this->_init($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Function called when module is disabled.
|
* \brief Function called when module is disabled.
|
||||||
* Remove from database constants, boxes and permissions from Dolibarr database.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
* Data directories are not deleted.
|
* Data directories are not deleted.
|
||||||
* \return int 1 if OK, 0 if KO
|
* \return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function remove()
|
function remove()
|
||||||
{
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_remove($sql);
|
return $this->_remove($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Create tables and keys required by module
|
* \brief Create tables, keys and data required by module
|
||||||
* Files mymodule.sql and mymodule.key.sql with create table and create keys
|
* Files llx_table1.sql, llx_table1.key.sql llx_data.sql with create table, create keys
|
||||||
* commands must be stored in directory /mymodule/sql/
|
* and create data commands must be stored in directory /mymodule/sql/
|
||||||
* This function is called by this->init.
|
* This function is called by this->init.
|
||||||
* \return int <=0 if KO, >0 if OK
|
* \return int <=0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function load_tables()
|
function load_tables()
|
||||||
{
|
{
|
||||||
return $this->_load_tables('/mymodule/sql/');
|
return $this->_load_tables('/mymodule/sql/');
|
||||||
|
|||||||
@ -463,7 +463,7 @@ print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
|||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="set_COMMANDE_FREE_TEXT">';
|
print '<input type="hidden" name="action" value="set_COMMANDE_FREE_TEXT">';
|
||||||
print '<tr '.$bc[$var].'><td colspan="2">';
|
print '<tr '.$bc[$var].'><td colspan="2">';
|
||||||
print $langs->trans("FreeLegalTextOnOrders").'<br>';
|
print $langs->trans("FreeLegalTextOnOrders").' ('.$langs->trans("AddCRIfTooLong").')<br>';
|
||||||
print '<textarea name="COMMANDE_FREE_TEXT" class="flat" cols="100">'.$conf->global->COMMANDE_FREE_TEXT.'</textarea>';
|
print '<textarea name="COMMANDE_FREE_TEXT" class="flat" cols="100">'.$conf->global->COMMANDE_FREE_TEXT.'</textarea>';
|
||||||
print '</td><td align="right">';
|
print '</td><td align="right">';
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||||
|
|||||||
@ -615,7 +615,7 @@ print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
|||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="set_FACTURE_FREE_TEXT">';
|
print '<input type="hidden" name="action" value="set_FACTURE_FREE_TEXT">';
|
||||||
print '<tr '.$bc[$var].'><td colspan="2">';
|
print '<tr '.$bc[$var].'><td colspan="2">';
|
||||||
print $langs->trans("FreeLegalTextOnInvoices").'<br>';
|
print $langs->trans("FreeLegalTextOnInvoices").' ('.$langs->trans("AddCRIfTooLong").')<br>';
|
||||||
print '<textarea name="FACTURE_FREE_TEXT" class="flat" cols="100">'.$conf->global->FACTURE_FREE_TEXT.'</textarea>';
|
print '<textarea name="FACTURE_FREE_TEXT" class="flat" cols="100">'.$conf->global->FACTURE_FREE_TEXT.'</textarea>';
|
||||||
print '</td><td align="right">';
|
print '</td><td align="right">';
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||||
|
|||||||
@ -423,7 +423,7 @@ print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
|||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="set_DELIVERY_FREE_TEXT">';
|
print '<input type="hidden" name="action" value="set_DELIVERY_FREE_TEXT">';
|
||||||
print '<tr '.$bc[$var].'><td colspan="2">';
|
print '<tr '.$bc[$var].'><td colspan="2">';
|
||||||
print $langs->trans("FreeLegalTextOnDeliveryReceipts").'<br>';
|
print $langs->trans("FreeLegalTextOnDeliveryReceipts").' ('.$langs->trans("AddCRIfTooLong").')<br>';
|
||||||
print '<textarea name="DELIVERY_FREE_TEXT" class="flat" cols="100">'.$conf->global->DELIVERY_FREE_TEXT.'</textarea>';
|
print '<textarea name="DELIVERY_FREE_TEXT" class="flat" cols="100">'.$conf->global->DELIVERY_FREE_TEXT.'</textarea>';
|
||||||
print '</td><td align="right">';
|
print '</td><td align="right">';
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||||
|
|||||||
@ -469,7 +469,7 @@ print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
|||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="set_PROPALE_FREE_TEXT">';
|
print '<input type="hidden" name="action" value="set_PROPALE_FREE_TEXT">';
|
||||||
print '<tr '.$bc[$var].'><td colspan="2">';
|
print '<tr '.$bc[$var].'><td colspan="2">';
|
||||||
print $langs->trans("FreeLegalTextOnProposal").'<br>';
|
print $langs->trans("FreeLegalTextOnProposal").' ('.$langs->trans("AddCRIfTooLong").')<br>';
|
||||||
print '<textarea name="PROPALE_FREE_TEXT" class="flat" cols="100">'.$conf->global->PROPALE_FREE_TEXT.'</textarea>';
|
print '<textarea name="PROPALE_FREE_TEXT" class="flat" cols="100">'.$conf->global->PROPALE_FREE_TEXT.'</textarea>';
|
||||||
print '</td><td align="right">';
|
print '</td><td align="right">';
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||||
|
|||||||
@ -72,7 +72,7 @@ function printBookmarksList ($aDb, $aLangs)
|
|||||||
while ($i < $conf->global->BOOKMARKS_SHOW_IN_MENU && $obj = $db->fetch_object($resql))
|
while ($i < $conf->global->BOOKMARKS_SHOW_IN_MENU && $obj = $db->fetch_object($resql))
|
||||||
{
|
{
|
||||||
$ret.='<div class="menu_contenu"><a class="vsmenu" title="'.$obj->title.'" href="'.$obj->url.'"'.($obj->target == 1?' target="_blank"':'').'>';
|
$ret.='<div class="menu_contenu"><a class="vsmenu" title="'.$obj->title.'" href="'.$obj->url.'"'.($obj->target == 1?' target="_blank"':'').'>';
|
||||||
$ret.=' '.img_object($langs->trans("BookmarkThisPage"),'bookmark').' ';
|
$ret.=' '.img_object('','bookmark').' ';
|
||||||
$ret.= dol_trunc($obj->title, 20).'</a><br></div>';
|
$ret.= dol_trunc($obj->title, 20).'</a><br></div>';
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -51,6 +51,7 @@ if (isset($_GET["msg"])) { $mesg=urldecode($_GET["mesg"]); }
|
|||||||
$year=isset($_GET["year"])?$_GET["year"]:"";
|
$year=isset($_GET["year"])?$_GET["year"]:"";
|
||||||
$month=isset($_GET["month"])?$_GET["month"]:"";
|
$month=isset($_GET["month"])?$_GET["month"]:"";
|
||||||
$socid=isset($_GET['socid'])?$_GET['socid']:$_POST['socid'];
|
$socid=isset($_GET['socid'])?$_GET['socid']:$_POST['socid'];
|
||||||
|
$mesg=isset($_GET['mesg'])?urldecode($_GET['mesg']):'';
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$module='propale';
|
$module='propale';
|
||||||
@ -505,7 +506,7 @@ if ($_POST['action'] == 'send' && ! $_POST['addfile'] && ! $_POST['cancel'])
|
|||||||
{
|
{
|
||||||
// Redirect here
|
// Redirect here
|
||||||
// This avoid sending mail twice if going out and then back to page
|
// This avoid sending mail twice if going out and then back to page
|
||||||
Header('Location: '.$_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&msg='.urlencode($mesg));
|
Header('Location: '.$_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&mesg='.urlencode($mesg));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -441,8 +441,8 @@ class Account extends CommonObject
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$this->db.' sql='.$sql;
|
$this->error=$this->db->lasterror();
|
||||||
dol_print_error($this->error, LOG_ERR);
|
dol_print_error($this->db);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -450,12 +450,12 @@ class Account extends CommonObject
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* \brief Update BBAN (RIB) account fields
|
* \brief Update BBAN (RIB) account fields
|
||||||
* \param user Object utilisateur qui modifie
|
* \param user Object user making update
|
||||||
* \return int <0 si ko, >0 si ok
|
* \return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function update_bban($user='')
|
function update_bban($user='')
|
||||||
{
|
{
|
||||||
global $langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
// Chargement librairie pour acces fonction controle RIB
|
// Chargement librairie pour acces fonction controle RIB
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/lib/bank.lib.php');
|
require_once(DOL_DOCUMENT_ROOT.'/lib/bank.lib.php');
|
||||||
@ -492,8 +492,8 @@ class Account extends CommonObject
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$this->db.' sql='.$sql;
|
$this->error=$this->db->lasterror();
|
||||||
dol_print_error($this->error, LOG_ERR);
|
dol_print_error($this->db);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1004,9 +1004,9 @@ class AccountLine
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Met a jour en base la ligne
|
* \brief Update bank account record in database
|
||||||
* \param user Objet user qui met a jour
|
* \param user Object user making update
|
||||||
* \param notrigger 0=Desactive les triggers
|
* \param notrigger 0=Disable all triggers
|
||||||
* \param int <0 if KO, >0 if OK
|
* \param int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function update($user,$notrigger=0)
|
function update($user,$notrigger=0)
|
||||||
|
|||||||
@ -42,9 +42,6 @@ if ($conf->propal->enabled) require_once(DOL_DOCUMENT_ROOT.'/propal.class.php'
|
|||||||
if ($conf->contrat->enabled) require_once(DOL_DOCUMENT_ROOT.'/contrat/contrat.class.php');
|
if ($conf->contrat->enabled) require_once(DOL_DOCUMENT_ROOT.'/contrat/contrat.class.php');
|
||||||
if ($conf->commande->enabled) require_once(DOL_DOCUMENT_ROOT.'/commande/commande.class.php');
|
if ($conf->commande->enabled) require_once(DOL_DOCUMENT_ROOT.'/commande/commande.class.php');
|
||||||
|
|
||||||
if (! $user->rights->facture->lire)
|
|
||||||
accessforbidden();
|
|
||||||
|
|
||||||
$langs->load('bills');
|
$langs->load('bills');
|
||||||
$langs->load('companies');
|
$langs->load('companies');
|
||||||
$langs->load('products');
|
$langs->load('products');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user