Merge pull request #2959 from aspangaro/develop-patch22
Fix: wrong file & problem to install model
This commit is contained in:
commit
a1391ba8b7
@ -67,50 +67,49 @@ class modDon extends DolibarrModules
|
||||
$this->config_page_url = array("donation.php@don");
|
||||
|
||||
// Constants
|
||||
$this->const = array ();
|
||||
$this->const = array();
|
||||
$r=0;
|
||||
|
||||
$this->const[0] = array (
|
||||
"DON_ADDON_MODEL",
|
||||
"chaine",
|
||||
"html_cerfafr",
|
||||
"Nom du gestionnaire de generation de recu de dons",
|
||||
"0"
|
||||
);
|
||||
$this->const[1] = array (
|
||||
"DONATION_ART200",
|
||||
"yesno",
|
||||
"0",
|
||||
"Option Française - Eligibilité Art200 du CGI",
|
||||
"0"
|
||||
);
|
||||
$this->const[2] = array (
|
||||
"DONATION_ART238",
|
||||
"yesno",
|
||||
"0",
|
||||
"Option Française - Eligibilité Art238 bis du CGI",
|
||||
"0"
|
||||
);
|
||||
$this->const[3] = array (
|
||||
"DONATION_ART885",
|
||||
"yesno",
|
||||
"0",
|
||||
"Option Française - Eligibilité Art885-0 V bis du CGI",
|
||||
"0"
|
||||
);
|
||||
$this->const[4] = array (
|
||||
"DONATION_MESSAGE",
|
||||
"chaine",
|
||||
"Thank you",
|
||||
"Message affiché sur le récépissé de versements ou dons",
|
||||
"0"
|
||||
);
|
||||
$this->const[5] = array (
|
||||
"DONATION_ACCOUNTINGACCOUNT",
|
||||
"chaine",
|
||||
"7581",
|
||||
"Compte comptable de remise des versements ou dons",
|
||||
"0"
|
||||
);
|
||||
$this->const[$r][0] = "DON_ADDON_MODEL";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "html_cerfafr";
|
||||
$this->const[$r][3] = 'Nom du gestionnaire de generation de recu de dons';
|
||||
$this->const[$r][4] = 0;
|
||||
|
||||
$r++;
|
||||
$this->const[$r][0] = "DONATION_ART200";
|
||||
$this->const[$r][1] = "yesno";
|
||||
$this->const[$r][2] = "0";
|
||||
$this->const[$r][3] = 'Option Française - Eligibilité Art200 du CGI';
|
||||
$this->const[$r][4] = 0;
|
||||
|
||||
$r++;
|
||||
$this->const[$r][0] = "DONATION_ART238";
|
||||
$this->const[$r][1] = "yesno";
|
||||
$this->const[$r][2] = "0";
|
||||
$this->const[$r][3] = 'Option Française - Eligibilité Art238 bis du CGI';
|
||||
$this->const[$r][4] = 0;
|
||||
|
||||
$r++;
|
||||
$this->const[$r][0] = "DONATION_ART885";
|
||||
$this->const[$r][1] = "yesno";
|
||||
$this->const[$r][2] = "0";
|
||||
$this->const[$r][3] = 'Option Française - Eligibilité Art885-0 V bis du CGI';
|
||||
$this->const[$r][4] = 0;
|
||||
|
||||
$r++;
|
||||
$this->const[$r][0] = "DONATION_MESSAGE";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "Thank you";
|
||||
$this->const[$r][3] = 'Message affiché sur le récépissé de versements ou dons';
|
||||
$this->const[$r][4] = 0;
|
||||
|
||||
$r++;
|
||||
$this->const[$r][0] = "DONATION_ACCOUNTINGACCOUNT";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "7581";
|
||||
$this->const[$r][3] = 'Compte comptable de remise des versements ou dons';
|
||||
$this->const[$r][4] = 0;
|
||||
|
||||
// Boxes
|
||||
$this->boxes = array();
|
||||
@ -153,8 +152,8 @@ class modDon extends DolibarrModules
|
||||
global $conf;
|
||||
|
||||
$sql = array(
|
||||
"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[0][4]."' AND entity = ".$conf->entity,
|
||||
"INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->const[0][4]."','donation',".$conf->entity.")",
|
||||
"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[0][2]."' AND entity = ".$conf->entity,
|
||||
"INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->const[0][2]."','donation',".$conf->entity.")",
|
||||
);
|
||||
|
||||
return $this->_init($sql,$options);
|
||||
|
||||
@ -386,7 +386,7 @@ if (is_resource($handle))
|
||||
{
|
||||
print ' ';
|
||||
print '</td><td align="center">';
|
||||
print '<a href="dons.php?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user