fix table creation for intracom and change reserved name column name

This commit is contained in:
Florian HENRY 2020-10-15 11:37:44 +02:00
parent 9cc8e6ac99
commit a0d1e96bfd
4 changed files with 9 additions and 7 deletions

View File

@ -54,9 +54,11 @@ function intracommReportAdminPrepareHead()
/** /**
* Prepare array with list of tabs * Prepare array with list of tabs
* *
* @param Object $object Object related to tabs
*
* @return array Array of tabs to show * @return array Array of tabs to show
*/ */
function intracommReportPrepareHead() function intracommReportPrepareHead($object)
{ {
global $langs, $conf; global $langs, $conf;

View File

@ -134,12 +134,12 @@ CREATE TABLE llx_intracommreport
ref varchar(30) NOT NULL, -- report reference number ref varchar(30) NOT NULL, -- report reference number
entity integer DEFAULT 1 NOT NULL, -- multi company id entity integer DEFAULT 1 NOT NULL, -- multi company id
type_declaration varchar(32), type_declaration varchar(32),
period varchar(32), periods varchar(32),
mode varchar(32), mode varchar(32),
content_xml text, content_xml text,
type_export varchar(10), type_export varchar(10),
datec datetime, datec datetime,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
)ENGINE=innodb; )ENGINE=innodb;
ALTER TABLE llx_c_incoterms ADD COLUMN label varchar(100) NULL; ALTER TABLE llx_c_incoterms ADD COLUMN label varchar(100) NULL;

View File

@ -24,7 +24,7 @@ create table llx_intracommreport
ref varchar(30) NOT NULL, -- report reference number ref varchar(30) NOT NULL, -- report reference number
entity integer DEFAULT 1 NOT NULL, -- multi company id entity integer DEFAULT 1 NOT NULL, -- multi company id
type_declaration varchar(32), type_declaration varchar(32),
period varchar(32), periods varchar(32),
mode varchar(32), mode varchar(32),
content_xml text, content_xml text,
type_export varchar(10), type_export varchar(10),

View File

@ -96,13 +96,13 @@ print load_fiche_titre($langs->trans("IntracommReportSetup"), $linkback, 'title_
$head = intracommReportAdminPrepareHead(); $head = intracommReportAdminPrepareHead();
dol_fiche_head($head, 'general', $langs->trans("IntracommReport"), -1, "intracommreport"); print dol_get_fiche_head($head, 'general', $langs->trans("IntracommReport"), -1, "intracommreport");
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">'; print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="update">'; print '<input type="hidden" name="action" value="update">';
print_fiche_titre($langs->trans("Parameters").' (DEB)'); print load_fiche_titre($langs->trans("Parameters").' (DEB)');
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
@ -168,7 +168,7 @@ print "</tr>\n";
print '</table>'; print '</table>';
print_fiche_titre($langs->trans("Parameters").' (DES)'); print load_fiche_titre($langs->trans("Parameters").' (DES)');
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';