Fix missing declarion of form

Fix by adding MAIN_USE_OLD_SEARCH_FORM to restore a way for backward
compatibility
Fix to have delay for payment term at least 1 day (to avoid immediate
warning after creation of an invoice)
This commit is contained in:
Laurent Destailleur 2016-03-01 00:59:42 +01:00
parent 846d78dfba
commit a26f880843
6 changed files with 12 additions and 7 deletions

View File

@ -79,6 +79,7 @@ $fieldstosearchall = array(
* View * View
*/ */
$form=new Form($db);
if (! empty($conf->projet->enabled)) $projectstatic=new Project($db); if (! empty($conf->projet->enabled)) $projectstatic=new Project($db);
llxHeader('',$langs->trans("Donations"),'EN:Module_Donations|FR:Module_Dons|ES:Módulo_Donaciones'); llxHeader('',$langs->trans("Donations"),'EN:Module_Donations|FR:Module_Dons|ES:Módulo_Donaciones');

View File

@ -76,6 +76,7 @@ $fieldstosearchall = array(
* View * View
*/ */
$form=new Form($db);
$companystatic=new Societe($db); $companystatic=new Societe($db);
$shipment=new Expedition($db); $shipment=new Expedition($db);

View File

@ -93,6 +93,7 @@ if (empty($user->socid)) $fieldstosearchall["cf.note_private"]="NotePrivate";
* View * View
*/ */
$form=new Form($db);
$thirdpartytmp = new Fournisseur($db); $thirdpartytmp = new Fournisseur($db);
$commandestatic=new CommandeFournisseur($db); $commandestatic=new CommandeFournisseur($db);
$formfile = new FormFile($db); $formfile = new FormFile($db);

View File

@ -65,6 +65,8 @@ if (GETPOST('addbox')) // Add box (when submit is done from a form when ajax dis
* View * View
*/ */
if (! is_object($form)) $form=new Form($db);
// Title // Title
$title=$langs->trans("HomeArea").' - Dolibarr '.DOL_VERSION; $title=$langs->trans("HomeArea").' - Dolibarr '.DOL_VERSION;
if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $title=$langs->trans("HomeArea").' - '.$conf->global->MAIN_APPLICATION_TITLE; if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $title=$langs->trans("HomeArea").' - '.$conf->global->MAIN_APPLICATION_TITLE;

View File

@ -27,11 +27,11 @@
-- de l'install et tous les sigles '--' sont supprimés. -- de l'install et tous les sigles '--' sont supprimés.
-- --
insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (1,'RECEP', 1,1, 'A réception de facture','Réception de facture',0,0); insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (1,'RECEP', 1,1, 'A réception de facture','Réception de facture',0,1);
insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (2,'30D', 2,1, '30 jours','Réglement à 30 jours',0,30); insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (2,'30D', 2,1, '30 jours','Réglement à 30 jours',0,30);
insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (3,'30DENDMONTH', 3,1, '30 jours fin de mois','Réglement à 30 jours fin de mois',1,30); insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (3,'30DENDMONTH', 3,1, '30 jours fin de mois','Réglement à 30 jours fin de mois',1,30);
insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (4,'60D', 4,1, '60 jours','Réglement à 60 jours',0,60); insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (4,'60D', 4,1, '60 jours','Réglement à 60 jours',0,60);
insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (5,'60DENDMONTH', 5,1, '60 jours fin de mois','Réglement à 60 jours fin de mois',1,60); insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (5,'60DENDMONTH', 5,1, '60 jours fin de mois','Réglement à 60 jours fin de mois',1,60);
insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (6,'PT_ORDER', 6,1, 'A réception de commande','A réception de commande',0,0); insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (6,'PT_ORDER', 6,1, 'A réception de commande','A réception de commande',0,1);
insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (7,'PT_DELIVERY', 7,1, 'Livraison','Règlement à la livraison',0,0); insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (7,'PT_DELIVERY', 7,1, 'Livraison','Règlement à la livraison',0,1);
insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (8,'PT_5050', 8,1, '50 et 50','Règlement 50% à la commande, 50% à la livraison',0,0); insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (8,'PT_5050', 8,1, '50 et 50','Règlement 50% à la commande, 50% à la livraison',0,1);

View File

@ -1445,7 +1445,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
// Show menu entries // Show menu entries
print '<div id="tmenu_tooltip'.(empty($conf->global->MAIN_MENU_INVERT)?'':'invert').'" class="tmenu">'."\n"; print '<div id="tmenu_tooltip'.(empty($conf->global->MAIN_MENU_INVERT)?'':'invert').'" class="tmenu">'."\n";
$menumanager->atarget=$target; $menumanager->atarget=$target;
$menumanager->showmenu('top'); // This contains a \n $menumanager->showmenu('top', array('searchform'=>$searchform, 'bookmarks'=>$bookmarks)); // This contains a \n
print "</div>\n"; print "</div>\n";
//$form=new Form($db); //$form=new Form($db);
@ -1609,7 +1609,7 @@ function left_menu($menu_array_before, $helppagename='', $notused='', $menu_arra
print "\n"; print "\n";
if ($conf->use_javascript_ajax && $conf->browser->layout != 'phone') if ($conf->use_javascript_ajax && $conf->browser->layout != 'phone' && empty($conf->global->MAIN_USE_OLD_SEARCH_FORM))
{ {
if (! is_object($form)) $form=new Form($db); if (! is_object($form)) $form=new Form($db);
$selected=-1; $selected=-1;