Merge remote-tracking branch 'upstream/develop' into develop
This commit is contained in:
commit
44734785b1
@ -19,7 +19,7 @@ WARNING:
|
|||||||
|
|
||||||
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
||||||
* If you use some links like viewimages.php?modulepart=mycompany&file=... in you external modules, you must
|
* If you use some links like viewimages.php?modulepart=mycompany&file=... in you external modules, you must
|
||||||
relace them with links like viewimages.php?modulepart=mycompany&file=logos/... (note that link change only for
|
replace them with links like viewimages.php?modulepart=mycompany&file=logos/... (note that link change only for
|
||||||
modulepart=mycompany that now works like others).
|
modulepart=mycompany that now works like others).
|
||||||
|
|
||||||
|
|
||||||
@ -242,7 +242,8 @@ Following changes may create regressions for some external modules, but were nec
|
|||||||
* Remove method Categorie:get_nb_categories() that was not used.
|
* Remove method Categorie:get_nb_categories() that was not used.
|
||||||
* Hook getnomurltooltip provide a duplicate feature compared to hook getNomUrl so all hooks getnomurltooltip
|
* Hook getnomurltooltip provide a duplicate feature compared to hook getNomUrl so all hooks getnomurltooltip
|
||||||
are now replaced with hook getNomUrl.
|
are now replaced with hook getNomUrl.
|
||||||
|
* The substitution key __CONTACTCIVNAME__ is no longer present, it has been replaced by __CONTACT_NAME_{TYPE}__
|
||||||
|
where {TYPE} is contact type code (BILLING, SHIPPING, CUSTOMER, ... see contact type dictionnary).
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 7.0.3 compared to 7.0.2 *****
|
***** ChangeLog for 7.0.3 compared to 7.0.2 *****
|
||||||
|
|||||||
@ -1,6 +1,10 @@
|
|||||||
# DOLIBARR ERP & CRM
|
# DOLIBARR ERP & CRM
|
||||||
|
|
||||||
 
|

|
||||||
|
|
||||||
|
|6|7|8|develop|
|
||||||
|
|----------|----------|----------|----------|
|
||||||
|
|||||
|
||||||
|
|
||||||
Dolibarr ERP & CRM is a modern software package to manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda…).
|
Dolibarr ERP & CRM is a modern software package to manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda…).
|
||||||
|
|
||||||
|
|||||||
@ -128,16 +128,16 @@ complete_dictionary_with_modules($taborder,$tabname,$tablib,$tabsql,$tabsqlsort,
|
|||||||
|
|
||||||
// Define elementList and sourceList (used for dictionary type of contacts "llx_c_type_contact")
|
// Define elementList and sourceList (used for dictionary type of contacts "llx_c_type_contact")
|
||||||
$elementList = array();
|
$elementList = array();
|
||||||
// Must match ids defined into eldy.lib.php
|
// Must match ids defined into eldy.lib.php
|
||||||
$sourceList = array(
|
$sourceList = array(
|
||||||
'1' => $langs->trans('AccountingJournalType1'),
|
'1' => $langs->trans('AccountingJournalType1'),
|
||||||
'2' => $langs->trans('AccountingJournalType2'),
|
'2' => $langs->trans('AccountingJournalType2'),
|
||||||
'3' => $langs->trans('AccountingJournalType3'),
|
'3' => $langs->trans('AccountingJournalType3'),
|
||||||
'4' => $langs->trans('AccountingJournalType4'),
|
'4' => $langs->trans('AccountingJournalType4'),
|
||||||
'5' => $langs->trans('AccountingJournalType5'),
|
'5' => $langs->trans('AccountingJournalType5'),
|
||||||
'8' => $langs->trans('AccountingJournalType8'),
|
'8' => $langs->trans('AccountingJournalType8'),
|
||||||
'9' => $langs->trans('AccountingJournalType9')
|
'9' => $langs->trans('AccountingJournalType9'),
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
@ -294,10 +294,10 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
|||||||
//$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
|
//$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GETPOST('actioncancel'))
|
//if (GETPOST('actioncancel'))
|
||||||
{
|
//{
|
||||||
//$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
|
// $_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
|
||||||
}
|
//}
|
||||||
|
|
||||||
if ($action == 'confirm_delete' && $confirm == 'yes') // delete
|
if ($action == 'confirm_delete' && $confirm == 'yes') // delete
|
||||||
{
|
{
|
||||||
|
|||||||
@ -195,18 +195,18 @@ class AccountancyCategory // extends CommonObject
|
|||||||
{
|
{
|
||||||
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."c_accounting_category");
|
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."c_accounting_category");
|
||||||
|
|
||||||
if (! $notrigger)
|
// Uncomment this and change MYOBJECT to your own tag if you
|
||||||
{
|
// want this action call a trigger.
|
||||||
// Uncomment this and change MYOBJECT to your own tag if you
|
//if (! $notrigger)
|
||||||
// want this action call a trigger.
|
//{
|
||||||
|
|
||||||
//// Call triggers
|
// // Call triggers
|
||||||
//include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
// include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||||
//$interface=new Interfaces($this->db);
|
// $interface=new Interfaces($this->db);
|
||||||
//$result=$interface->run_triggers('MYOBJECT_CREATE',$this,$user,$langs,$conf);
|
// $result=$interface->run_triggers('MYOBJECT_CREATE',$this,$user,$langs,$conf);
|
||||||
//if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
// if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||||
//// End call triggers
|
// // End call triggers
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
@ -334,18 +334,17 @@ class AccountancyCategory // extends CommonObject
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
if (! $notrigger)
|
// Uncomment this and change MYOBJECT to your own tag if you
|
||||||
{
|
// want this action call a trigger.
|
||||||
// Uncomment this and change MYOBJECT to your own tag if you
|
//if (! $notrigger)
|
||||||
// want this action call a trigger.
|
//{
|
||||||
|
// // Call triggers
|
||||||
//// Call triggers
|
// include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||||
//include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
// $interface=new Interfaces($this->db);
|
||||||
//$interface=new Interfaces($this->db);
|
// $result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf);
|
||||||
//$result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf);
|
// if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||||
//if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
// // End call triggers
|
||||||
//// End call triggers
|
//}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
@ -390,18 +389,17 @@ class AccountancyCategory // extends CommonObject
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
if (! $notrigger)
|
// Uncomment this and change MYOBJECT to your own tag if you
|
||||||
{
|
// want this action call a trigger.
|
||||||
// Uncomment this and change MYOBJECT to your own tag if you
|
//if (! $notrigger)
|
||||||
// want this action call a trigger.
|
//{
|
||||||
|
// // Call triggers
|
||||||
//// Call triggers
|
// include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||||
//include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
// $interface=new Interfaces($this->db);
|
||||||
//$interface=new Interfaces($this->db);
|
// $result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf);
|
||||||
//$result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf);
|
// if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||||
//if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
// // End call triggers
|
||||||
//// End call triggers
|
//}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
|
|||||||
@ -335,18 +335,15 @@ class BookKeeping extends CommonObject
|
|||||||
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error) {
|
// Uncomment this and change MYOBJECT to your own tag if you
|
||||||
|
// want this action to call a trigger.
|
||||||
|
//if (! $error && ! $notrigger) {
|
||||||
|
|
||||||
if (! $notrigger) {
|
// // Call triggers
|
||||||
// Uncomment this and change MYOBJECT to your own tag if you
|
// $result=$this->call_trigger('MYOBJECT_CREATE',$user);
|
||||||
// want this action to call a trigger.
|
// if ($result < 0) $error++;
|
||||||
|
// // End call triggers
|
||||||
// // Call triggers
|
//}
|
||||||
// $result=$this->call_trigger('MYOBJECT_CREATE',$user);
|
|
||||||
// if ($result < 0) $error++;
|
|
||||||
// // End call triggers
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
if ($error) {
|
if ($error) {
|
||||||
@ -566,15 +563,15 @@ class BookKeeping extends CommonObject
|
|||||||
if (! $error) {
|
if (! $error) {
|
||||||
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX . $this->table_element . $mode);
|
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX . $this->table_element . $mode);
|
||||||
|
|
||||||
if (! $notrigger) {
|
// Uncomment this and change MYOBJECT to your own tag if you
|
||||||
// Uncomment this and change MYOBJECT to your own tag if you
|
// want this action to call a trigger.
|
||||||
// want this action to call a trigger.
|
//if (! $notrigger) {
|
||||||
|
|
||||||
// // Call triggers
|
// // Call triggers
|
||||||
// $result=$this->call_trigger('MYOBJECT_CREATE',$user);
|
// $result=$this->call_trigger('MYOBJECT_CREATE',$user);
|
||||||
// if ($result < 0) $error++;
|
// if ($result < 0) $error++;
|
||||||
// // End call triggers
|
// // End call triggers
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
@ -1131,15 +1128,15 @@ class BookKeeping extends CommonObject
|
|||||||
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error && ! $notrigger) {
|
// Uncomment this and change MYOBJECT to your own tag if you
|
||||||
// Uncomment this and change MYOBJECT to your own tag if you
|
// want this action calls a trigger.
|
||||||
// want this action calls a trigger.
|
//if (! $error && ! $notrigger) {
|
||||||
|
|
||||||
// // Call triggers
|
// // Call triggers
|
||||||
// $result=$this->call_trigger('MYOBJECT_MODIFY',$user);
|
// $result=$this->call_trigger('MYOBJECT_MODIFY',$user);
|
||||||
// if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
// if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
||||||
// // End call triggers
|
// // End call triggers
|
||||||
}
|
//}
|
||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
if ($error) {
|
if ($error) {
|
||||||
@ -1205,17 +1202,15 @@ class BookKeeping extends CommonObject
|
|||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
if (! $error) {
|
// Uncomment this and change MYOBJECT to your own tag if you
|
||||||
if (! $notrigger) {
|
// want this action calls a trigger.
|
||||||
// Uncomment this and change MYOBJECT to your own tag if you
|
//if (! $error && ! $notrigger) {
|
||||||
// want this action calls a trigger.
|
|
||||||
|
|
||||||
// // Call triggers
|
// // Call triggers
|
||||||
// $result=$this->call_trigger('MYOBJECT_DELETE',$user);
|
// $result=$this->call_trigger('MYOBJECT_DELETE',$user);
|
||||||
// if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
// if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
||||||
// // End call triggers
|
// // End call triggers
|
||||||
}
|
//}
|
||||||
}
|
|
||||||
|
|
||||||
if (! $error) {
|
if (! $error) {
|
||||||
$sql = 'DELETE FROM ' . MAIN_DB_PREFIX . $this->table_element.$mode;
|
$sql = 'DELETE FROM ' . MAIN_DB_PREFIX . $this->table_element.$mode;
|
||||||
|
|||||||
@ -153,7 +153,7 @@ $y = $year_current;
|
|||||||
$buttonbind = '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=validatehistory">' . $langs->trans("ValidateHistory") . '</a>';
|
$buttonbind = '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=validatehistory">' . $langs->trans("ValidateHistory") . '</a>';
|
||||||
|
|
||||||
print_barre_liste($langs->trans("OverviewOfAmountOfLinesNotBound"), '', '', '', '', '', '', -1, '', '', 0, $buttonbind, '', 0, 1, 1);
|
print_barre_liste($langs->trans("OverviewOfAmountOfLinesNotBound"), '', '', '', '', '', '', -1, '', '', 0, $buttonbind, '', 0, 1, 1);
|
||||||
//print_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, '');
|
//print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, '');
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
@ -229,7 +229,7 @@ print '<br>';
|
|||||||
|
|
||||||
|
|
||||||
print_barre_liste($langs->trans("OverviewOfAmountOfLinesBound"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
|
print_barre_liste($langs->trans("OverviewOfAmountOfLinesBound"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
|
||||||
//print_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), '', '');
|
//print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), '', '');
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
@ -309,7 +309,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print_barre_liste($langs->trans("OtherInfo"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
|
print_barre_liste($langs->trans("OtherInfo"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
|
||||||
//print_fiche_titre($langs->trans("OtherInfo"), '', '');
|
//print load_fiche_titre($langs->trans("OtherInfo"), '', '');
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
|
|||||||
@ -150,7 +150,7 @@ $buttonbind = '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?year=' .
|
|||||||
|
|
||||||
|
|
||||||
print_barre_liste($langs->trans("OverviewOfAmountOfLinesNotBound"), '', '', '', '', '', '', -1, '', '', 0, $buttonbind, '', 0, 1, 1);
|
print_barre_liste($langs->trans("OverviewOfAmountOfLinesNotBound"), '', '', '', '', '', '', -1, '', '', 0, $buttonbind, '', 0, 1, 1);
|
||||||
//print_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, '');
|
//print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, '');
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
@ -221,7 +221,7 @@ print '<br>';
|
|||||||
|
|
||||||
|
|
||||||
print_barre_liste($langs->trans("OverviewOfAmountOfLinesBound"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
|
print_barre_liste($langs->trans("OverviewOfAmountOfLinesBound"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
|
||||||
//print_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), '', '');
|
//print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), '', '');
|
||||||
|
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
@ -297,7 +297,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print_barre_liste($langs->trans("OtherInfo"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
|
print_barre_liste($langs->trans("OtherInfo"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
|
||||||
//print_fiche_titre($langs->trans("OtherInfo"), '', '');
|
//print load_fiche_titre($langs->trans("OtherInfo"), '', '');
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
|
|||||||
@ -55,7 +55,7 @@ if ($conf->accounting->enabled)
|
|||||||
print $langs->trans("AccountancyAreaDescIntro")."<br>\n";
|
print $langs->trans("AccountancyAreaDescIntro")."<br>\n";
|
||||||
print "<br>\n";print "<br>\n";
|
print "<br>\n";print "<br>\n";
|
||||||
|
|
||||||
print_fiche_titre('<span class="fa fa-calendar-check-o"></span> '.$langs->trans("AccountancyAreaDescActionOnce"), '', '')."<br>\n";
|
print load_fiche_titre('<span class="fa fa-calendar-check-o"></span> '.$langs->trans("AccountancyAreaDescActionOnce"), '', '')."<br>\n";
|
||||||
print '<hr>';
|
print '<hr>';
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
|
||||||
@ -131,7 +131,7 @@ if ($conf->accounting->enabled)
|
|||||||
|
|
||||||
|
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
print_fiche_titre('<span class="fa fa-calendar"></span> '.$langs->trans("AccountancyAreaDescActionFreq"), '', '');
|
print load_fiche_titre('<span class="fa fa-calendar"></span> '.$langs->trans("AccountancyAreaDescActionFreq"), '', '');
|
||||||
print '<hr>';
|
print '<hr>';
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
$step = 0;
|
$step = 0;
|
||||||
|
|||||||
@ -150,7 +150,7 @@ $buttonbind = '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?year=' .
|
|||||||
|
|
||||||
|
|
||||||
print_barre_liste($langs->trans("OverviewOfAmountOfLinesNotBound"), '', '', '', '', '', '', -1, '', '', 0, $buttonbind, '', 0, 1, 1);
|
print_barre_liste($langs->trans("OverviewOfAmountOfLinesNotBound"), '', '', '', '', '', '', -1, '', '', 0, $buttonbind, '', 0, 1, 1);
|
||||||
//print_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, '');
|
//print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, '');
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
@ -221,7 +221,7 @@ print '<br>';
|
|||||||
|
|
||||||
|
|
||||||
print_barre_liste($langs->trans("OverviewOfAmountOfLinesBound"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
|
print_barre_liste($langs->trans("OverviewOfAmountOfLinesBound"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
|
||||||
//print_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), '', '');
|
//print load_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), '', '');
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
@ -295,7 +295,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print_barre_liste($langs->trans("OtherInfo"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
|
print_barre_liste($langs->trans("OtherInfo"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1);
|
||||||
//print_fiche_titre($langs->trans("OtherInfo"), '', '');
|
//print load_fiche_titre($langs->trans("OtherInfo"), '', '');
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
|
|||||||
@ -2624,6 +2624,7 @@ class Adherent extends CommonObject
|
|||||||
$outputlangs = new Translate('', $conf);
|
$outputlangs = new Translate('', $conf);
|
||||||
$outputlangs->setDefaultLang(empty($adherent->thirdparty->default_lang) ? $mysoc->default_lang : $adherent->thirdparty->default_lang);
|
$outputlangs->setDefaultLang(empty($adherent->thirdparty->default_lang) ? $mysoc->default_lang : $adherent->thirdparty->default_lang);
|
||||||
$outputlangs->loadLangs(array("main", "members"));
|
$outputlangs->loadLangs(array("main", "members"));
|
||||||
|
dol_syslog("sendReminderForExpiredSubscription Language set to ".$outputlangs->defaultlang);
|
||||||
|
|
||||||
$arraydefaultmessage=null;
|
$arraydefaultmessage=null;
|
||||||
$labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION;
|
$labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION;
|
||||||
|
|||||||
@ -306,7 +306,7 @@ if (! empty($conf->product->enabled))
|
|||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->trans("SetDefaultBarcodeTypeProducts").'</td>';
|
print '<td>'.$langs->trans("SetDefaultBarcodeTypeProducts").'</td>';
|
||||||
print '<td width="60" align="right">';
|
print '<td width="60" align="right">';
|
||||||
$formbarcode->select_barcode_type($conf->global->PRODUIT_DEFAULT_BARCODE_TYPE,"PRODUIT_DEFAULT_BARCODE_TYPE",1);
|
print $formbarcode->selectBarcodeType($conf->global->PRODUIT_DEFAULT_BARCODE_TYPE, "PRODUIT_DEFAULT_BARCODE_TYPE", 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -317,7 +317,7 @@ if (! empty($conf->societe->enabled))
|
|||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->trans("SetDefaultBarcodeTypeThirdParties").'</td>';
|
print '<td>'.$langs->trans("SetDefaultBarcodeTypeThirdParties").'</td>';
|
||||||
print '<td width="60" align="right">';
|
print '<td width="60" align="right">';
|
||||||
print $formbarcode->select_barcode_type($conf->global->GENBARCODE_BARCODETYPE_THIRDPARTY,"GENBARCODE_BARCODETYPE_THIRDPARTY",1);
|
print $formbarcode->selectBarcodeType($conf->global->GENBARCODE_BARCODETYPE_THIRDPARTY, "GENBARCODE_BARCODETYPE_THIRDPARTY", 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
/* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2011-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com>
|
||||||
* Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com>
|
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -30,9 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/holiday.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/holiday.lib.php';
|
||||||
|
|
||||||
$langs->load("admin");
|
// Load translation files required by the page
|
||||||
$langs->load("errors");
|
$langs->loadLangs(array("admin", "errors", "holiday"));
|
||||||
$langs->load("holiday");
|
|
||||||
|
|
||||||
if (!$user->admin) accessforbidden();
|
if (!$user->admin) accessforbidden();
|
||||||
|
|
||||||
@ -341,7 +339,6 @@ print "</tr>\n";
|
|||||||
|
|
||||||
clearstatcache();
|
clearstatcache();
|
||||||
|
|
||||||
$var=true;
|
|
||||||
foreach ($dirmodels as $reldir)
|
foreach ($dirmodels as $reldir)
|
||||||
{
|
{
|
||||||
foreach (array('','/doc') as $valdir)
|
foreach (array('','/doc') as $valdir)
|
||||||
@ -379,7 +376,6 @@ foreach ($dirmodels as $reldir)
|
|||||||
|
|
||||||
if ($modulequalified)
|
if ($modulequalified)
|
||||||
{
|
{
|
||||||
$var = !$var;
|
|
||||||
print '<tr class="oddeven"><td width="100">';
|
print '<tr class="oddeven"><td width="100">';
|
||||||
print (empty($module->name)?$name:$module->name);
|
print (empty($module->name)?$name:$module->name);
|
||||||
print "</td><td>\n";
|
print "</td><td>\n";
|
||||||
@ -474,7 +470,6 @@ print '<tr class="liste_titre">';
|
|||||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||||
print '<td align="center" width="60">'.$langs->trans("Value").'</td>';
|
print '<td align="center" width="60">'.$langs->trans("Value").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$var=true;
|
|
||||||
|
|
||||||
$substitutionarray=pdf_getSubstitutionArray($langs, array('objectamount'), null, 2);
|
$substitutionarray=pdf_getSubstitutionArray($langs, array('objectamount'), null, 2);
|
||||||
$substitutionarray['__(AnyTranslationKey)__']=$langs->trans("Translation");
|
$substitutionarray['__(AnyTranslationKey)__']=$langs->trans("Translation");
|
||||||
@ -482,7 +477,6 @@ $htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
|
|||||||
foreach($substitutionarray as $key => $val) $htmltext.=$key.'<br>';
|
foreach($substitutionarray as $key => $val) $htmltext.=$key.'<br>';
|
||||||
$htmltext.='</i>';
|
$htmltext.='</i>';
|
||||||
|
|
||||||
$var=! $var;
|
|
||||||
print '<tr class="oddeven"><td colspan="2">';
|
print '<tr class="oddeven"><td colspan="2">';
|
||||||
print $form->textwithpicto($langs->trans("FreeLegalTextOnHolidays"), $langs->trans("AddCRIfTooLong").'<br><br>'.$htmltext, 1, 'help', '', 0, 2, 'tooltiphelp');
|
print $form->textwithpicto($langs->trans("FreeLegalTextOnHolidays"), $langs->trans("AddCRIfTooLong").'<br><br>'.$htmltext, 1, 'help', '', 0, 2, 'tooltiphelp');
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|||||||
@ -598,17 +598,18 @@ if ($mode == 'common')
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Print a separator if we change family
|
// Print a separator if we change family
|
||||||
if ($familykey!=$oldfamily)
|
if ($familykey != $oldfamily) {
|
||||||
{
|
if ($oldfamily) {
|
||||||
if ($oldfamily) print '</table></div><br>';
|
print '</table></div><br>';
|
||||||
|
}
|
||||||
|
|
||||||
$familytext=empty($familyinfo[$familykey]['label'])?$familykey:$familyinfo[$familykey]['label'];
|
$familytext = empty($familyinfo[$familykey]['label'])?$familykey:$familyinfo[$familykey]['label'];
|
||||||
print_fiche_titre($familytext, '', '');
|
print load_fiche_titre($familytext, '', '');
|
||||||
|
|
||||||
print '<div class="div-table-responsive">';
|
print '<div class="div-table-responsive">';
|
||||||
print '<table class="tagtable liste" summary="list_of_modules">'."\n";
|
print '<table class="tagtable liste" summary="list_of_modules">'."\n";
|
||||||
|
|
||||||
$atleastoneforfamily=0;
|
$atleastoneforfamily=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$atleastoneforfamily++;
|
$atleastoneforfamily++;
|
||||||
|
|||||||
@ -171,7 +171,7 @@ llxHeader('', $langs->trans($page_name));
|
|||||||
|
|
||||||
// Subheader
|
// Subheader
|
||||||
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1">' . $langs->trans("BackToModuleList") . '</a>';
|
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1">' . $langs->trans("BackToModuleList") . '</a>';
|
||||||
print_fiche_titre($langs->trans($page_name), $linkback);
|
print load_fiche_titre($langs->trans($page_name), $linkback);
|
||||||
|
|
||||||
// Configuration header
|
// Configuration header
|
||||||
$head = multicurrencyAdminPrepareHead();
|
$head = multicurrencyAdminPrepareHead();
|
||||||
|
|||||||
@ -32,11 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('admin', 'languages', 'other'));
|
$langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members'));
|
||||||
|
|
||||||
$langs->load("companies");
|
|
||||||
$langs->load("products");
|
|
||||||
$langs->load("members");
|
|
||||||
|
|
||||||
if (! $user->admin) accessforbidden();
|
if (! $user->admin) accessforbidden();
|
||||||
|
|
||||||
|
|||||||
@ -75,7 +75,7 @@ if ($action == 'update')
|
|||||||
llxHeader('',$langs->trans('SalariesSetup'));
|
llxHeader('',$langs->trans('SalariesSetup'));
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
if (! empty($conf->accounting->enabled)) $formaccounting = New FormAccounting($db);
|
if (! empty($conf->accounting->enabled)) $formaccounting = new FormAccounting($db);
|
||||||
|
|
||||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||||
print load_fiche_titre($langs->trans('SalariesSetup'),$linkback,'title_setup');
|
print load_fiche_titre($langs->trans('SalariesSetup'),$linkback,'title_setup');
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2012 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2012 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2013-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -32,17 +32,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->load("orders");
|
$langs->loadLangs(array("admin", "other", "bills", "orders", "suppliers"));
|
||||||
|
|
||||||
if (!$user->admin)
|
if (!$user->admin)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$langs->load("admin");
|
|
||||||
$langs->load("other");
|
|
||||||
$langs->load("bills");
|
|
||||||
$langs->load("orders");
|
|
||||||
$langs->load("suppliers");
|
|
||||||
|
|
||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
|
|||||||
@ -422,7 +422,7 @@ if (! $error && $xml)
|
|||||||
$outcurrentchecksum = '<span class="'.$resultcode.'">'.$checksumget.'</span>';
|
$outcurrentchecksum = '<span class="'.$resultcode.'">'.$checksumget.'</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print_fiche_titre($langs->trans("GlobalChecksum")).'<br>';
|
print load_fiche_titre($langs->trans("GlobalChecksum")).'<br>';
|
||||||
print $langs->trans("ExpectedChecksum").' = '. $outexpectedchecksum .'<br>';
|
print $langs->trans("ExpectedChecksum").' = '. $outexpectedchecksum .'<br>';
|
||||||
print $langs->trans("CurrentChecksum").' = '. $outcurrentchecksum;
|
print $langs->trans("CurrentChecksum").' = '. $outcurrentchecksum;
|
||||||
|
|
||||||
@ -438,4 +438,3 @@ llxFooter();
|
|||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
exit($error);
|
exit($error);
|
||||||
|
|
||||||
|
|||||||
@ -24,8 +24,8 @@
|
|||||||
|
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
|
|
||||||
$langs->load("admin");
|
// Load translation files required by the page
|
||||||
$langs->load("other");
|
$langs->loadLangs(array("other","admin"));
|
||||||
|
|
||||||
if (! $user->admin)
|
if (! $user->admin)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|||||||
@ -24,8 +24,8 @@
|
|||||||
|
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
|
|
||||||
$langs->load("admin");
|
// Load translation files required by the page
|
||||||
$langs->load("companies");
|
$langs->loadLangs(array("companies","admin"));
|
||||||
|
|
||||||
if (! $user->admin)
|
if (! $user->admin)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|||||||
@ -40,10 +40,8 @@ if ($user->societe_id > 0)
|
|||||||
$socid = $user->societe_id;
|
$socid = $user->societe_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
$langs->load("admin");
|
// Load translation files required by the page
|
||||||
$langs->load("companies");
|
$langs->loadLangs(array("companies","admin","users","other"));
|
||||||
$langs->load("users");
|
|
||||||
$langs->load("other");
|
|
||||||
|
|
||||||
// Load variable for pagination
|
// Load variable for pagination
|
||||||
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
|
|||||||
@ -25,7 +25,8 @@
|
|||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
|
|
||||||
$langs->load("install");
|
// Load translation files required by the page
|
||||||
|
$langs->loadLangs(array("companies","install","users","other"));
|
||||||
|
|
||||||
if (! $user->admin)
|
if (! $user->admin)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
@ -40,10 +41,6 @@ if ($user->societe_id > 0)
|
|||||||
$socid = $user->societe_id;
|
$socid = $user->societe_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
$langs->load("companies");
|
|
||||||
$langs->load("users");
|
|
||||||
$langs->load("other");
|
|
||||||
|
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = GETPOST("page",'int');
|
$page = GETPOST("page",'int');
|
||||||
|
|||||||
@ -27,8 +27,8 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/geturl.lib.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/lib/geturl.lib.php';
|
||||||
|
|
||||||
$langs->load("admin");
|
// Load translation files required by the page
|
||||||
$langs->load("other");
|
$langs->loadLangs(array("admin","other"));
|
||||||
|
|
||||||
$action=GETPOST('action','alpha');
|
$action=GETPOST('action','alpha');
|
||||||
|
|
||||||
|
|||||||
@ -178,19 +178,19 @@ if ($action == 'builddoc')
|
|||||||
{
|
{
|
||||||
// List of values to scan for a replacement
|
// List of values to scan for a replacement
|
||||||
$substitutionarray = array (
|
$substitutionarray = array (
|
||||||
'%LOGIN%'=>$user->login,
|
'%LOGIN%' => $user->login,
|
||||||
'%COMPANY%'=>$mysoc->name,
|
'%COMPANY%' => $mysoc->name,
|
||||||
'%ADDRESS%'=>$mysoc->address,
|
'%ADDRESS%' => $mysoc->address,
|
||||||
'%ZIP%'=>$mysoc->zip,
|
'%ZIP%' => $mysoc->zip,
|
||||||
'%TOWN%'=>$mysoc->town,
|
'%TOWN%' => $mysoc->town,
|
||||||
'%COUNTRY%'=>$mysoc->country,
|
'%COUNTRY%' => $mysoc->country,
|
||||||
'%COUNTRY_CODE%'=>$mysoc->country_code,
|
'%COUNTRY_CODE%' => $mysoc->country_code,
|
||||||
'%EMAIL%'=>$mysoc->email,
|
'%EMAIL%' => $mysoc->email,
|
||||||
'%YEAR%'=>$year,
|
'%YEAR%' => $year,
|
||||||
'%MONTH%'=>$month,
|
'%MONTH%' => $month,
|
||||||
'%DAY%'=>$day,
|
'%DAY%' => $day,
|
||||||
'%DOL_MAIN_URL_ROOT%'=>DOL_MAIN_URL_ROOT,
|
'%DOL_MAIN_URL_ROOT%' => DOL_MAIN_URL_ROOT,
|
||||||
'%SERVER%'=>"http://".$_SERVER["SERVER_NAME"]."/"
|
'%SERVER%' => "http://".$_SERVER["SERVER_NAME"]."/",
|
||||||
);
|
);
|
||||||
complete_substitutions_array($substitutionarray, $langs);
|
complete_substitutions_array($substitutionarray, $langs);
|
||||||
|
|
||||||
@ -416,7 +416,7 @@ print $langs->trans("BarcodeType").' ';
|
|||||||
print '</div><div class="tagtd" style="overflow: hidden; white-space: nowrap; max-width: 300px;">';
|
print '</div><div class="tagtd" style="overflow: hidden; white-space: nowrap; max-width: 300px;">';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbarcode.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbarcode.class.php';
|
||||||
$formbarcode = new FormBarCode($db);
|
$formbarcode = new FormBarCode($db);
|
||||||
$formbarcode->select_barcode_type($fk_barcode_type, 'fk_barcode_type', 1);
|
print $formbarcode->selectBarcodeType($fk_barcode_type, 'fk_barcode_type', 1);
|
||||||
print '</div></div>';
|
print '</div></div>';
|
||||||
|
|
||||||
// Barcode value
|
// Barcode value
|
||||||
|
|||||||
@ -36,9 +36,8 @@ if ( $_SESSION['uid'] <= 0 )
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$langs->load("companies");
|
// Load translation files required by the page
|
||||||
$langs->load("compta");
|
$langs->loadLangs(array("companies","compta","cashdesk"));
|
||||||
$langs->load("cashdesk");
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -28,8 +28,8 @@
|
|||||||
require_once '../main.inc.php';
|
require_once '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
|
||||||
|
|
||||||
$langs->load("admin");
|
// Load translation files required by the page
|
||||||
$langs->load("cashdesk");
|
$langs->loadLangs(array("admin","cashdesk"));
|
||||||
|
|
||||||
// Test if user logged
|
// Test if user logged
|
||||||
if ( $_SESSION['uid'] > 0 )
|
if ( $_SESSION['uid'] > 0 )
|
||||||
|
|||||||
@ -30,9 +30,8 @@ include '../main.inc.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/cashdesk/include/environnement.php';
|
require_once DOL_DOCUMENT_ROOT.'/cashdesk/include/environnement.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/cashdesk/class/Auth.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/cashdesk/class/Auth.class.php';
|
||||||
|
|
||||||
$langs->load("main");
|
// Load translation files required by the page
|
||||||
$langs->load("admin");
|
$langs->loadLangs(array("main","admin","cashdesk"));
|
||||||
$langs->load("cashdesk");
|
|
||||||
|
|
||||||
$username = GETPOST("txtUsername");
|
$username = GETPOST("txtUsername");
|
||||||
$password = GETPOST("pwdPassword");
|
$password = GETPOST("pwdPassword");
|
||||||
@ -135,8 +134,8 @@ if ( $retour >= 0 )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$langs->load("errors");
|
// Load translation files required by the page
|
||||||
$langs->load("other");
|
$langs->loadLangs(array("other","errors"));
|
||||||
$retour=$langs->trans("ErrorBadLoginPassword");
|
$retour=$langs->trans("ErrorBadLoginPassword");
|
||||||
header('Location: '.DOL_URL_ROOT.'/cashdesk/index.php?err='.urlencode($retour).'&user='.$username.'&socid='.$thirdpartyid.'&warehouseid='.$warehouseid);
|
header('Location: '.DOL_URL_ROOT.'/cashdesk/index.php?err='.urlencode($retour).'&user='.$username.'&socid='.$thirdpartyid.'&warehouseid='.$warehouseid);
|
||||||
exit;
|
exit;
|
||||||
|
|||||||
@ -26,10 +26,8 @@ if (empty($langs) || ! is_object($langs))
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Load translation files required by the page
|
||||||
$langs->load("main");
|
$langs->loadLangs(array("main","bills","cashdesk"));
|
||||||
$langs->load("bills");
|
|
||||||
$langs->load("cashdesk");
|
|
||||||
|
|
||||||
// Object $form must de defined
|
// Object $form must de defined
|
||||||
|
|
||||||
|
|||||||
@ -28,9 +28,8 @@ if (empty($langs) || ! is_object($langs))
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||||
|
|
||||||
$langs->load("main");
|
// Load translation files required by the page
|
||||||
$langs->load("bills");
|
$langs->loadLangs(array("main","bills","cashdesk"));
|
||||||
$langs->load("cashdesk");
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|||||||
@ -63,9 +63,8 @@ if (!empty($_SESSION["CASHDESK_ID_WAREHOUSE"]) && ! empty($conf->stock->enabled)
|
|||||||
$warehouseLink = $warehouse->getNomUrl(1);
|
$warehouseLink = $warehouse->getNomUrl(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Load translation files required by the page
|
||||||
$langs->load("cashdesk");
|
$langs->loadLangs(array("main","cashdesk"));
|
||||||
$langs->load("main");
|
|
||||||
|
|
||||||
print "\n".'<!-- menu.tpl.php -->'."\n";
|
print "\n".'<!-- menu.tpl.php -->'."\n";
|
||||||
print '<div class="menu_bloc">';
|
print '<div class="menu_bloc">';
|
||||||
|
|||||||
@ -27,8 +27,8 @@ if (empty($langs) || ! is_object($langs))
|
|||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||||
|
|
||||||
$langs->load("main");
|
// Load translation files required by the page
|
||||||
$langs->load('cashdesk');
|
$langs->loadLangs(array("main","cashdesk"));
|
||||||
|
|
||||||
top_httphead('text/html');
|
top_httphead('text/html');
|
||||||
|
|
||||||
|
|||||||
@ -23,10 +23,8 @@ if (empty($langs) || ! is_object($langs))
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Load translation files required by the page
|
||||||
$langs->load("main");
|
$langs->loadLangs(array("main","bills","banks"));
|
||||||
$langs->load("bills");
|
|
||||||
$langs->load("banks");
|
|
||||||
|
|
||||||
// Object $form must de defined
|
// Object $form must de defined
|
||||||
|
|
||||||
|
|||||||
@ -24,9 +24,8 @@ if (empty($langs) || ! is_object($langs))
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Load translation files required by the page
|
||||||
$langs->load("main");
|
$langs->loadLangs(array("main","bills"));
|
||||||
$langs->load("bills");
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|||||||
@ -28,9 +28,8 @@ require '../main.inc.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
|
|
||||||
$langs->load("admin");
|
// Load translation files required by the page
|
||||||
$langs->load("other");
|
$langs->loadLangs(array("admin","other","website"));
|
||||||
$langs->load("website");
|
|
||||||
|
|
||||||
if (! $user->admin) accessforbidden();
|
if (! $user->admin) accessforbidden();
|
||||||
|
|
||||||
|
|||||||
@ -45,7 +45,7 @@ if ($user->societe_id > 0)
|
|||||||
|
|
||||||
if ($_POST["action"] == 'setpricelevel')
|
if ($_POST["action"] == 'setpricelevel')
|
||||||
{
|
{
|
||||||
$soc = New Societe($db);
|
$soc = new Societe($db);
|
||||||
$soc->fetch($id);
|
$soc->fetch($id);
|
||||||
$soc->set_price_level($_POST["price_level"],$user);
|
$soc->set_price_level($_POST["price_level"],$user);
|
||||||
|
|
||||||
|
|||||||
@ -284,7 +284,7 @@ if ($action == 'confirm_delete' && $_POST["confirm"] == "yes" && $user->rights->
|
|||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
$formbank = new FormBank($db);
|
$formbank = new FormBank($db);
|
||||||
$formcompany = new FormCompany($db);
|
$formcompany = new FormCompany($db);
|
||||||
if (! empty($conf->accounting->enabled)) $formaccounting = New FormAccounting($db);
|
if (! empty($conf->accounting->enabled)) $formaccounting = new FormAccounting($db);
|
||||||
|
|
||||||
$countrynotdefined=$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')';
|
$countrynotdefined=$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')';
|
||||||
|
|
||||||
|
|||||||
@ -344,7 +344,7 @@ class Account extends CommonObject
|
|||||||
* @param int $fk_bank To search using bank transaction id
|
* @param int $fk_bank To search using bank transaction id
|
||||||
* @param int $url_id To search using link to
|
* @param int $url_id To search using link to
|
||||||
* @param string $type To search using type
|
* @param string $type To search using type
|
||||||
* @return array|-1 Array of links array('url'=>, 'url_id'=>, 'label'=>, 'type'=> 'fk_bank'=> ) or -1 on error
|
* @return array|int Array of links array('url'=>, 'url_id'=>, 'label'=>, 'type'=> 'fk_bank'=> ) or -1 on error
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
function get_url($fk_bank='', $url_id='', $type='')
|
function get_url($fk_bank='', $url_id='', $type='')
|
||||||
|
|||||||
@ -220,7 +220,7 @@ if (empty($reshook))
|
|||||||
llxHeader("",$langs->trans("VariousPayment"));
|
llxHeader("",$langs->trans("VariousPayment"));
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
if (! empty($conf->accounting->enabled)) $formaccounting = New FormAccounting($db);
|
if (! empty($conf->accounting->enabled)) $formaccounting = new FormAccounting($db);
|
||||||
if (! empty($conf->projet->enabled)) $formproject = new FormProjets($db);
|
if (! empty($conf->projet->enabled)) $formproject = new FormProjets($db);
|
||||||
|
|
||||||
if ($id)
|
if ($id)
|
||||||
|
|||||||
@ -1003,8 +1003,8 @@ class FactureRec extends CommonInvoice
|
|||||||
|
|
||||||
$error=0;
|
$error=0;
|
||||||
|
|
||||||
$langs->load("bills");
|
// Load translation files required by the page
|
||||||
$langs->load('main');
|
$langs->loadLangs(array("main","bills"));
|
||||||
|
|
||||||
$nb_create=0;
|
$nb_create=0;
|
||||||
|
|
||||||
|
|||||||
@ -30,15 +30,11 @@ require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.p
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('banks', 'categories'));
|
$langs->loadLangs(array('banks', 'categories','bills','withdrawals'));
|
||||||
|
|
||||||
if (!$user->rights->prelevement->bons->lire)
|
if (!$user->rights->prelevement->bons->lire)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$langs->load("bills");
|
|
||||||
$langs->load("withdrawals");
|
|
||||||
|
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0) accessforbidden();
|
if ($user->societe_id > 0) accessforbidden();
|
||||||
|
|
||||||
|
|||||||
@ -93,8 +93,8 @@ if ($time >= $_SESSION['auto_check_events_not_before'])
|
|||||||
|
|
||||||
while ($obj = $db->fetch_object($resql))
|
while ($obj = $db->fetch_object($resql))
|
||||||
{
|
{
|
||||||
$langs->load("agenda");
|
// Load translation files required by the page
|
||||||
$langs->load("commercial");
|
$langs->loadLangs(array('agenda', 'commercial'));
|
||||||
|
|
||||||
$actionmod->fetch($obj->id);
|
$actionmod->fetch($obj->id);
|
||||||
|
|
||||||
|
|||||||
@ -54,8 +54,9 @@ class box_project extends ModeleBoxes
|
|||||||
function __construct($db,$param='')
|
function __construct($db,$param='')
|
||||||
{
|
{
|
||||||
global $user, $langs;
|
global $user, $langs;
|
||||||
$langs->load("boxes");
|
|
||||||
$langs->load("projects");
|
// Load translation files required by the page
|
||||||
|
$langs->loadLangs(array('boxes', 'projects'));
|
||||||
|
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->boxlabel="Projects";
|
$this->boxlabel="Projects";
|
||||||
|
|||||||
@ -31,21 +31,21 @@ require_once DOL_DOCUMENT_ROOT."/core/lib/date.lib.php";
|
|||||||
*/
|
*/
|
||||||
class box_task extends ModeleBoxes
|
class box_task extends ModeleBoxes
|
||||||
{
|
{
|
||||||
var $boxcode="projet";
|
public $boxcode="projet";
|
||||||
var $boximg="object_projecttask";
|
public $boximg="object_projecttask";
|
||||||
var $boxlabel;
|
public $boxlabel;
|
||||||
//var $depends = array("projet");
|
//public $depends = array("projet");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var DoliDB Database handler.
|
* @var DoliDB Database handler.
|
||||||
*/
|
*/
|
||||||
public $db;
|
public $db;
|
||||||
|
|
||||||
var $param;
|
public $param;
|
||||||
var $enabled = 0; // Disabled because bugged.
|
public $enabled = 0; // Disabled because bugged.
|
||||||
|
|
||||||
var $info_box_head = array();
|
public $info_box_head = array();
|
||||||
var $info_box_contents = array();
|
public $info_box_contents = array();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -57,8 +57,10 @@ class box_task extends ModeleBoxes
|
|||||||
function __construct($db,$param='')
|
function __construct($db,$param='')
|
||||||
{
|
{
|
||||||
global $user, $langs;
|
global $user, $langs;
|
||||||
$langs->load("boxes");
|
|
||||||
$langs->load("projects");
|
// Load translation files required by the page
|
||||||
|
$langs->loadLangs(array('boxes', 'projects'));
|
||||||
|
|
||||||
$this->boxlabel="Tasks";
|
$this->boxlabel="Tasks";
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
|
|
||||||
@ -131,7 +133,7 @@ class box_task extends ModeleBoxes
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Add the sum à the bottom of the boxes
|
// Add the sum at the bottom of the boxes
|
||||||
$this->info_box_contents[$i][] = array('tr' => 'class="liste_total"', 'td' => '', 'text' => $langs->trans("Total")." ".$textHead);
|
$this->info_box_contents[$i][] = array('tr' => 'class="liste_total"', 'td' => '', 'text' => $langs->trans("Total")." ".$textHead);
|
||||||
$this->info_box_contents[$i][] = array('td' => 'align="right" ', 'text' => number_format($totalnb, 0, ',', ' ')." ".$langs->trans("Tasks"));
|
$this->info_box_contents[$i][] = array('td' => 'align="right" ', 'text' => number_format($totalnb, 0, ',', ' ')." ".$langs->trans("Tasks"));
|
||||||
$this->info_box_contents[$i][] = array('td' => 'align="right" ', 'text' => ConvertSecondToTime($totalplannedtot,'all',25200,5));
|
$this->info_box_contents[$i][] = array('td' => 'align="right" ', 'text' => ConvertSecondToTime($totalplannedtot,'all',25200,5));
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file resource/ctyperesource.class.php
|
* \file htdocs/core/class/ctyperesource.class.php
|
||||||
* \ingroup resource
|
* \ingroup resource
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -127,15 +127,15 @@ class Ctyperesource
|
|||||||
if (!$error) {
|
if (!$error) {
|
||||||
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX . $this->table_element);
|
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX . $this->table_element);
|
||||||
|
|
||||||
if (!$notrigger) {
|
// Uncomment this and change MYOBJECT to your own tag if you
|
||||||
// Uncomment this and change MYOBJECT to your own tag if you
|
// want this action to call a trigger.
|
||||||
// want this action to call a trigger.
|
//if (!$notrigger) {
|
||||||
|
|
||||||
//// Call triggers
|
// // Call triggers
|
||||||
//$result=$this->call_trigger('MYOBJECT_CREATE',$user);
|
// $result=$this->call_trigger('MYOBJECT_CREATE',$user);
|
||||||
//if ($result < 0) $error++;
|
// if ($result < 0) $error++;
|
||||||
//// End call triggers
|
// // End call triggers
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
@ -331,15 +331,15 @@ class Ctyperesource
|
|||||||
dol_syslog(__METHOD__ . ' ' . implode(',', $this->errors), LOG_ERR);
|
dol_syslog(__METHOD__ . ' ' . implode(',', $this->errors), LOG_ERR);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$error && !$notrigger) {
|
// Uncomment this and change MYOBJECT to your own tag if you
|
||||||
// Uncomment this and change MYOBJECT to your own tag if you
|
// want this action calls a trigger.
|
||||||
// want this action calls a trigger.
|
//if (!$error && !$notrigger) {
|
||||||
|
|
||||||
//// Call triggers
|
// // Call triggers
|
||||||
//$result=$this->call_trigger('MYOBJECT_MODIFY',$user);
|
// $result=$this->call_trigger('MYOBJECT_MODIFY',$user);
|
||||||
//if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
// if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
||||||
//// End call triggers
|
// // End call triggers
|
||||||
}
|
//}
|
||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
if ($error) {
|
if ($error) {
|
||||||
@ -369,17 +369,15 @@ class Ctyperesource
|
|||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
if (!$error) {
|
// Uncomment this and change MYOBJECT to your own tag if you
|
||||||
if (!$notrigger) {
|
// want this action calls a trigger.
|
||||||
// Uncomment this and change MYOBJECT to your own tag if you
|
//if (!$error && !$notrigger) {
|
||||||
// want this action calls a trigger.
|
|
||||||
|
|
||||||
//// Call triggers
|
// // Call triggers
|
||||||
//$result=$this->call_trigger('MYOBJECT_DELETE',$user);
|
// $result=$this->call_trigger('MYOBJECT_DELETE',$user);
|
||||||
//if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
// if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
||||||
//// End call triggers
|
// // End call triggers
|
||||||
}
|
//}
|
||||||
}
|
|
||||||
|
|
||||||
// If you need to delete child tables to, you can insert them here
|
// If you need to delete child tables to, you can insert them here
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
* Copyright (C) 2015-2018 Frédéric France <frederic.france@free.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -216,6 +216,7 @@ class dolReceiptPrinter extends Escpos
|
|||||||
global $conf;
|
global $conf;
|
||||||
$error = 0;
|
$error = 0;
|
||||||
$line = 0;
|
$line = 0;
|
||||||
|
$obj = array();
|
||||||
$sql = 'SELECT rowid, name, fk_type, fk_profile, parameter';
|
$sql = 'SELECT rowid, name, fk_type, fk_profile, parameter';
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'printer_receipt';
|
$sql.= ' FROM '.MAIN_DB_PREFIX.'printer_receipt';
|
||||||
$sql.= ' WHERE entity = '.$conf->entity;
|
$sql.= ' WHERE entity = '.$conf->entity;
|
||||||
@ -283,6 +284,7 @@ class dolReceiptPrinter extends Escpos
|
|||||||
global $conf;
|
global $conf;
|
||||||
$error = 0;
|
$error = 0;
|
||||||
$line = 0;
|
$line = 0;
|
||||||
|
$obj = array();
|
||||||
$sql = 'SELECT rowid, name, template';
|
$sql = 'SELECT rowid, name, template';
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'printer_receipt_template';
|
$sql.= ' FROM '.MAIN_DB_PREFIX.'printer_receipt_template';
|
||||||
$sql.= ' WHERE entity = '.$conf->entity;
|
$sql.= ' WHERE entity = '.$conf->entity;
|
||||||
|
|||||||
@ -1,21 +1,22 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2007-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
/* Copyright (C) 2007-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2008-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2008-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
* This program is free software; you can redistribute it and/or modify
|
*
|
||||||
* it under the terms of the GNU General Public License as published by
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* the Free Software Foundation; either version 3 of the License, or
|
* it under the terms of the GNU General Public License as published by
|
||||||
* (at your option) any later version.
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
*
|
* (at your option) any later version.
|
||||||
* This program is distributed in the hope that it will be useful,
|
*
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* This program is distributed in the hope that it will be useful,
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* GNU General Public License for more details.
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
*
|
* GNU General Public License for more details.
|
||||||
* You should have received a copy of the GNU General Public License
|
*
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* You should have received a copy of the GNU General Public License
|
||||||
*
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/core/class/html.formbarcode.class.php
|
* \file htdocs/core/class/html.formbarcode.class.php
|
||||||
@ -34,9 +35,9 @@ class FormBarCode
|
|||||||
public $db;
|
public $db;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Error code (or message)
|
* @var string Error code (or message)
|
||||||
*/
|
*/
|
||||||
public $error='';
|
public $error='';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -104,17 +105,33 @@ class FormBarCode
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return form to select type of barcode
|
* Print form to select type of barcode
|
||||||
*
|
*
|
||||||
* @param int $selected Id code pre-selected
|
* @param int $selected Id code pre-selected
|
||||||
* @param string $htmlname Name of HTML select field
|
* @param string $htmlname Name of HTML select field
|
||||||
* @param int $useempty Affiche valeur vide dans liste
|
* @param int $useempty Affiche valeur vide dans liste
|
||||||
* @return void
|
* @return void
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
function select_barcode_type($selected='',$htmlname='barcodetype_id',$useempty=0)
|
function select_barcode_type($selected='', $htmlname='barcodetype_id', $useempty=0)
|
||||||
{
|
{
|
||||||
global $langs,$conf;
|
print $this->selectBarcodeType($selected, $htmlname, $useempty);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return html form to select type of barcode
|
||||||
|
*
|
||||||
|
* @param int $selected Id code pre-selected
|
||||||
|
* @param string $htmlname Name of HTML select field
|
||||||
|
* @param int $useempty Display empty value in select
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function selectBarcodeType($selected='', $htmlname='barcodetype_id', $useempty=0)
|
||||||
|
{
|
||||||
|
global $langs, $conf;
|
||||||
|
|
||||||
|
$out = '';
|
||||||
|
|
||||||
$sql = "SELECT rowid, code, libelle";
|
$sql = "SELECT rowid, code, libelle";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_barcode_type";
|
$sql.= " FROM ".MAIN_DB_PREFIX."c_barcode_type";
|
||||||
@ -123,44 +140,37 @@ class FormBarCode
|
|||||||
$sql.= " ORDER BY code";
|
$sql.= " ORDER BY code";
|
||||||
|
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
if ($result)
|
if ($result) {
|
||||||
{
|
|
||||||
$num = $this->db->num_rows($result);
|
$num = $this->db->num_rows($result);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
if ($useempty && $num > 0)
|
if ($useempty && $num > 0) {
|
||||||
{
|
$out .= '<select class="flat minwidth75imp" name="' . $htmlname . '" id="select_' . $htmlname . '">';
|
||||||
print '<select class="flat minwidth75imp" name="'.$htmlname.'" id="select_'.$htmlname.'">';
|
$out .= '<option value="0"> </option>';
|
||||||
print '<option value="0"> </option>';
|
} else {
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
print '<select disabled class="flat minwidth75imp" name="'.$htmlname.'" id="select_'.$htmlname.'">';
|
$out .= '<select disabled class="flat minwidth75imp" name="' . $htmlname . '" id="select_' . $htmlname . '">';
|
||||||
print '<option value="0" selected>'.$langs->trans('ErrorNoActivatedBarcode').'</option>';
|
$out .= '<option value="0" selected>' . $langs->trans('ErrorNoActivatedBarcode') . '</option>';
|
||||||
}
|
}
|
||||||
|
|
||||||
while ($i < $num)
|
while ($i < $num) {
|
||||||
{
|
|
||||||
$obj = $this->db->fetch_object($result);
|
$obj = $this->db->fetch_object($result);
|
||||||
if ($selected == $obj->rowid)
|
if ($selected == $obj->rowid) {
|
||||||
{
|
$out .= '<option value="' . $obj->rowid . '" selected>';
|
||||||
print '<option value="'.$obj->rowid.'" selected>';
|
} else {
|
||||||
|
$out .= '<option value="' . $obj->rowid . '">';
|
||||||
}
|
}
|
||||||
else
|
$out .= $obj->libelle;
|
||||||
{
|
$out .= '</option>';
|
||||||
print '<option value="'.$obj->rowid.'">';
|
|
||||||
}
|
|
||||||
print $obj->libelle;
|
|
||||||
print '</option>';
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print "</select>";
|
$out .= "</select>";
|
||||||
print ajax_combobox("select_".$htmlname);
|
$out .= ajax_combobox("select_".$htmlname);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
dol_print_error($this->db);
|
dol_print_error($this->db);
|
||||||
}
|
}
|
||||||
|
return $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -170,22 +180,37 @@ class FormBarCode
|
|||||||
* @param int $selected Id condition preselected
|
* @param int $selected Id condition preselected
|
||||||
* @param string $htmlname Nom du formulaire select
|
* @param string $htmlname Nom du formulaire select
|
||||||
* @return void
|
* @return void
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
function form_barcode_type($page, $selected='', $htmlname='barcodetype_id')
|
function form_barcode_type($page, $selected='', $htmlname='barcodetype_id')
|
||||||
{
|
{
|
||||||
global $langs,$conf;
|
print $this->formBarcodeType($page, $selected, $htmlname);
|
||||||
if ($htmlname != "none")
|
}
|
||||||
{
|
|
||||||
print '<form method="post" action="'.$page.'">';
|
/**
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
* Return html form to select type of barcode
|
||||||
print '<input type="hidden" name="action" value="set'.$htmlname.'">';
|
*
|
||||||
print '<table class="nobordernopadding" cellpadding="0" cellspacing="0">';
|
* @param string $page Page
|
||||||
print '<tr><td>';
|
* @param int $selected Id condition preselected
|
||||||
$this->select_barcode_type($selected, $htmlname, 1);
|
* @param string $htmlname Nom du formulaire select
|
||||||
print '</td>';
|
* @return string
|
||||||
print '<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
*/
|
||||||
print '</td></tr></table></form>';
|
function formBarcodeType($page, $selected='', $htmlname='barcodetype_id')
|
||||||
|
{
|
||||||
|
global $langs, $conf;
|
||||||
|
$out = '';
|
||||||
|
if ($htmlname != "none") {
|
||||||
|
$out .= '<form method="post" action="' . $page . '">';
|
||||||
|
$out .= '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
|
||||||
|
$out .= '<input type="hidden" name="action" value="set'.$htmlname.'">';
|
||||||
|
$out .= '<table class="nobordernopadding" cellpadding="0" cellspacing="0">';
|
||||||
|
$out .= '<tr><td>';
|
||||||
|
$out .= $this->selectBarcodeType($selected, $htmlname, 1);
|
||||||
|
$out .= '</td>';
|
||||||
|
$out .= '<td align="left"><input type="submit" class="button" value="' . $langs->trans("Modify") . '">';
|
||||||
|
$out .= '</td></tr></table></form>';
|
||||||
}
|
}
|
||||||
|
return $out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -271,9 +271,8 @@ class FormMail extends Form
|
|||||||
|
|
||||||
if (! is_object($form)) $form=new Form($this->db);
|
if (! is_object($form)) $form=new Form($this->db);
|
||||||
|
|
||||||
$langs->load("other");
|
// Load translation files required by the page
|
||||||
$langs->load("mails");
|
$langs->loadLangs(array('other', 'mails'));
|
||||||
|
|
||||||
|
|
||||||
// Clear temp files. Must be done at beginning, before call of triggers
|
// Clear temp files. Must be done at beginning, before call of triggers
|
||||||
if (GETPOST('mode','alpha') == 'init' || (GETPOST('modelmailselected','alpha') && GETPOST('modelmailselected','alpha') != '-1'))
|
if (GETPOST('mode','alpha') == 'init' || (GETPOST('modelmailselected','alpha') && GETPOST('modelmailselected','alpha') != '-1'))
|
||||||
|
|||||||
@ -126,9 +126,8 @@ class FormTicket
|
|||||||
{
|
{
|
||||||
global $conf, $langs, $user, $hookmanager;
|
global $conf, $langs, $user, $hookmanager;
|
||||||
|
|
||||||
$langs->load("other");
|
// Load translation files required by the page
|
||||||
$langs->load("mails");
|
$langs->loadLangs(array('other', 'mails', 'ticket'));
|
||||||
$langs->load("ticket");
|
|
||||||
|
|
||||||
$form = new Form($this->db);
|
$form = new Form($this->db);
|
||||||
$formcompany = new FormCompany($this->db);
|
$formcompany = new FormCompany($this->db);
|
||||||
|
|||||||
@ -33,8 +33,8 @@ function categories_prepare_head($object,$type)
|
|||||||
{
|
{
|
||||||
global $langs, $conf, $user;
|
global $langs, $conf, $user;
|
||||||
|
|
||||||
$langs->load("categories");
|
// Load translation files required by the page
|
||||||
$langs->load("products");
|
$langs->loadLangs(array('categories', 'products'));
|
||||||
|
|
||||||
$h = 0;
|
$h = 0;
|
||||||
$head = array();
|
$head = array();
|
||||||
|
|||||||
@ -194,9 +194,10 @@ function dol_print_file($langs,$filename,$searchalt=0)
|
|||||||
*/
|
*/
|
||||||
function dol_print_object_info($object, $usetable=0)
|
function dol_print_object_info($object, $usetable=0)
|
||||||
{
|
{
|
||||||
global $langs,$db;
|
global $langs, $db;
|
||||||
$langs->load("other");
|
|
||||||
$langs->load("admin");
|
// Load translation files required by the page
|
||||||
|
$langs->loadLangs(array('other', 'admin'));
|
||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
|
|
||||||
|
|||||||
@ -62,7 +62,6 @@ function payment_prepare_head(Paiement $object)
|
|||||||
*/
|
*/
|
||||||
function payment_supplier_prepare_head(Paiement $object)
|
function payment_supplier_prepare_head(Paiement $object)
|
||||||
{
|
{
|
||||||
|
|
||||||
global $langs, $conf;
|
global $langs, $conf;
|
||||||
|
|
||||||
$h = 0;
|
$h = 0;
|
||||||
@ -127,8 +126,9 @@ function showOnlinePaymentUrl($type,$ref)
|
|||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
$langs->load("payment");
|
// Load translation files required by the page
|
||||||
$langs->load("paybox");
|
$langs->loadLangs(array('payment', 'paybox'));
|
||||||
|
|
||||||
$servicename='Online';
|
$servicename='Online';
|
||||||
|
|
||||||
$out = img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePayment",$servicename).'<br>';
|
$out = img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePayment",$servicename).'<br>';
|
||||||
@ -236,6 +236,24 @@ function getOnlinePaymentUrl($mode, $type, $ref='', $amount='9.99', $freetag='yo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($type == 'donation')
|
||||||
|
{
|
||||||
|
$out=DOL_MAIN_URL_ROOT.'/public/payment/newpayment.php?source=donation&ref='.($mode?'<font color="#666666">':'');
|
||||||
|
if ($mode == 1) $out.='donation_ref';
|
||||||
|
if ($mode == 0) $out.=urlencode($ref);
|
||||||
|
$out.=($mode?'</font>':'');
|
||||||
|
if (! empty($conf->global->PAYMENT_SECURITY_TOKEN))
|
||||||
|
{
|
||||||
|
if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) $out.='&securekey='.$conf->global->PAYMENT_SECURITY_TOKEN;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$out.='&securekey='.($mode?'<font color="#666666">':'');
|
||||||
|
if ($mode == 1) $out.="hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$type."' + donation_ref)";
|
||||||
|
if ($mode == 0) $out.= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN . $type . $ref, 2);
|
||||||
|
$out.=($mode?'</font>':'');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// For multicompany
|
// For multicompany
|
||||||
if (! empty($out) && ! empty($conf->multicompany->enabled)) $out.="&entity=".$conf->entity; // Check the entity because we may have the same reference in several entities
|
if (! empty($out) && ! empty($conf->multicompany->enabled)) $out.="&entity=".$conf->entity; // Check the entity because we may have the same reference in several entities
|
||||||
|
|||||||
@ -190,8 +190,9 @@ function product_prepare_head($object)
|
|||||||
function productlot_prepare_head($object)
|
function productlot_prepare_head($object)
|
||||||
{
|
{
|
||||||
global $db, $langs, $conf, $user;
|
global $db, $langs, $conf, $user;
|
||||||
$langs->load("products");
|
|
||||||
$langs->load("productbatch");
|
// Load translation files required by the page
|
||||||
|
$langs->loadLangs(array("products","productbatch"));
|
||||||
|
|
||||||
$h = 0;
|
$h = 0;
|
||||||
$head = array();
|
$head = array();
|
||||||
|
|||||||
@ -36,8 +36,8 @@ function shipping_prepare_head($object)
|
|||||||
{
|
{
|
||||||
global $db, $langs, $conf, $user;
|
global $db, $langs, $conf, $user;
|
||||||
|
|
||||||
$langs->load("sendings");
|
// Load translation files required by the page
|
||||||
$langs->load("deliveries");
|
$langs->loadLangs(array("sendings","deliveries"));
|
||||||
|
|
||||||
$h = 0;
|
$h = 0;
|
||||||
$head = array();
|
$head = array();
|
||||||
@ -121,8 +121,8 @@ function delivery_prepare_head($object)
|
|||||||
{
|
{
|
||||||
global $langs, $conf, $user;
|
global $langs, $conf, $user;
|
||||||
|
|
||||||
$langs->load("sendings");
|
// Load translation files required by the page
|
||||||
$langs->load("deliveries");
|
$langs->loadLangs(array("sendings","deliveries"));
|
||||||
|
|
||||||
$h = 0;
|
$h = 0;
|
||||||
$head = array();
|
$head = array();
|
||||||
|
|||||||
@ -28,8 +28,9 @@ function showOnlineSignatureUrl($type,$ref)
|
|||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
$langs->load("payment");
|
// Load translation files required by the page
|
||||||
$langs->load("paybox");
|
$langs->loadLangs(array("payment","paybox"));
|
||||||
|
|
||||||
$servicename='Online';
|
$servicename='Online';
|
||||||
|
|
||||||
$out = img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlineSignature",$servicename).'<br>';
|
$out = img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlineSignature",$servicename).'<br>';
|
||||||
|
|||||||
@ -32,8 +32,9 @@
|
|||||||
function supplier_proposal_prepare_head($object)
|
function supplier_proposal_prepare_head($object)
|
||||||
{
|
{
|
||||||
global $db, $langs, $conf, $user;
|
global $db, $langs, $conf, $user;
|
||||||
$langs->load("supplier_proposal");
|
|
||||||
$langs->load("compta");
|
// Load translation files required by the page
|
||||||
|
$langs->loadLangs(array("supplier_proposal","compta"));
|
||||||
|
|
||||||
$h = 0;
|
$h = 0;
|
||||||
$head = array();
|
$head = array();
|
||||||
|
|||||||
@ -567,8 +567,9 @@ function dolSavePageAlias($filealias, $object, $objectpage)
|
|||||||
$aliascontent.= 'else require $dolibarr_main_data_root.\'/website/\'.$website->ref.\'/page'.$objectpage->id.'.tpl.php\';'."\n";
|
$aliascontent.= 'else require $dolibarr_main_data_root.\'/website/\'.$website->ref.\'/page'.$objectpage->id.'.tpl.php\';'."\n";
|
||||||
$aliascontent.= '?>'."\n";
|
$aliascontent.= '?>'."\n";
|
||||||
$result = file_put_contents($filealias, $aliascontent);
|
$result = file_put_contents($filealias, $aliascontent);
|
||||||
if (! empty($conf->global->MAIN_UMASK))
|
if (! empty($conf->global->MAIN_UMASK)) {
|
||||||
@chmod($filealias, octdec($conf->global->MAIN_UMASK));
|
@chmod($filealias, octdec($conf->global->MAIN_UMASK));
|
||||||
|
}
|
||||||
|
|
||||||
return ($result?true:false);
|
return ($result?true:false);
|
||||||
}
|
}
|
||||||
@ -646,7 +647,7 @@ function dolSavePageContent($filetpl, $object, $objectpage)
|
|||||||
* @param string $pathofwebsite Path of website root
|
* @param string $pathofwebsite Path of website root
|
||||||
* @param string $fileindex Full path of file index.php
|
* @param string $fileindex Full path of file index.php
|
||||||
* @param string $filetpl File tpl to index.php page redirect to
|
* @param string $filetpl File tpl to index.php page redirect to
|
||||||
* @param string $fileindex Full path of file wrapper.php
|
* @param string $filewrapper Full path of file wrapper.php
|
||||||
* @return boolean True if OK
|
* @return boolean True if OK
|
||||||
*/
|
*/
|
||||||
function dolSaveIndexPage($pathofwebsite, $fileindex, $filetpl, $filewrapper)
|
function dolSaveIndexPage($pathofwebsite, $fileindex, $filetpl, $filewrapper)
|
||||||
@ -826,5 +827,3 @@ function dolSaveHtaccessFile($filehtaccess, $htaccess)
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -80,8 +80,8 @@ function print_eldy_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$mode
|
|||||||
$showmode=isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal);
|
$showmode=isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal);
|
||||||
if ($showmode)
|
if ($showmode)
|
||||||
{
|
{
|
||||||
$langs->load("companies");
|
// Load translation files required by the page
|
||||||
$langs->load("suppliers");
|
$langs->loadLangs(array("companies","suppliers"));
|
||||||
|
|
||||||
$classname="";
|
$classname="";
|
||||||
if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "companies") { $classname='class="tmenusel"'; $_SESSION['idmenu']=''; }
|
if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "companies") { $classname='class="tmenusel"'; $_SESSION['idmenu']=''; }
|
||||||
@ -174,8 +174,8 @@ function print_eldy_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$mode
|
|||||||
$showmode=isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal);
|
$showmode=isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal);
|
||||||
if ($showmode)
|
if ($showmode)
|
||||||
{
|
{
|
||||||
$langs->load("compta");
|
// Load translation files required by the page
|
||||||
$langs->load("banks");
|
$langs->loadLangs(array("compta","banks"));
|
||||||
|
|
||||||
$classname="";
|
$classname="";
|
||||||
if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "bank") { $classname='class="tmenusel"'; $_SESSION['idmenu']=''; }
|
if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "bank") { $classname='class="tmenusel"'; $_SESSION['idmenu']=''; }
|
||||||
@ -528,8 +528,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
|
|
||||||
if ($usemenuhider || empty($leftmenu) || $leftmenu=="setup")
|
if ($usemenuhider || empty($leftmenu) || $leftmenu=="setup")
|
||||||
{
|
{
|
||||||
$langs->load("admin");
|
// Load translation files required by the page
|
||||||
$langs->load("help");
|
$langs->loadLangs(array("admin","help"));
|
||||||
|
|
||||||
$warnpicto='';
|
$warnpicto='';
|
||||||
if (empty($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_COUNTRY))
|
if (empty($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_COUNTRY))
|
||||||
@ -1176,10 +1176,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
*/
|
*/
|
||||||
if ($mainmenu == 'bank')
|
if ($mainmenu == 'bank')
|
||||||
{
|
{
|
||||||
$langs->load("withdrawals");
|
// Load translation files required by the page
|
||||||
$langs->load("banks");
|
$langs->loadLangs(array("withdrawals","banks","bills","categories"));
|
||||||
$langs->load("bills");
|
|
||||||
$langs->load('categories');
|
|
||||||
|
|
||||||
// Bank-Caisse
|
// Bank-Caisse
|
||||||
if (! empty($conf->banque->enabled))
|
if (! empty($conf->banque->enabled))
|
||||||
@ -1402,8 +1400,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
// Leave/Holiday/Vacation module
|
// Leave/Holiday/Vacation module
|
||||||
if (! empty($conf->holiday->enabled))
|
if (! empty($conf->holiday->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("holiday");
|
// Load translation files required by the page
|
||||||
$langs->load("trips");
|
$langs->loadLangs(array("holiday","trips"));
|
||||||
|
|
||||||
$newmenu->add("/holiday/list.php?leftmenu=hrm", $langs->trans("CPTitreMenu"), 0, $user->rights->holiday->read, '', $mainmenu, 'hrm');
|
$newmenu->add("/holiday/list.php?leftmenu=hrm", $langs->trans("CPTitreMenu"), 0, $user->rights->holiday->read, '', $mainmenu, 'hrm');
|
||||||
$newmenu->add("/holiday/card.php?action=request", $langs->trans("New"), 1,$user->rights->holiday->write);
|
$newmenu->add("/holiday/card.php?action=request", $langs->trans("New"), 1,$user->rights->holiday->write);
|
||||||
@ -1499,8 +1497,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
{
|
{
|
||||||
if (! empty($conf->adherent->enabled))
|
if (! empty($conf->adherent->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("members");
|
// Load translation files required by the page
|
||||||
$langs->load("compta");
|
$langs->loadLangs(array("members","compta"));
|
||||||
|
|
||||||
$newmenu->add("/adherents/index.php?leftmenu=members&mainmenu=members",$langs->trans("Members"),0,$user->rights->adherent->lire, '', $mainmenu, 'members');
|
$newmenu->add("/adherents/index.php?leftmenu=members&mainmenu=members",$langs->trans("Members"),0,$user->rights->adherent->lire, '', $mainmenu, 'members');
|
||||||
$newmenu->add("/adherents/card.php?leftmenu=members&action=create",$langs->trans("NewMember"),1,$user->rights->adherent->creer);
|
$newmenu->add("/adherents/card.php?leftmenu=members&action=create",$langs->trans("NewMember"),1,$user->rights->adherent->creer);
|
||||||
|
|||||||
@ -68,8 +68,9 @@ class CommActionRapport
|
|||||||
function __construct($db, $month, $year)
|
function __construct($db, $month, $year)
|
||||||
{
|
{
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
$langs->load("commercial");
|
|
||||||
$langs->load("projects");
|
// Load translation files required by the page
|
||||||
|
$langs->loadLangs(array("commercial","projects"));
|
||||||
|
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->description = "";
|
$this->description = "";
|
||||||
|
|||||||
@ -47,10 +47,8 @@ class pdf_ban extends ModeleBankAccountDoc
|
|||||||
{
|
{
|
||||||
global $conf,$langs,$mysoc;
|
global $conf,$langs,$mysoc;
|
||||||
|
|
||||||
$langs->load("main");
|
// Load translation files required by the page
|
||||||
$langs->load("bank");
|
$langs->loadLangs(array("main","bank","withdrawals","companies"));
|
||||||
$langs->load("withdrawals");
|
|
||||||
$langs->load("companies");
|
|
||||||
|
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->name = "ban";
|
$this->name = "ban";
|
||||||
|
|||||||
@ -53,8 +53,8 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
|||||||
{
|
{
|
||||||
global $conf,$langs,$mysoc;
|
global $conf,$langs,$mysoc;
|
||||||
|
|
||||||
$langs->load("main");
|
// Load translation files required by the page
|
||||||
$langs->load("companies");
|
$langs->loadLangs(array("main","companies"));
|
||||||
|
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->name = "ODT templates";
|
$this->name = "ODT templates";
|
||||||
@ -98,8 +98,8 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
|||||||
{
|
{
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
$langs->load("companies");
|
// Load translation files required by the page
|
||||||
$langs->load("errors");
|
$langs->loadLangs(array("errors","companies"));
|
||||||
|
|
||||||
$form = new Form($this->db);
|
$form = new Form($this->db);
|
||||||
|
|
||||||
|
|||||||
@ -52,8 +52,8 @@ class doc_generic_contract_odt extends ModelePDFContract
|
|||||||
{
|
{
|
||||||
global $conf,$langs,$mysoc;
|
global $conf,$langs,$mysoc;
|
||||||
|
|
||||||
$langs->load("main");
|
// Load translation files required by the page
|
||||||
$langs->load("companies");
|
$langs->loadLangs(array("main","companies"));
|
||||||
|
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->name = "ODT templates";
|
$this->name = "ODT templates";
|
||||||
|
|||||||
@ -54,8 +54,8 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
|||||||
{
|
{
|
||||||
global $conf,$langs,$mysoc;
|
global $conf,$langs,$mysoc;
|
||||||
|
|
||||||
$langs->load("main");
|
// Load translation files required by the page
|
||||||
$langs->load("companies");
|
$langs->loadLangs(array("main","companies"));
|
||||||
|
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->name = "ODT templates";
|
$this->name = "ODT templates";
|
||||||
@ -99,8 +99,8 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
|||||||
{
|
{
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
$langs->load("companies");
|
// Load translation files required by the page
|
||||||
$langs->load("errors");
|
$langs->loadLangs(array("errors","companies"));
|
||||||
|
|
||||||
$form = new Form($this->db);
|
$form = new Form($this->db);
|
||||||
|
|
||||||
|
|||||||
@ -116,10 +116,9 @@ class mailing_contacts1 extends MailingTargets
|
|||||||
function formFilter()
|
function formFilter()
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
$langs->load("companies");
|
|
||||||
$langs->load("commercial");
|
// Load translation files required by the page
|
||||||
$langs->load("suppliers");
|
$langs->loadLangs(array("commercial","companies","suppliers","categories"));
|
||||||
$langs->load("categories");
|
|
||||||
|
|
||||||
$s='';
|
$s='';
|
||||||
|
|
||||||
|
|||||||
@ -109,9 +109,9 @@ class mailing_fraise extends MailingTargets
|
|||||||
function formFilter()
|
function formFilter()
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
$langs->load("members");
|
|
||||||
$langs->load("categories");
|
// Load translation files required by the page
|
||||||
$langs->load("companies");
|
$langs->loadLangs(array("members","companies","categories"));
|
||||||
|
|
||||||
$form=new Form($this->db);
|
$form=new Form($this->db);
|
||||||
|
|
||||||
|
|||||||
@ -90,7 +90,7 @@ class modAgenda extends DolibarrModules
|
|||||||
$resql = $this->db->query($sqlreadactions);
|
$resql = $this->db->query($sqlreadactions);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
while ($obj = $this->db->fetch_object($sqlreadactions))
|
while ($obj = $this->db->fetch_object($resql))
|
||||||
{
|
{
|
||||||
//if (preg_match('/_CREATE$/',$obj->code) && (! in_array($obj->code, array('COMPANY_CREATE','PRODUCT_CREATE','TASK_CREATE')))) continue; // We don't track such events (*_CREATE) by default, we prefer validation (except thirdparty/product/task creation because there is no validation).
|
//if (preg_match('/_CREATE$/',$obj->code) && (! in_array($obj->code, array('COMPANY_CREATE','PRODUCT_CREATE','TASK_CREATE')))) continue; // We don't track such events (*_CREATE) by default, we prefer validation (except thirdparty/product/task creation because there is no validation).
|
||||||
if (preg_match('/^TASK_/',$obj->code)) continue; // We don't track such events by default.
|
if (preg_match('/^TASK_/',$obj->code)) continue; // We don't track such events by default.
|
||||||
|
|||||||
@ -85,7 +85,7 @@ class modSyslog extends DolibarrModules
|
|||||||
|
|
||||||
// Cronjobs
|
// Cronjobs
|
||||||
$this->cronjobs = array(
|
$this->cronjobs = array(
|
||||||
0=>array('label'=>'CompressSyslogs', 'jobtype'=>'method', 'class'=>'core/class/utils.class.php', 'objectname'=>'Utils', 'method'=>'compressSyslogs', 'parameters'=>'', 'comment'=>'Compress and archive log files', 'frequency'=>1, 'unitfrequency'=> 3600 * 24, 'priority'=>50, 'status'=>0, 'test'=>true),
|
0=>array('label'=>'CompressSyslogs', 'jobtype'=>'method', 'class'=>'core/class/utils.class.php', 'objectname'=>'Utils', 'method'=>'compressSyslogs', 'parameters'=>'', 'comment'=>'Compress and archive log files. Warning, batch must be run with same account than your web server to avoid to get lof files with different owner than required by web server !', 'frequency'=>1, 'unitfrequency'=> 3600 * 24, 'priority'=>50, 'status'=>0, 'test'=>true),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -260,13 +260,13 @@ $domData .= ' data-product_type="'.$line->product_type.'"';
|
|||||||
<?php if ($line->special_code == 3) { ?>
|
<?php if ($line->special_code == 3) { ?>
|
||||||
<td align="right" class="linecoloption nowrap"><?php $coldisplay++; ?><?php echo $langs->trans('Option'); ?></td>
|
<td align="right" class="linecoloption nowrap"><?php $coldisplay++; ?><?php echo $langs->trans('Option'); ?></td>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<td align="right" class="liencolht nowrap"><?php $coldisplay++; ?><?php echo price($line->total_ht); ?></td>
|
<td align="right" class="linecolht nowrap"><?php $coldisplay++; ?><?php echo price($line->total_ht); ?></td>
|
||||||
<?php if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { ?>
|
<?php if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { ?>
|
||||||
<td align="right" class="linecolutotalht_currency nowrap"><?php $coldisplay++; ?><?php echo price($line->multicurrency_total_ht); ?></td>
|
<td align="right" class="linecolutotalht_currency nowrap"><?php $coldisplay++; ?><?php echo price($line->multicurrency_total_ht); ?></td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ($outputalsopricetotalwithtax) { ?>
|
<?php if ($outputalsopricetotalwithtax) { ?>
|
||||||
<td align="right" class="liencolht nowrap"><?php $coldisplay++; ?><?php echo price($line->total_ttc); ?></td>
|
<td align="right" class="linecolht nowrap"><?php $coldisplay++; ?><?php echo price($line->total_ttc); ?></td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<?php
|
<<?php
|
||||||
/* Copyright (C) 2017 Laurent Destailleur <eldy@destailleur.fr>
|
/* Copyright (C) 2017 Laurent Destailleur <eldy@destailleur.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -118,6 +118,28 @@ if (! empty($conf->adherent->enabled))
|
|||||||
}
|
}
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
|
if (! empty($conf->don->enabled))
|
||||||
|
{
|
||||||
|
print img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnDonation",$servicename).':<br>';
|
||||||
|
print '<strong>'.getOnlinePaymentUrl(1,'donation')."</strong><br>\n";
|
||||||
|
if (! empty($conf->global->PAYMENT_SECURITY_TOKEN) && ! empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE))
|
||||||
|
{
|
||||||
|
$langs->load("members");
|
||||||
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||||
|
print $langs->trans("EnterRefToBuildUrl",$langs->transnoentitiesnoconv("Don")).': ';
|
||||||
|
print '<input type="text class="flat" id="generate_donation_ref" name="generate_donation_ref" value="'.GETPOST('generate_donation_ref','alpha').'" size="10">';
|
||||||
|
print '<input type="submit" class="none reposition button" value="'.$langs->trans("GetSecuredUrl").'">';
|
||||||
|
if (GETPOST('generate_donation_ref'))
|
||||||
|
{
|
||||||
|
print '<br> -> <strong>';
|
||||||
|
$url=getOnlinePaymentUrl(0,'donation',GETPOST('generate_donation_ref','alpha'));
|
||||||
|
print $url;
|
||||||
|
print "</strong><br>\n";
|
||||||
|
}
|
||||||
|
print '</form>';
|
||||||
|
}
|
||||||
|
print '<br>';
|
||||||
|
}
|
||||||
|
|
||||||
if (! empty($conf->use_javascript_ajax))
|
if (! empty($conf->use_javascript_ajax))
|
||||||
{
|
{
|
||||||
@ -140,3 +162,4 @@ print info_admin($langs->trans("YouCanAddTagOnUrl"));
|
|||||||
|
|
||||||
print '<!-- END PHP TEMPLATE ONLINEPAYMENTLINKS -->';
|
print '<!-- END PHP TEMPLATE ONLINEPAYMENTLINKS -->';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
* Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
|
* Copyright (C) 2018 Thibault FOUCART <support@ptibogxiv.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -26,13 +27,16 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/modules/dons/modules_don.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/modules/dons/modules_don.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/donation.lib.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/lib/donation.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/don/class/don.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/compta/paiement/class/paiement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formmargin.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
|
||||||
if (! empty($conf->projet->enabled))
|
if (! empty($conf->projet->enabled))
|
||||||
{
|
{
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
||||||
@ -40,9 +44,7 @@ if (! empty($conf->projet->enabled))
|
|||||||
}
|
}
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||||
|
|
||||||
$langs->load("companies");
|
$langs->loadLangs(array("bills","companies","donations")); // File with generic data
|
||||||
$langs->load("donations");
|
|
||||||
$langs->load("bills");
|
|
||||||
|
|
||||||
$id=GETPOST('rowid')?GETPOST('rowid','int'):GETPOST('id','int');
|
$id=GETPOST('rowid')?GETPOST('rowid','int'):GETPOST('id','int');
|
||||||
$action=GETPOST('action','alpha');
|
$action=GETPOST('action','alpha');
|
||||||
@ -326,38 +328,92 @@ if ($action == 'create')
|
|||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
print '<tbody>';
|
print '<tbody>';
|
||||||
|
|
||||||
// Date
|
// Ref
|
||||||
|
print '<tr><td class="titlefieldcreate fieldrequired">' . $langs->trans('Ref') . '</td><td colspan="2">' . $langs->trans('Draft') . '</td></tr>';
|
||||||
|
|
||||||
|
// Company
|
||||||
|
if (! empty($conf->societe->enabled) && ! empty($conf->global->DONATION_USE_THIRDPARTIES))
|
||||||
|
{
|
||||||
|
// Thirdparty
|
||||||
|
print '<td>' . $langs->trans('Customer') . '</td>';
|
||||||
|
if ($soc->id > 0 && ! GETPOST('fac_rec','alpha'))
|
||||||
|
{
|
||||||
|
print '<td colspan="2">';
|
||||||
|
print $soc->getNomUrl(1);
|
||||||
|
print '<input type="hidden" name="socid" value="' . $soc->id . '">';
|
||||||
|
// Outstanding Bill
|
||||||
|
$outstandingBills = $soc->get_OutstandingBill();
|
||||||
|
print ' (' . $langs->trans('CurrentOutstandingBill') . ': ';
|
||||||
|
print price($outstandingBills, '', $langs, 0, 0, -1, $conf->currency);
|
||||||
|
if ($soc->outstanding_limit != '')
|
||||||
|
{
|
||||||
|
if ($outstandingBills > $soc->outstanding_limit) print img_warning($langs->trans("OutstandingBillReached"));
|
||||||
|
print ' / ' . price($soc->outstanding_limit, '', $langs, 0, 0, -1, $conf->currency);
|
||||||
|
}
|
||||||
|
print ')';
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<td colspan="2">';
|
||||||
|
print $form->select_company($soc->id, 'socid', '(s.client = 1 OR s.client = 3) AND status=1', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300');
|
||||||
|
// Option to reload page to retrieve customer informations. Note, this clear other input
|
||||||
|
if (!empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE))
|
||||||
|
{
|
||||||
|
print '<script type="text/javascript">
|
||||||
|
$(document).ready(function() {
|
||||||
|
$("#socid").change(function() {
|
||||||
|
var socid = $(this).val();
|
||||||
|
var fac_rec = $(\'#fac_rec\').val();
|
||||||
|
// reload page
|
||||||
|
window.location.href = "'.$_SERVER["PHP_SELF"].'?action=create&socid="+socid+"&fac_rec="+fac_rec;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>';
|
||||||
|
}
|
||||||
|
print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&client=3&fournisseur=0&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'">'.$langs->trans("AddThirdParty").'</a>';
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
|
print '</tr>' . "\n";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Date
|
||||||
print '<tr><td class="fieldrequired titlefieldcreate">'.$langs->trans("Date").'</td><td>';
|
print '<tr><td class="fieldrequired titlefieldcreate">'.$langs->trans("Date").'</td><td>';
|
||||||
$form->select_date($donation_date?$donation_date:-1,'','','','',"add",1,1);
|
$form->select_date($donation_date?$donation_date:-1,'','','','',"add",1,1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Amount
|
// Amount
|
||||||
print "<tr>".'<td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input type="text" name="amount" value="'.dol_escape_htmltag(GETPOST("amount")).'" size="10"> '.$langs->trans("Currency".$conf->currency).'</td></tr>';
|
print "<tr>".'<td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input type="text" name="amount" value="'.dol_escape_htmltag(GETPOST("amount")).'" size="10"> '.$langs->trans("Currency".$conf->currency).'</td></tr>';
|
||||||
|
|
||||||
|
// Public donation
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans("PublicDonation")."</td><td>";
|
print '<tr><td class="fieldrequired">'.$langs->trans("PublicDonation")."</td><td>";
|
||||||
print $form->selectyesno("public",isset($_POST["public"])?$_POST["public"]:1,1);
|
print $form->selectyesno("public",isset($_POST["public"])?$_POST["public"]:1,1);
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
print "<tr>".'<td>'.$langs->trans("Company").'</td><td><input type="text" name="societe" value="'.dol_escape_htmltag(GETPOST("societe")).'" class="maxwidth200"></td></tr>';
|
if (empty($conf->societe->enabled) || empty($conf->global->DONATION_USE_THIRDPARTIES))
|
||||||
print "<tr>".'<td>'.$langs->trans("Lastname").'</td><td><input type="text" name="lastname" value="'.dol_escape_htmltag(GETPOST("lastname")).'" class="maxwidth200"></td></tr>';
|
{
|
||||||
print "<tr>".'<td>'.$langs->trans("Firstname").'</td><td><input type="text" name="firstname" value="'.dol_escape_htmltag(GETPOST("firstname")).'" class="maxwidth200"></td></tr>';
|
print "<tr>".'<td>'.$langs->trans("Company").'</td><td><input type="text" name="societe" value="'.dol_escape_htmltag(GETPOST("societe")).'" class="maxwidth200"></td></tr>';
|
||||||
print "<tr>".'<td>'.$langs->trans("Address").'</td><td>';
|
print "<tr>".'<td>'.$langs->trans("Lastname").'</td><td><input type="text" name="lastname" value="'.dol_escape_htmltag(GETPOST("lastname")).'" class="maxwidth200"></td></tr>';
|
||||||
print '<textarea name="address" wrap="soft" class="quatrevingtpercent" rows="3">'.dol_escape_htmltag(GETPOST("address")).'</textarea></td></tr>';
|
print "<tr>".'<td>'.$langs->trans("Firstname").'</td><td><input type="text" name="firstname" value="'.dol_escape_htmltag(GETPOST("firstname")).'" class="maxwidth200"></td></tr>';
|
||||||
|
print "<tr>".'<td>'.$langs->trans("Address").'</td><td>';
|
||||||
|
print '<textarea name="address" wrap="soft" class="quatrevingtpercent" rows="3">'.dol_escape_htmltag(GETPOST("address")).'</textarea></td></tr>';
|
||||||
|
|
||||||
// Zip / Town
|
// Zip / Town
|
||||||
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td>';
|
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td>';
|
||||||
print $formcompany->select_ziptown((isset($_POST["zipcode"])?$_POST["zipcode"]:$object->zip),'zipcode',array('town','selectcountry_id','state_id'),6);
|
print $formcompany->select_ziptown((isset($_POST["zipcode"])?$_POST["zipcode"]:$object->zip),'zipcode',array('town','selectcountry_id','state_id'),6);
|
||||||
print ' ';
|
print ' ';
|
||||||
print $formcompany->select_ziptown((isset($_POST["town"])?$_POST["town"]:$object->town),'town',array('zipcode','selectcountry_id','state_id'));
|
print $formcompany->select_ziptown((isset($_POST["town"])?$_POST["town"]:$object->town),'town',array('zipcode','selectcountry_id','state_id'));
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Country
|
// Country
|
||||||
print '<tr><td><label for="selectcountry_id">'.$langs->trans('Country').'</label></td><td class="maxwidthonsmartphone">';
|
print '<tr><td><label for="selectcountry_id">'.$langs->trans('Country').'</label></td><td class="maxwidthonsmartphone">';
|
||||||
print $form->select_country(GETPOST('country_id')!=''?GETPOST('country_id'):$object->country_id);
|
print $form->select_country(GETPOST('country_id')!=''?GETPOST('country_id'):$object->country_id);
|
||||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print "<tr>".'<td>'.$langs->trans("EMail").'</td><td><input type="text" name="email" value="'.dol_escape_htmltag(GETPOST("email")).'" class="maxwidth200"></td></tr>';
|
print "<tr>".'<td>'.$langs->trans("EMail").'</td><td><input type="text" name="email" value="'.dol_escape_htmltag(GETPOST("email")).'" class="maxwidth200"></td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Payment mode
|
// Payment mode
|
||||||
print "<tr><td>".$langs->trans("PaymentMode")."</td><td>\n";
|
print "<tr><td>".$langs->trans("PaymentMode")."</td><td>\n";
|
||||||
@ -791,6 +847,16 @@ if (! empty($id) && $action != 'edit')
|
|||||||
$linktoelem = $form->showLinkToObjectBlock($object, null, array('don'));
|
$linktoelem = $form->showLinkToObjectBlock($object, null, array('don'));
|
||||||
$somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
|
$somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
|
||||||
|
|
||||||
|
// Show online payment link
|
||||||
|
$useonlinepayment = (! empty($conf->paypal->enabled) || ! empty($conf->stripe->enabled) || ! empty($conf->paybox->enabled));
|
||||||
|
|
||||||
|
if ($useonlinepayment) //$object->statut != Facture::STATUS_DRAFT &&
|
||||||
|
{
|
||||||
|
print '<br><!-- Link to pay -->'."\n";
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
|
||||||
|
print showOnlinePaymentUrl('donation', $object->ref).'<br>';
|
||||||
|
}
|
||||||
|
|
||||||
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
|
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
|
||||||
|
|
||||||
print '</div></div></div>';
|
print '</div></div></div>';
|
||||||
|
|||||||
@ -73,12 +73,6 @@ class Don extends CommonObject
|
|||||||
public $labelstatut;
|
public $labelstatut;
|
||||||
public $labelstatutshort;
|
public $labelstatutshort;
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
* @see note_private, note_public
|
|
||||||
*/
|
|
||||||
public $commentaire;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
@ -87,9 +81,7 @@ class Don extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function __construct($db)
|
function __construct($db)
|
||||||
{
|
{
|
||||||
global $langs;
|
$this->db = $db;
|
||||||
|
|
||||||
$this->db = $db;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -383,8 +375,8 @@ class Don extends CommonObject
|
|||||||
$sql.= ", '".$this->db->escape($this->address)."'";
|
$sql.= ", '".$this->db->escape($this->address)."'";
|
||||||
$sql.= ", '".$this->db->escape($this->zip)."'";
|
$sql.= ", '".$this->db->escape($this->zip)."'";
|
||||||
$sql.= ", '".$this->db->escape($this->town)."'";
|
$sql.= ", '".$this->db->escape($this->town)."'";
|
||||||
$sql.= ", ".$this->country_id;
|
$sql.= ", ".($this->country_id > 0 ? $this->country_id : '0');
|
||||||
$sql.= ", ".$this->public;
|
$sql.= ", ".((int) $this->public);
|
||||||
$sql.= ", ".($this->fk_project > 0?$this->fk_project:"null");
|
$sql.= ", ".($this->fk_project > 0?$this->fk_project:"null");
|
||||||
$sql.= ", ".(!empty($this->note_private)?("'".$this->db->escape($this->note_private)."'"):"NULL");
|
$sql.= ", ".(!empty($this->note_private)?("'".$this->db->escape($this->note_private)."'"):"NULL");
|
||||||
$sql.= ", ".(!empty($this->note_public)?("'".$this->db->escape($this->note_public)."'"):"NULL");
|
$sql.= ", ".(!empty($this->note_public)?("'".$this->db->escape($this->note_public)."'"):"NULL");
|
||||||
@ -396,7 +388,6 @@ class Don extends CommonObject
|
|||||||
$sql.= ", '".$this->db->escape($this->phone_mobile)."'";
|
$sql.= ", '".$this->db->escape($this->phone_mobile)."'";
|
||||||
$sql.= ")";
|
$sql.= ")";
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::create", LOG_DEBUG);
|
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
@ -432,8 +423,8 @@ class Don extends CommonObject
|
|||||||
|
|
||||||
if (!$error && !empty($conf->global->MAIN_DISABLEDRAFTSTATUS))
|
if (!$error && !empty($conf->global->MAIN_DISABLEDRAFTSTATUS))
|
||||||
{
|
{
|
||||||
$res = $this->setValid($user);
|
//$res = $this->setValid($user);
|
||||||
if ($res < 0) $error++;
|
//if ($res < 0) $error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$error)
|
if (!$error)
|
||||||
@ -687,7 +678,6 @@ class Don extends CommonObject
|
|||||||
$this->note_private = $obj->note_private;
|
$this->note_private = $obj->note_private;
|
||||||
$this->note_public = $obj->note_public;
|
$this->note_public = $obj->note_public;
|
||||||
$this->modelpdf = $obj->model_pdf;
|
$this->modelpdf = $obj->model_pdf;
|
||||||
$this->commentaire = $obj->note; // deprecated
|
|
||||||
|
|
||||||
// Retreive all extrafield
|
// Retreive all extrafield
|
||||||
// fetch optionals attributes and labels
|
// fetch optionals attributes and labels
|
||||||
|
|||||||
@ -466,6 +466,7 @@ new_pmp double DEFAULT 0
|
|||||||
)ENGINE=InnoDB;
|
)ENGINE=InnoDB;
|
||||||
|
|
||||||
ALTER TABLE llx_inventory ADD COLUMN datec datetime DEFAULT NULL;
|
ALTER TABLE llx_inventory ADD COLUMN datec datetime DEFAULT NULL;
|
||||||
|
ALTER TABLE llx_inventory ADD COLUMN tms timestamp;
|
||||||
|
|
||||||
ALTER TABLE llx_inventory ADD INDEX idx_inventory_tms (tms);
|
ALTER TABLE llx_inventory ADD INDEX idx_inventory_tms (tms);
|
||||||
ALTER TABLE llx_inventory ADD INDEX idx_inventory_datec (datec);
|
ALTER TABLE llx_inventory ADD INDEX idx_inventory_datec (datec);
|
||||||
|
|||||||
@ -32,3 +32,4 @@ PaypalLiveEnabled=PayPal live enabled (otherwise test/sandbox mode)
|
|||||||
PaypalImportPayment=Import PayPal payments
|
PaypalImportPayment=Import PayPal payments
|
||||||
PostActionAfterPayment=Post actions after payments
|
PostActionAfterPayment=Post actions after payments
|
||||||
ARollbackWasPerformedOnPostActions=A rollback was performed on all Post actions. You must complete post actions manually if they are necessary.
|
ARollbackWasPerformedOnPostActions=A rollback was performed on all Post actions. You must complete post actions manually if they are necessary.
|
||||||
|
ValidationOfPaymentFailed=Validation of payment has failed
|
||||||
@ -61,3 +61,4 @@ ConfirmDeleteCard=Are you sure you want to delete this Credit or Debit card?
|
|||||||
CreateCustomerOnStripe=Create customer on Stripe
|
CreateCustomerOnStripe=Create customer on Stripe
|
||||||
CreateCardOnStripe=Create card on Stripe
|
CreateCardOnStripe=Create card on Stripe
|
||||||
ShowInStripe=Show in Stripe
|
ShowInStripe=Show in Stripe
|
||||||
|
StripeUserAccountForActions=User account to use for some emails notification of Stripe events (Stripe payouts)
|
||||||
|
|||||||
@ -116,7 +116,7 @@ SendingEmailOnCancelation=Envoie d'email à l'annulation
|
|||||||
# Topic of email templates
|
# Topic of email templates
|
||||||
YourMembershipRequestWasReceived=Votre demande d'adhésion a été reçue.
|
YourMembershipRequestWasReceived=Votre demande d'adhésion a été reçue.
|
||||||
YourMembershipWasValidated=Votre adhésion a été enregistrée
|
YourMembershipWasValidated=Votre adhésion a été enregistrée
|
||||||
YourSubscriptionWasRecorded=Votre nouvel adhésion a été enregistrée
|
YourSubscriptionWasRecorded=Votre nouvelle adhésion a été enregistrée
|
||||||
SubscriptionReminderEmail=Rappel de cotisation
|
SubscriptionReminderEmail=Rappel de cotisation
|
||||||
YourMembershipWasCanceled=Votre adhésion a été annulée
|
YourMembershipWasCanceled=Votre adhésion a été annulée
|
||||||
CardContent=Contenu de votre fiche adhérent
|
CardContent=Contenu de votre fiche adhérent
|
||||||
|
|||||||
@ -238,7 +238,7 @@ if (empty($reshook))
|
|||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
$formproject = new FormProjets($db);
|
$formproject = new FormProjets($db);
|
||||||
if (! empty($conf->accounting->enabled)) $formaccounting = New FormAccounting($db);
|
if (! empty($conf->accounting->enabled)) $formaccounting = new FormAccounting($db);
|
||||||
|
|
||||||
$title = $langs->trans("Loan") . ' - ' . $langs->trans("Card");
|
$title = $langs->trans("Loan") . ' - ' . $langs->trans("Card");
|
||||||
$help_url = 'EN:Module_Loan|FR:Module_Emprunt';
|
$help_url = 'EN:Module_Loan|FR:Module_Emprunt';
|
||||||
|
|||||||
@ -429,7 +429,7 @@ class LoanSchedule extends CommonObject
|
|||||||
{
|
{
|
||||||
while($obj = $this->db->fetch_object($resql))
|
while($obj = $this->db->fetch_object($resql))
|
||||||
{
|
{
|
||||||
$line = New LoanSchedule($this->db);
|
$line = new LoanSchedule($this->db);
|
||||||
$line->id = $obj->rowid;
|
$line->id = $obj->rowid;
|
||||||
$line->ref = $obj->rowid;
|
$line->ref = $obj->rowid;
|
||||||
|
|
||||||
|
|||||||
@ -1185,7 +1185,7 @@ elseif (! empty($module))
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print_fiche_titre($langs->trans("DescriptorFile"));
|
print load_fiche_titre($langs->trans("DescriptorFile"));
|
||||||
|
|
||||||
if (! empty($moduleobj))
|
if (! empty($moduleobj))
|
||||||
{
|
{
|
||||||
@ -1249,7 +1249,7 @@ elseif (! empty($module))
|
|||||||
print '<br><br>';
|
print '<br><br>';
|
||||||
|
|
||||||
// Readme file
|
// Readme file
|
||||||
print_fiche_titre($langs->trans("ReadmeFile"));
|
print load_fiche_titre($langs->trans("ReadmeFile"));
|
||||||
|
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
print '<div class="fichecenter">';
|
print '<div class="fichecenter">';
|
||||||
@ -1259,7 +1259,7 @@ elseif (! empty($module))
|
|||||||
print '<br><br>';
|
print '<br><br>';
|
||||||
|
|
||||||
// ChangeLog
|
// ChangeLog
|
||||||
print_fiche_titre($langs->trans("ChangeLog"));
|
print load_fiche_titre($langs->trans("ChangeLog"));
|
||||||
|
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
print '<div class="fichecenter">';
|
print '<div class="fichecenter">';
|
||||||
|
|||||||
@ -409,27 +409,27 @@ class MyObject extends CommonObject
|
|||||||
elseif ($mode == 2)
|
elseif ($mode == 2)
|
||||||
{
|
{
|
||||||
if ($status == 1) return img_picto($this->labelstatus[$status],'statut4').' '.$this->labelstatus[$status];
|
if ($status == 1) return img_picto($this->labelstatus[$status],'statut4').' '.$this->labelstatus[$status];
|
||||||
if ($status == 0) return img_picto($this->labelstatus[$status],'statut5').' '.$this->labelstatus[$status];
|
elseif ($status == 0) return img_picto($this->labelstatus[$status],'statut5').' '.$this->labelstatus[$status];
|
||||||
}
|
}
|
||||||
elseif ($mode == 3)
|
elseif ($mode == 3)
|
||||||
{
|
{
|
||||||
if ($status == 1) return img_picto($this->labelstatus[$status],'statut4');
|
if ($status == 1) return img_picto($this->labelstatus[$status],'statut4');
|
||||||
if ($status == 0) return img_picto($this->labelstatus[$status],'statut5');
|
elseif ($status == 0) return img_picto($this->labelstatus[$status],'statut5');
|
||||||
}
|
}
|
||||||
elseif ($mode == 4)
|
elseif ($mode == 4)
|
||||||
{
|
{
|
||||||
if ($status == 1) return img_picto($this->labelstatus[$status],'statut4').' '.$this->labelstatus[$status];
|
if ($status == 1) return img_picto($this->labelstatus[$status],'statut4').' '.$this->labelstatus[$status];
|
||||||
if ($status == 0) return img_picto($this->labelstatus[$status],'statut5').' '.$this->labelstatus[$status];
|
elseif ($status == 0) return img_picto($this->labelstatus[$status],'statut5').' '.$this->labelstatus[$status];
|
||||||
}
|
}
|
||||||
elseif ($mode == 5)
|
elseif ($mode == 5)
|
||||||
{
|
{
|
||||||
if ($status == 1) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status],'statut4');
|
if ($status == 1) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status],'statut4');
|
||||||
if ($status == 0) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status],'statut5');
|
elseif ($status == 0) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status],'statut5');
|
||||||
}
|
}
|
||||||
elseif ($mode == 6)
|
elseif ($mode == 6)
|
||||||
{
|
{
|
||||||
if ($status == 1) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status],'statut4');
|
if ($status == 1) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status],'statut4');
|
||||||
if ($status == 0) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status],'statut5');
|
elseif ($status == 0) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status],'statut5');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -977,7 +977,7 @@ else
|
|||||||
}
|
}
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbarcode.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbarcode.class.php';
|
||||||
$formbarcode = new FormBarCode($db);
|
$formbarcode = new FormBarCode($db);
|
||||||
print $formbarcode->select_barcode_type($fk_barcode_type, 'fk_barcode_type', 1);
|
print $formbarcode->selectBarcodeType($fk_barcode_type, 'fk_barcode_type', 1);
|
||||||
print '</td><td>'.$langs->trans("BarcodeValue").'</td><td>';
|
print '</td><td>'.$langs->trans("BarcodeValue").'</td><td>';
|
||||||
$tmpcode=isset($_POST['barcode'])?GETPOST('barcode'):$object->barcode;
|
$tmpcode=isset($_POST['barcode'])?GETPOST('barcode'):$object->barcode;
|
||||||
if (empty($tmpcode) && ! empty($modBarCodeProduct->code_auto)) $tmpcode=$modBarCodeProduct->getNextValue($object,$type);
|
if (empty($tmpcode) && ! empty($modBarCodeProduct->code_auto)) $tmpcode=$modBarCodeProduct->getNextValue($object,$type);
|
||||||
@ -1343,7 +1343,7 @@ else
|
|||||||
}
|
}
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbarcode.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbarcode.class.php';
|
||||||
$formbarcode = new FormBarCode($db);
|
$formbarcode = new FormBarCode($db);
|
||||||
print $formbarcode->select_barcode_type($fk_barcode_type, 'fk_barcode_type', 1);
|
print $formbarcode->selectBarcodeType($fk_barcode_type, 'fk_barcode_type', 1);
|
||||||
print '</td><td>'.$langs->trans("BarcodeValue").'</td><td>';
|
print '</td><td>'.$langs->trans("BarcodeValue").'</td><td>';
|
||||||
$tmpcode=isset($_POST['barcode'])?GETPOST('barcode'):$object->barcode;
|
$tmpcode=isset($_POST['barcode'])?GETPOST('barcode'):$object->barcode;
|
||||||
if (empty($tmpcode) && ! empty($modBarCodeProduct->code_auto)) $tmpcode=$modBarCodeProduct->getNextValue($object,$type);
|
if (empty($tmpcode) && ! empty($modBarCodeProduct->code_auto)) $tmpcode=$modBarCodeProduct->getNextValue($object,$type);
|
||||||
@ -1639,7 +1639,7 @@ else
|
|||||||
}
|
}
|
||||||
if ($action == 'editbarcodetype')
|
if ($action == 'editbarcodetype')
|
||||||
{
|
{
|
||||||
$formbarcode->form_barcode_type($_SERVER['PHP_SELF'].'?id='.$object->id,$object->barcode_type,'fk_barcode_type');
|
print $formbarcode->formBarcodeType($_SERVER['PHP_SELF'].'?id='.$object->id, $object->barcode_type, 'fk_barcode_type');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -801,6 +801,11 @@ if ($ispaymentok)
|
|||||||
$content.="<br>\n";
|
$content.="<br>\n";
|
||||||
$content.="tag=".$fulltag."<br>\ntoken=".$onlinetoken."<br>\npaymentType=".$paymentType."<br>\ncurrencycodeType=".$currencyCodeType."<br>\npayerId=".$payerID."<br>\nipaddress=".$ipaddress."<br>\nFinalPaymentAmt=".$FinalPaymentAmt."<br>\n";
|
$content.="tag=".$fulltag."<br>\ntoken=".$onlinetoken."<br>\npaymentType=".$paymentType."<br>\ncurrencycodeType=".$currencyCodeType."<br>\npayerId=".$payerID."<br>\nipaddress=".$ipaddress."<br>\nFinalPaymentAmt=".$FinalPaymentAmt."<br>\n";
|
||||||
|
|
||||||
|
if (! empty($ErrorCode)) $content.="ErrorCode = ".$ErrorCode."<br>\n";
|
||||||
|
if (! empty($ErrorShortMsg)) $content.="ErrorShortMsg = ".$ErrorShortMsg."<br>\n";
|
||||||
|
if (! empty($ErrorLongMsg)) $content.="ErrorLongMsg = ".$ErrorLongMsg."<br>\n";
|
||||||
|
if (! empty($ErrorSeverityCode)) $content.="ErrorSeverityCode = ".$ErrorSeverityCode."<br>\n";
|
||||||
|
|
||||||
$ishtml=dol_textishtml($content); // May contain urls
|
$ishtml=dol_textishtml($content); // May contain urls
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
|
||||||
|
|||||||
@ -43,14 +43,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
|
|||||||
// Security check
|
// Security check
|
||||||
if (empty($conf->paypal->enabled)) accessforbidden('',0,0,1);
|
if (empty($conf->paypal->enabled)) accessforbidden('',0,0,1);
|
||||||
|
|
||||||
$langs->load("main");
|
$langs->loadLangs(array("main","other","dict","bills","companies","paybox","paypal","stripe"));
|
||||||
$langs->load("other");
|
|
||||||
$langs->load("dict");
|
|
||||||
$langs->load("bills");
|
|
||||||
$langs->load("companies");
|
|
||||||
$langs->load("paybox");
|
|
||||||
$langs->load("paypal");
|
|
||||||
$langs->load("stripe");
|
|
||||||
|
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
$PAYPAL_API_USER="";
|
$PAYPAL_API_USER="";
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2018 Thibault FOUCART <support@ptibogxiv.net>
|
/* Copyright (C) 2018 Thibault FOUCART <support@ptibogxiv.net>
|
||||||
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -34,6 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT .'/core/class/CMailFile.class.php';
|
||||||
|
|
||||||
// You can find your endpoint's secret in your webhook settings
|
// You can find your endpoint's secret in your webhook settings
|
||||||
if (isset($_GET['connect'])){
|
if (isset($_GET['connect'])){
|
||||||
@ -86,9 +88,12 @@ catch(\UnexpectedValueException $e) {
|
|||||||
// Do something with $event
|
// Do something with $event
|
||||||
|
|
||||||
http_response_code(200); // PHP 5.4 or greater
|
http_response_code(200); // PHP 5.4 or greater
|
||||||
|
|
||||||
$langs->load("main");
|
$langs->load("main");
|
||||||
|
|
||||||
|
// TODO Do we really need a user in setup just to have an name to fill an email topic when it is a technical system notification email
|
||||||
$user = new User($db);
|
$user = new User($db);
|
||||||
$user->fetch(5);
|
$user->fetch($conf->global->STRIPE_USER_ACCOUNT_FOR_ACTIONS);
|
||||||
$user->getrights();
|
$user->getrights();
|
||||||
|
|
||||||
if (! empty($conf->multicompany->enabled) && ! empty($conf->stripeconnect->enabled) && is_object($mc)) {
|
if (! empty($conf->multicompany->enabled) && ! empty($conf->stripeconnect->enabled) && is_object($mc)) {
|
||||||
@ -126,12 +131,37 @@ if ($event->type == 'payout.created') {
|
|||||||
|
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
// TODO Use CMail and translation
|
$subject = '[NOTIFICATION] Virement programmée';
|
||||||
$body = "Un virement de ".price2num($event->data->object->amount/100)." ".$event->data->object->currency." est attendu sur votre compte le ".date('d-m-Y H:i:s',$event->data->object->arrival_date);
|
if (!empty($user->email)) {
|
||||||
$subject = '[NOTIFICATION] Virement programmée';
|
$sendto = dolGetFirstLastname($user->firstname, $user->lastname) . " <".$user->email.">";
|
||||||
$headers = 'From: "'.$conf->global->MAIN_INFO_SOCIETE_MAIL.'" <'.$conf->global->MAIN_INFO_SOCIETE_MAIL.'>'; // TODO convert in dolibarr standard
|
} else {
|
||||||
mail(''.$conf->global->MAIN_INFO_SOCIETE_MAIL.'', $subject, $body, $headers);
|
$sendto = $conf->global->MAIN_INFO_SOCIETE_MAIL.'" <'.$conf->global->MAIN_INFO_SOCIETE_MAIL.'>';
|
||||||
return 1;
|
}
|
||||||
|
$replyto = $sendto;
|
||||||
|
$sendtocc = '';
|
||||||
|
if (!empty($conf->global->ONLINE_PAYMENT_SENDEMAIL)) {
|
||||||
|
$sendtocc = $conf->global->ONLINE_PAYMENT_SENDEMAIL.'" <'.$conf->global->ONLINE_PAYMENT_SENDEMAIL.'>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$message = "Un virement de ".price2num($event->data->object->amount/100)." ".$event->data->object->currency." est attendu sur votre compte le ".date('d-m-Y H:i:s',$event->data->object->arrival_date);
|
||||||
|
|
||||||
|
$mailfile = new CMailFile(
|
||||||
|
$subject,
|
||||||
|
$sendto,
|
||||||
|
$replyto,
|
||||||
|
$message,
|
||||||
|
array(),
|
||||||
|
array(),
|
||||||
|
array(),
|
||||||
|
$sendtocc,
|
||||||
|
'',
|
||||||
|
0,
|
||||||
|
-1
|
||||||
|
);
|
||||||
|
|
||||||
|
$ret = $mailfile->sendfile())
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1962,7 +1962,7 @@ else
|
|||||||
// Capital
|
// Capital
|
||||||
print '<tr><td>'.fieldLabel('Capital','capital').'</td>';
|
print '<tr><td>'.fieldLabel('Capital','capital').'</td>';
|
||||||
print '<td colspan="3"><input type="text" name="capital" id="capital" size="10" value="';
|
print '<td colspan="3"><input type="text" name="capital" id="capital" size="10" value="';
|
||||||
print dol_escape_htmltag(price($object->capital));
|
print $object->capital != '' ? dol_escape_htmltag(price($object->capital)) : '';
|
||||||
print '"> <font class="hideonsmartphone">'.$langs->trans("Currency".$conf->currency).'</font></td></tr>';
|
print '"> <font class="hideonsmartphone">'.$langs->trans("Currency".$conf->currency).'</font></td></tr>';
|
||||||
|
|
||||||
// Assign a Name
|
// Assign a Name
|
||||||
|
|||||||
@ -264,7 +264,7 @@ print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
|||||||
* Last third parties modified
|
* Last third parties modified
|
||||||
*/
|
*/
|
||||||
$max=15;
|
$max=15;
|
||||||
$sql = "SELECT s.rowid, s.nom as name, s.client, s.fournisseur";
|
$sql = "SELECT s.rowid, s.nom as name, s.email, s.client, s.fournisseur";
|
||||||
$sql.= ", s.code_client";
|
$sql.= ", s.code_client";
|
||||||
$sql.= ", s.code_fournisseur";
|
$sql.= ", s.code_fournisseur";
|
||||||
$sql.= ", s.logo";
|
$sql.= ", s.logo";
|
||||||
@ -313,6 +313,7 @@ if ($result)
|
|||||||
$thirdparty_static->code_client = $objp->code_client;
|
$thirdparty_static->code_client = $objp->code_client;
|
||||||
$thirdparty_static->code_fournisseur = $objp->code_fournisseur;
|
$thirdparty_static->code_fournisseur = $objp->code_fournisseur;
|
||||||
$thirdparty_static->canvas=$objp->canvas;
|
$thirdparty_static->canvas=$objp->canvas;
|
||||||
|
$thirdparty_static->email = $objp->email;
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
// Name
|
// Name
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2017 Olivier Geffroy <jeff@jeffinfo.com>
|
* Copyright (C) 2017 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2017 Saasprov <saasprov@gmail.com>
|
* Copyright (C) 2017 Saasprov <saasprov@gmail.com>
|
||||||
* Copyright (C) 2018 ptibogxiv <support@ptibogxiv.net>
|
* Copyright (C) 2018 ptibogxiv <support@ptibogxiv.net>
|
||||||
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -70,10 +71,14 @@ if ($action == 'setvalue' && $user->admin)
|
|||||||
$result = dolibarr_set_const($db, "STRIPE_BANK_ACCOUNT_FOR_PAYMENTS", GETPOST('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS', 'int'), 'chaine', 0, '', $conf->entity);
|
$result = dolibarr_set_const($db, "STRIPE_BANK_ACCOUNT_FOR_PAYMENTS", GETPOST('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS', 'int'), 'chaine', 0, '', $conf->entity);
|
||||||
if (! $result > 0)
|
if (! $result > 0)
|
||||||
$error ++;
|
$error ++;
|
||||||
$result = dolibarr_set_const($db, "STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS", GETPOST('STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS', 'int'), 'chaine', 0, '', $conf->entity);
|
$result = dolibarr_set_const($db, "STRIPE_USER_ACCOUNT_FOR_ACTIONS", GETPOST('STRIPE_USER_ACCOUNT_FOR_ACTIONS', 'int'), 'chaine', 0, '', $conf->entity);
|
||||||
|
if (! $result > 0) {
|
||||||
|
$error ++;
|
||||||
|
}
|
||||||
|
$result = dolibarr_set_const($db, "STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS", GETPOST('STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS', 'int'), 'chaine', 0, '', $conf->entity);
|
||||||
if (! $result > 0)
|
if (! $result > 0)
|
||||||
$error ++;
|
$error ++;
|
||||||
$result = dolibarr_set_const($db, "STRIPE_MINIMAL_3DSECURE", GETPOST('STRIPE_MINIMAL_3DSECURE', 'int'), 'chaine', 0, '', $conf->entity);
|
$result = dolibarr_set_const($db, "STRIPE_MINIMAL_3DSECURE", GETPOST('STRIPE_MINIMAL_3DSECURE', 'int'), 'chaine', 0, '', $conf->entity);
|
||||||
if (! $result > 0)
|
if (! $result > 0)
|
||||||
$error ++;
|
$error ++;
|
||||||
$result = dolibarr_set_const($db, "ONLINE_PAYMENT_CSS_URL", GETPOST('ONLINE_PAYMENT_CSS_URL', 'alpha'), 'chaine', 0, '', $conf->entity);
|
$result = dolibarr_set_const($db, "ONLINE_PAYMENT_CSS_URL", GETPOST('ONLINE_PAYMENT_CSS_URL', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||||
@ -116,10 +121,8 @@ if ($action == 'setvalue' && $user->admin)
|
|||||||
if ($action=="setlive")
|
if ($action=="setlive")
|
||||||
{
|
{
|
||||||
$liveenable = GETPOST('value','int');
|
$liveenable = GETPOST('value','int');
|
||||||
$res = dolibarr_set_const($db, "STRIPE_LIVE", $liveenable,'yesno',0,'',$conf->entity);
|
$res = dolibarr_set_const($db, "STRIPE_LIVE", $liveenable, 'yesno', 0, '', $conf->entity);
|
||||||
if (! $res > 0) $error++;
|
if ($res > 0) {
|
||||||
if (! $error)
|
|
||||||
{
|
|
||||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -251,6 +254,11 @@ print '<input size="64" type="text" name="ONLINE_PAYMENT_CREDITOR" value="'.$con
|
|||||||
print ' '.$langs->trans("Example").': '.$mysoc->name;
|
print ' '.$langs->trans("Example").': '.$mysoc->name;
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
print '<tr class="oddeven"><td>';
|
||||||
|
print $langs->trans("StripeUserAccountForActions").'</td><td>';
|
||||||
|
print $form->select_dolusers($conf->global->STRIPE_USER_ACCOUNT_FOR_ACTIONS, 'STRIPE_USER_ACCOUNT_FOR_ACTIONS', 0);
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print $langs->trans("BankAccount").'</td><td>';
|
print $langs->trans("BankAccount").'</td><td>';
|
||||||
print $form->select_comptes($conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS, 'STRIPE_BANK_ACCOUNT_FOR_PAYMENTS', 0, '', 1);
|
print $form->select_comptes($conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS, 'STRIPE_BANK_ACCOUNT_FOR_PAYMENTS', 0, '', 1);
|
||||||
@ -357,4 +365,3 @@ if (! empty($conf->use_javascript_ajax))
|
|||||||
// End of page
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
|
|||||||
@ -125,15 +125,19 @@ if (!$rowid)
|
|||||||
// Save into $tmparray all metadata
|
// Save into $tmparray all metadata
|
||||||
$tmparray = dolExplodeIntoArray($FULLTAG,'.','=');
|
$tmparray = dolExplodeIntoArray($FULLTAG,'.','=');
|
||||||
// Load origin object according to metadata
|
// Load origin object according to metadata
|
||||||
if (! empty($tmparray['CUS']))
|
if (! empty($tmparray['CUS']) && $tmparray['CUS'] > 0)
|
||||||
{
|
{
|
||||||
$societestatic->fetch($tmparray['CUS']);
|
$societestatic->fetch($tmparray['CUS']);
|
||||||
}
|
}
|
||||||
|
elseif (! empty($charge->metadata->dol_thirdparty_id) && $charge->metadata->dol_thirdparty_id > 0)
|
||||||
|
{
|
||||||
|
$societestatic->fetch($charge->metadata->dol_thirdparty_id);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$societestatic->id = 0;
|
$societestatic->id = 0;
|
||||||
}
|
}
|
||||||
if (! empty($tmparray['MEM']))
|
if (! empty($tmparray['MEM']) && $tmparray['MEM'] > 0)
|
||||||
{
|
{
|
||||||
$memberstatic->fetch($tmparray['MEM']);
|
$memberstatic->fetch($tmparray['MEM']);
|
||||||
}
|
}
|
||||||
@ -142,9 +146,14 @@ if (!$rowid)
|
|||||||
$memberstatic->id = 0;
|
$memberstatic->id = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<TR class="oddeven">';
|
print '<TR class="oddeven">';
|
||||||
// Ref
|
// Ref
|
||||||
print "<TD><A href='".DOL_URL_ROOT."/stripe/charge.php?rowid=".$charge->id."'>".$charge->id."</A></TD>\n";
|
$url='https://dashboard.stripe.com/test/payments/'.$charge->id;
|
||||||
|
if ($servicestatus)
|
||||||
|
{
|
||||||
|
$url='https://dashboard.stripe.com/payments/'.$charge->id;
|
||||||
|
}
|
||||||
|
print "<TD><a href='".$url."' target='_stripe'>".img_picto($langs->trans('ShowInStripe'), 'object_globe')." ".$charge->id."</a></TD>\n";
|
||||||
// Stripe customer
|
// Stripe customer
|
||||||
print "<TD>".$charge->customer."</TD>\n";
|
print "<TD>".$charge->customer."</TD>\n";
|
||||||
// Link
|
// Link
|
||||||
@ -153,23 +162,26 @@ if (!$rowid)
|
|||||||
{
|
{
|
||||||
print $societestatic->getNomUrl(1);
|
print $societestatic->getNomUrl(1);
|
||||||
}
|
}
|
||||||
if ($memberstatic->id > 0)
|
elseif ($memberstatic->id > 0)
|
||||||
{
|
{
|
||||||
print $memberstatic->getNomUrl(1);
|
print $memberstatic->getNomUrl(1);
|
||||||
}
|
}
|
||||||
print "</TD>\n";
|
print "</TD>\n";
|
||||||
// Origine
|
// Origine
|
||||||
print "<TD>";
|
print "<TD>";
|
||||||
print $FULLTAG;
|
if ($charge->metadata->dol_type=="order"){
|
||||||
if ($charge->metadata->source=="order"){
|
|
||||||
$object = new Commande($db);
|
$object = new Commande($db);
|
||||||
$object->fetch($charge->metadata->idsource);
|
$object->fetch($charge->metadata->dol_id);
|
||||||
print "<A href='".DOL_URL_ROOT."/commande/card.php?id=".$charge->metadata->idsource."'>".img_picto('', 'object_order')." ".$object->ref."</A>";
|
if ($object->id > 0) {
|
||||||
} elseif ($charge->metadata->source=="invoice"){
|
print "<A href='".DOL_URL_ROOT."/commande/card.php?id=".$object->id."'>".img_picto('', 'object_order')." ".$object->ref."</A>";
|
||||||
|
} else print $FULLTAG;
|
||||||
|
} elseif ($charge->metadata->dol_type=="invoice"){
|
||||||
$object = new Facture($db);
|
$object = new Facture($db);
|
||||||
$object->fetch($charge->metadata->idsource);
|
$object->fetch($charge->metadata->dol_id);
|
||||||
print "<A href='".DOL_URL_ROOT."/compta/facture/card.php?facid=".$charge->metadata->idsource."'>".img_picto('', 'object_invoice')." ".$object->ref."</A>";
|
if ($object->id > 0) {
|
||||||
}
|
print "<A href='".DOL_URL_ROOT."/compta/facture/card.php?facid=".$charge->metadata->dol_id."'>".img_picto('', 'object_invoice')." ".$object->ref."</A>";
|
||||||
|
} else print $FULLTAG;
|
||||||
|
} else print $FULLTAG;
|
||||||
print "</TD>\n";
|
print "</TD>\n";
|
||||||
// Date payment
|
// Date payment
|
||||||
print '<TD align="center">'.dol_print_date($charge->created,'%d/%m/%Y %H:%M')."</TD>\n";
|
print '<TD align="center">'.dol_print_date($charge->created,'%d/%m/%Y %H:%M')."</TD>\n";
|
||||||
@ -190,14 +202,16 @@ if (!$rowid)
|
|||||||
// Status
|
// Status
|
||||||
print '<TD align="right">';
|
print '<TD align="right">';
|
||||||
if ($charge->refunded=='1'){
|
if ($charge->refunded=='1'){
|
||||||
print $langs->trans("refunded");
|
print img_picto($langs->trans("refunded"),'statut6');
|
||||||
} elseif ($charge->paid=='1'){
|
} elseif ($charge->paid=='1'){
|
||||||
print $langs->trans("".$charge->status."");
|
|
||||||
|
print img_picto($langs->trans("".$charge->status.""),'statut4');
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$label="Message: ".$charge->failure_message."<br>";
|
$label="Message: ".$charge->failure_message."<br>";
|
||||||
$label.="Réseau: ".$charge->outcome->network_status."<br>";
|
$label.="Réseau: ".$charge->outcome->network_status."<br>";
|
||||||
$label.="Statut: ".$langs->trans("".$charge->outcome->seller_message."");
|
$label.="Statut: ".$langs->trans("".$charge->outcome->seller_message."");
|
||||||
print $form->textwithpicto($langs->trans("".$charge->status.""),$label,1);
|
print $form->textwithpicto(img_picto($langs->trans("".$charge->status.""),'statut8'),$label,1);
|
||||||
}
|
}
|
||||||
print "</TD>\n";
|
print "</TD>\n";
|
||||||
|
|
||||||
|
|||||||
@ -8,6 +8,7 @@
|
|||||||
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
* Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com>
|
* Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com>
|
||||||
* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
* Copyright (C) 2018 ThibaultFOUCART <support@ptibogxiv.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -639,36 +640,24 @@ print '<td ';
|
|||||||
if (($action == 'add_paiement' && $src->id!=$source) or ($src->object=='source' && $src->card->three_d_secure=='required')) { print'class="opacitymedium"';}
|
if (($action == 'add_paiement' && $src->id!=$source) or ($src->object=='source' && $src->card->three_d_secure=='required')) { print'class="opacitymedium"';}
|
||||||
|
|
||||||
print' >';
|
print' >';
|
||||||
if ($src->object=='card'){
|
if ($src->object=='card')
|
||||||
if ($src->brand == 'Visa') {$brand='cc-visa';}
|
{
|
||||||
elseif ($src->brand == 'MasterCard') {$brand='cc-mastercard';}
|
print img_credit_card($src->brand);
|
||||||
elseif ($src->brand == 'American Express') {$brand='cc-amex';}
|
}
|
||||||
elseif ($src->brand == 'Discover') {$brand='cc-discover';}
|
elseif ($src->object=='source' && $src->type=='card')
|
||||||
elseif ($src->brand == 'JCB') {$brand='cc-jcb';}
|
{
|
||||||
elseif ($src->brand == 'Diners Club') {$brand='cc-diners-club';}
|
print img_credit_card($src->card->brand);
|
||||||
else {$brand='credit-card-alt';}
|
}
|
||||||
print '<span class="fa fa-'.$brand.' fa-3x fa-fw"></span>';
|
elseif ($src->object=='source' && $src->type=='sepa_debit')
|
||||||
}
|
{
|
||||||
elseif ($src->object=='source' && $src->type=='card'){
|
print '<span class="fa fa-university fa-2x fa-fw"></span>';
|
||||||
if ($src->card->brand == 'Visa') {$brand='cc-visa';}
|
}
|
||||||
elseif ($src->card->brand == 'MasterCard') {$brand='cc-mastercard';}
|
|
||||||
elseif ($src->card->brand == 'American Express') {$brand='cc-amex';}
|
|
||||||
elseif ($src->card->brand == 'Discover') {$brand='cc-discover';}
|
|
||||||
elseif ($src->card->brand == 'JCB') {$brand='cc-jcb';}
|
|
||||||
elseif ($src->card->brand == 'Diners Club') {$brand='cc-diners-club';}
|
|
||||||
else {$brand='credit-card-alt';}
|
|
||||||
|
|
||||||
print '<span class="fa fa-'.$brand.' fa-3x fa-fw"></span>';
|
|
||||||
}
|
|
||||||
elseif ($src->object=='source' && $src->type=='sepa_debit'){
|
|
||||||
print '<span class="fa fa-university fa-3x fa-fw"></span>';
|
|
||||||
}
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td ';
|
print '<td ';
|
||||||
if (($action == 'add_paiement' && $src->id!=$source) or ($src->object=='source' && $src->card->three_d_secure=='required')) { print'class="opacitymedium"';}
|
if (($action == 'add_paiement' && $src->id!=$source) or ($src->object=='source' && $src->card->three_d_secure=='required')) { print'class="opacitymedium"';}
|
||||||
print' >';
|
print' >';
|
||||||
if ($src->object=='card'){
|
if ($src->object=='card'){
|
||||||
print '**** '.$src->last4.'<br>Exp. '.$src->exp_month.'/'.$src->exp_year.'';
|
print '....'.$src->last4.' - '.$src->exp_month.'/'.$src->exp_year.'';
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
if ($src->country)
|
if ($src->country)
|
||||||
{
|
{
|
||||||
@ -679,7 +668,7 @@ print '</td><td>';
|
|||||||
else print img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
|
else print img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
|
||||||
}
|
}
|
||||||
elseif ($src->object=='source' && $src->type=='card'){
|
elseif ($src->object=='source' && $src->type=='card'){
|
||||||
print $src->owner->name.'<br>**** '.$src->card->last4.' - '.$src->card->exp_month.'/'.$src->card->exp_year.'';
|
print $src->owner->name.'<br>....'.$src->card->last4.' - '.$src->card->exp_month.'/'.$src->card->exp_year.'';
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
if ($src->card->country)
|
if ($src->card->country)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -188,7 +188,7 @@ if ($result > 0)
|
|||||||
|
|
||||||
|
|
||||||
// Add notification form
|
// Add notification form
|
||||||
print_fiche_titre($langs->trans("AddNewNotification"),'','');
|
print load_fiche_titre($langs->trans("AddNewNotification"),'','');
|
||||||
|
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$id.'" method="post">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$id.'" method="post">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
@ -276,7 +276,7 @@ if ($result > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List of active notifications
|
// List of active notifications
|
||||||
print_fiche_titre($langs->trans("ListOfActiveNotifications").' ('.$num.')','','');
|
print load_fiche_titre($langs->trans("ListOfActiveNotifications").' ('.$num.')','','');
|
||||||
|
|
||||||
// Line with titles
|
// Line with titles
|
||||||
print '<table width="100%" class="noborder">';
|
print '<table width="100%" class="noborder">';
|
||||||
|
|||||||
@ -137,7 +137,7 @@ $var = false;
|
|||||||
|
|
||||||
llxHeader('', $title);
|
llxHeader('', $title);
|
||||||
|
|
||||||
//print_fiche_titre($title);
|
//print load_fiche_titre($title);
|
||||||
|
|
||||||
$h=0;
|
$h=0;
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/variants/card.php?id='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/variants/card.php?id='.$object->id;
|
||||||
@ -243,7 +243,7 @@ if ($action == 'edit') { ?>
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
print_fiche_titre($langs->trans("PossibleValues"));
|
print load_fiche_titre($langs->trans("PossibleValues"));
|
||||||
|
|
||||||
if ($action == 'edit_value') {
|
if ($action == 'edit_value') {
|
||||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
|
|||||||
@ -66,7 +66,7 @@ $title = $langs->trans('NewProductAttribute');
|
|||||||
|
|
||||||
llxHeader('', $title);
|
llxHeader('', $title);
|
||||||
|
|
||||||
print_fiche_titre($title);
|
print load_fiche_titre($title);
|
||||||
|
|
||||||
dol_fiche_head();
|
dol_fiche_head();
|
||||||
|
|
||||||
|
|||||||
@ -118,7 +118,7 @@ print '<input type="hidden" name="action" value="add">';
|
|||||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||||
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
|
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
|
||||||
|
|
||||||
print_fiche_titre($langs->trans('NewProductAttributeValue'));
|
print load_fiche_titre($langs->trans('NewProductAttributeValue'));
|
||||||
|
|
||||||
dol_fiche_head();
|
dol_fiche_head();
|
||||||
|
|
||||||
|
|||||||
@ -160,7 +160,7 @@ if (! empty($id) || ! empty($ref)) {
|
|||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
print_fiche_titre($langs->trans('ProductCombinationGenerator'));
|
print load_fiche_titre($langs->trans('ProductCombinationGenerator'));
|
||||||
|
|
||||||
$dictionary_attr = array();
|
$dictionary_attr = array();
|
||||||
|
|
||||||
|
|||||||
@ -2211,7 +2211,7 @@ if ($action == 'createsite')
|
|||||||
|
|
||||||
dol_fiche_head($head, 'card', $langs->trans("AddSite"), -1, 'globe');
|
dol_fiche_head($head, 'card', $langs->trans("AddSite"), -1, 'globe');
|
||||||
*/
|
*/
|
||||||
if ($action == 'createcontainer') print_fiche_titre($langs->trans("AddSite"));
|
if ($action == 'createcontainer') print load_fiche_titre($langs->trans("AddSite"));
|
||||||
|
|
||||||
print '<!-- Add site -->'."\n";
|
print '<!-- Add site -->'."\n";
|
||||||
//print '<div class="fichecenter">';
|
//print '<div class="fichecenter">';
|
||||||
@ -2273,7 +2273,7 @@ if ($action == 'importsite')
|
|||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print_fiche_titre($langs->trans("ImportSite"));
|
print load_fiche_titre($langs->trans("ImportSite"));
|
||||||
|
|
||||||
dol_fiche_head(array(), '0', '', -1);
|
dol_fiche_head(array(), '0', '', -1);
|
||||||
|
|
||||||
@ -2305,7 +2305,7 @@ if ($action == 'editmeta' || $action == 'createcontainer')
|
|||||||
|
|
||||||
dol_fiche_head($head, 'card', $langs->trans("AddPage"), -1, 'globe');
|
dol_fiche_head($head, 'card', $langs->trans("AddPage"), -1, 'globe');
|
||||||
*/
|
*/
|
||||||
if ($action == 'createcontainer') print_fiche_titre($langs->trans("AddPage"));
|
if ($action == 'createcontainer') print load_fiche_titre($langs->trans("AddPage"));
|
||||||
|
|
||||||
print '<!-- Edit or create page/container -->'."\n";
|
print '<!-- Edit or create page/container -->'."\n";
|
||||||
//print '<div class="fichecenter">';
|
//print '<div class="fichecenter">';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user