Skip to content

Commit

Permalink
Fix missing declarion of form
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
eldy committed Feb 29, 2016
1 parent 846d78d commit a26f880
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions htdocs/don/list.php
Expand Up @@ -79,6 +79,7 @@
* View
*/

$form=new Form($db);
if (! empty($conf->projet->enabled)) $projectstatic=new Project($db);

llxHeader('',$langs->trans("Donations"),'EN:Module_Donations|FR:Module_Dons|ES:Módulo_Donaciones');
Expand Down
1 change: 1 addition & 0 deletions htdocs/expedition/list.php
Expand Up @@ -76,6 +76,7 @@
* View
*/

$form=new Form($db);
$companystatic=new Societe($db);
$shipment=new Expedition($db);

Expand Down
1 change: 1 addition & 0 deletions htdocs/fourn/commande/list.php
Expand Up @@ -93,6 +93,7 @@
* View
*/

$form=new Form($db);
$thirdpartytmp = new Fournisseur($db);
$commandestatic=new CommandeFournisseur($db);
$formfile = new FormFile($db);
Expand Down
2 changes: 2 additions & 0 deletions htdocs/index.php
Expand Up @@ -65,6 +65,8 @@
* View
*/

if (! is_object($form)) $form=new Form($db);

// Title
$title=$langs->trans("HomeArea").' - Dolibarr '.DOL_VERSION;
if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $title=$langs->trans("HomeArea").' - '.$conf->global->MAIN_APPLICATION_TITLE;
Expand Down
8 changes: 4 additions & 4 deletions htdocs/install/mysql/data/llx_c_payment_term.sql
Expand Up @@ -27,11 +27,11 @@
-- 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 (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 (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 (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 (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 (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,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,1);
6 changes: 3 additions & 3 deletions htdocs/main.inc.php
Expand Up @@ -1445,7 +1445,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
// Show menu entries
print '<div id="tmenu_tooltip'.(empty($conf->global->MAIN_MENU_INVERT)?'':'invert').'" class="tmenu">'."\n";
$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";

//$form=new Form($db);
Expand Down Expand Up @@ -1609,7 +1609,7 @@ function left_menu($menu_array_before, $helppagename='', $notused='', $menu_arra

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);
$selected=-1;
Expand Down Expand Up @@ -1655,7 +1655,7 @@ function left_menu($menu_array_before, $helppagename='', $notused='', $menu_arra
$searchform.=printSearchForm(DOL_URL_ROOT.'/user/list.php', DOL_URL_ROOT.'/user/list.php', $langs->trans("Users"), 'user', 'sall', 'M', 'searchleftuser', img_object('','user'));
}
}

// Execute hook printSearchForm
$parameters=array('searchform'=>$searchform);
$reshook=$hookmanager->executeHooks('printSearchForm',$parameters); // Note that $action and $object may have been modified by some hooks
Expand Down

0 comments on commit a26f880

Please sign in to comment.