WIP
This commit is contained in:
parent
4a84dcaa62
commit
14a99041a3
@ -1369,16 +1369,11 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
||||
// Intracomm report
|
||||
if (! empty($conf->intracommreport->enabled))
|
||||
{
|
||||
$newmenu->add("/intracommreport/export.php?leftmenu=intracommreport", $langs->trans("MenuDeclaration"), 0, $user->rights->intracommreport->read, '', $mainmenu, 'intracommreport', 1);
|
||||
$newmenu->add("/intracommreport/list.php?leftmenu=intracommreport", $langs->trans("MenuDeclaration"), 0, $user->rights->intracommreport->read, '', $mainmenu, 'intracommreport', 1);
|
||||
if ($usemenuhider || empty($leftmenu) || preg_match('/intracommreport/', $leftmenu)) {
|
||||
// DEB
|
||||
$newmenu->add("/intracommreport/export.php?leftmenu=intracommreport", $langs->trans("MenuDeclarationDEB"), 1, $user->rights->intracommreport->read, '', $mainmenu, 'intracommreportDEB', 1);
|
||||
$newmenu->add("/intracommreport/export.php?leftmenu=intracommreportDEB", $langs->trans("MenuDeclarationDEBNew"), 2, $user->rights->intracommreport->write, '', $mainmenu, 'intracommreport', 1);
|
||||
$newmenu->add("/intracommreport/export.php?action=list&leftmenu=intracommreportDEB", $langs->trans("MenuDeclarationDEBList"), 2, $user->rights->intracommreport->read, '', $mainmenu, 'intracommreport', 1);
|
||||
// DES
|
||||
$newmenu->add("/intracommreport/export.php?exporttype=des&leftmenu=intracommreport", $langs->trans("MenuDeclarationDES"), 1, $user->rights->intracommreport->read, '', $mainmenu, 'intracommreportDES', 1);
|
||||
$newmenu->add("/intracommreport/export.php?exporttype=des&leftmenu=intracommreportDES", $langs->trans("MenuDeclarationDESNew"), 2, $user->rights->intracommreport->write, '', $mainmenu, 'intracommreport', 1);
|
||||
$newmenu->add("/intracommreport/export.php?exporttype=des&action=list&leftmenu=intracommreportDES", $langs->trans("MenuDeclarationDESList"), 2, $user->rights->intracommreport->read, '', $mainmenu, 'intracommreport', 1);
|
||||
// DEB / DES
|
||||
$newmenu->add("/intracommreport/card.php?action=create&leftmenu=intracommreport", $langs->trans("MenuDeclarationNew"), 1, $user->rights->intracommreport->write, '', $mainmenu, 'intracommreport', 1);
|
||||
$newmenu->add("/intracommreport/list.php?leftmenu=intracommreport", $langs->trans("MenuDeclarationList"), 1, $user->rights->intracommreport->read, '', $mainmenu, 'intracommreport', 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -37,6 +37,58 @@ $year = GETPOST('year');
|
||||
$month = GETPOST('month');
|
||||
$type_declaration = GETPOST('type');
|
||||
|
||||
// Mode creation
|
||||
if ($action == 'create')
|
||||
{
|
||||
$title = $langs->trans("IntracommReportDEBTitle");
|
||||
llxHeader("", $title);
|
||||
print load_fiche_titre($langs->trans("IntracommReportDEBTitle"));
|
||||
|
||||
print '<form name="charge" method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="export" />';
|
||||
|
||||
dol_fiche_head();
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Analysis period
|
||||
print '<tr>';
|
||||
print '<td class="titlefieldcreate fieldrequired">';
|
||||
print $langs->trans("AnalysisPeriod");
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
$TabMonth = array();
|
||||
for($i=1;$i<=12;$i++) $TabMonth[$i] = $langs->trans('Month'.str_pad($i, 2, 0, STR_PAD_LEFT));
|
||||
//print $ATMform->combo('','month', $TabMonth, empty($month) ? date('m') : $month);
|
||||
print $formother->select_month(empty($month) ? date('M') : $month,'month',0, 1);
|
||||
print $formother->select_year(empty($year) ? date('Y') : $year,'year',0, 3, 3);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Type of declaration
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
print $langs->trans("TypeOfDeclaration");
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
//print $ATMform->combo('','type', array('introduction'=>'Introduction', 'expedition'=>'Expédition'), $type_declaration);
|
||||
print $form->selectarray('type', $type, $type_declaration);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("ExportXML").'">';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
/*
|
||||
switch($action) {
|
||||
case 'generateXML':
|
||||
$obj = new TDebProdouane($PDOdb);
|
||||
@ -55,59 +107,6 @@ switch($action) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function _print_form_deb() {
|
||||
|
||||
global $langs, $form, $formother, $year, $month, $type, $type_declaration;
|
||||
|
||||
$title = $langs->trans("IntracommReportDEBTitle");
|
||||
llxHeader("", $title);
|
||||
print load_fiche_titre($langs->trans("IntracommReportDEBTitle"));
|
||||
|
||||
dol_fiche_head();
|
||||
|
||||
print '<form action="'.$_SERVER['PHP_SELF'].'" name="save" method="POST">';
|
||||
print '<input type="hidden" name="action" value="export" />';
|
||||
|
||||
print '<table width="100%" class="noborder">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2">';
|
||||
print 'Paramètres de l\'export';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
print 'Période d\'analyse';
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
$TabMonth = array();
|
||||
for($i=1;$i<=12;$i++) $TabMonth[$i] = $langs->trans('Month'.str_pad($i, 2, 0, STR_PAD_LEFT));
|
||||
//print $ATMform->combo('','month', $TabMonth, empty($month) ? date('m') : $month);
|
||||
print $formother->select_month(empty($month) ? date('M') : $month,'month',0, 1);
|
||||
print $formother->select_year(empty($year) ? date('Y') : $year,'year',0, 3, 3);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
print 'Type de déclaration';
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
//print $ATMform->combo('','type', array('introduction'=>'Introduction', 'expedition'=>'Expédition'), $type_declaration);
|
||||
print $form->selectarray('type', $type, $type_declaration);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<div class="tabsAction">';
|
||||
print '<input class="butAction" type="SUBMIT" name="subFormExport" value="Exporter XML" />';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
}
|
||||
|
||||
function _print_form_des()
|
||||
{
|
||||
global $langs, $formother, $year, $month, $type_declaration;
|
||||
@ -184,5 +183,6 @@ function _export_xml_des($type_declaration, $period_year, $period_month) {
|
||||
}
|
||||
else setEventMessage($obj->errors, 'warnings');
|
||||
}
|
||||
*/
|
||||
|
||||
llxFooter();
|
||||
@ -15,14 +15,14 @@ INTRACOMMREPORT_NUM_DECLARATION=Numéro de déclarant
|
||||
|
||||
#Menu
|
||||
MenuDeclaration=Export Pro-Douane
|
||||
MenuDeclarationDEB=Export DEB
|
||||
MenuDeclarationDEBNew=Nouvelle déclaration
|
||||
MenuDeclarationDEBList=Liste des déclarations
|
||||
MenuDeclarationDES=Export DES
|
||||
MenuDeclarationDESNew=Nouvelle déclaration
|
||||
MenuDeclarationDESList=Liste des déclarations
|
||||
MenuDeclarationNew=Nouvelle déclaration
|
||||
MenuDeclarationList=Liste
|
||||
|
||||
#page d'export
|
||||
# View
|
||||
AnalysisPeriod=Analysis period
|
||||
TypeOfDeclaration=Type of declaration
|
||||
|
||||
#Page d'export
|
||||
IntracommReportDEBTitle=Export d'un fichier XML au format ProDouane - DEB
|
||||
IntracommReportDESTitle=Export d'un fichier XML au format ProDouane - DES
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user