Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
74a50d8d6c
@ -102,6 +102,8 @@ if ($action == 'unset')
|
||||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
$help_url='EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros';
|
||||
|
||||
llxHeader('',$langs->trans("MembersSetup"),$help_url);
|
||||
@ -127,7 +129,6 @@ print '<td>'.$langs->trans("Value").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Action").'</td>';
|
||||
print "</tr>\n";
|
||||
$var=true;
|
||||
$form = new Form($db);
|
||||
|
||||
// Login/Pass required for members
|
||||
$var=!$var;
|
||||
|
||||
@ -823,8 +823,7 @@ if ($rowid)
|
||||
// Create a form array
|
||||
$formquestion=array(array('label' => $langs->trans("NameToCreate"), 'type' => 'text', 'name' => 'companyname', 'value' => $name));
|
||||
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -171,7 +171,6 @@ if ($result)
|
||||
{
|
||||
print '<input type="hidden" name="action" value="2bank">';
|
||||
print '<input type="hidden" name="rowid" value="'.$objp->crowid.'">';
|
||||
$form = new Form($db);
|
||||
$form->select_comptes('','accountid',0,'',1);
|
||||
print '<br>';
|
||||
$form->select_types_paiements('','paymenttypeid');
|
||||
|
||||
@ -185,8 +185,7 @@ if ($id > 0)
|
||||
*/
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&urlfile='.urlencode(GETPOST("urlfile")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&urlfile='.urlencode(GETPOST("urlfile")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -653,7 +653,7 @@ if ($user->rights->adherent->creer && $action == 'confirm_add_spip' && $confirm
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
$formcompany = new FormCompany($db);
|
||||
@ -1192,8 +1192,7 @@ else
|
||||
if ($object->fk_soc > 0) $text.=$langs->trans("UserWillBeExternalUser");
|
||||
else $text.=$langs->trans("UserWillBeInternalUser");
|
||||
}
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrLogin"),$text,"confirm_create_user",$formquestion,'yes');
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrLogin"),$text,"confirm_create_user",$formquestion,'yes');
|
||||
}
|
||||
|
||||
// Confirm create third party
|
||||
@ -1212,8 +1211,7 @@ else
|
||||
// Create a form array
|
||||
$formquestion=array( array('label' => $langs->trans("NameToCreate"), 'type' => 'text', 'name' => 'companyname', 'value' => $name));
|
||||
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1);
|
||||
}
|
||||
|
||||
// Confirm validate member
|
||||
@ -1286,8 +1284,7 @@ else
|
||||
$formquestion=array();
|
||||
if ($object->email) $formquestion[]=array('type' => 'checkbox', 'name' => 'send_mail', 'label' => $label, 'value' => (! empty($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL)?'true':'false'));
|
||||
if ($backtopage) $formquestion[]=array('type' => 'hidden', 'name' => 'backtopage', 'value' => ($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"]));
|
||||
$ret=$form->form_confirm("fiche.php?rowid=".$rowid,$langs->trans("ResiliateMember"),$langs->trans("ConfirmResiliateMember"),"confirm_resign",$formquestion);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm("fiche.php?rowid=".$rowid,$langs->trans("ResiliateMember"),$langs->trans("ConfirmResiliateMember"),"confirm_resign",$formquestion);
|
||||
}
|
||||
|
||||
// Confirm remove member
|
||||
@ -1295,8 +1292,7 @@ else
|
||||
{
|
||||
$formquestion=array();
|
||||
if ($backtopage) $formquestion[]=array('type' => 'hidden', 'name' => 'backtopage', 'value' => ($backtopage != '1' ? $backtopage : $_SERVER["HTTP_REFERER"]));
|
||||
$ret=$form->form_confirm("fiche.php?rowid=".$rowid,$langs->trans("DeleteMember"),$langs->trans("ConfirmDeleteMember"),"confirm_delete",$formquestion,0,1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm("fiche.php?rowid=".$rowid,$langs->trans("DeleteMember"),$langs->trans("ConfirmDeleteMember"),"confirm_delete",$formquestion,0,1);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1304,8 +1300,7 @@ else
|
||||
*/
|
||||
if ($action == 'add_spip')
|
||||
{
|
||||
$ret=$form->form_confirm("fiche.php?rowid=".$rowid, $langs->trans('AddIntoSpip'), $langs->trans('AddIntoSpipConfirmation'), 'confirm_add_spip');
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm("fiche.php?rowid=".$rowid, $langs->trans('AddIntoSpip'), $langs->trans('AddIntoSpipConfirmation'), 'confirm_add_spip');
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1313,8 +1308,7 @@ else
|
||||
*/
|
||||
if ($action == 'del_spip')
|
||||
{
|
||||
$ret=$form->form_confirm("fiche.php?rowid=$rowid", $langs->trans('DeleteIntoSpip'), $langs->trans('DeleteIntoSpipConfirmation'), 'confirm_del_spip');
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm("fiche.php?rowid=$rowid", $langs->trans('DeleteIntoSpip'), $langs->trans('DeleteIntoSpipConfirmation'), 'confirm_del_spip');
|
||||
}
|
||||
|
||||
$rowspan=17;
|
||||
|
||||
@ -291,8 +291,7 @@ if ($rowid && $action != 'edit')
|
||||
//$formquestion['text']='<b>'.$langs->trans("ThisWillAlsoDeleteBankRecord").'</b>';
|
||||
$text=$langs->trans("ConfirmDeleteSubscription");
|
||||
if (! empty($conf->banque->enabled) && ! empty($conf->global->ADHERENT_BANK_USE)) $text.='<br>'.img_warning().' '.$langs->trans("ThisWillAlsoDeleteBankRecord");
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?rowid=".$subscription->id,$langs->trans("DeleteSubscription"),$text,"confirm_delete",$formquestion,0,1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$subscription->id,$langs->trans("DeleteSubscription"),$text,"confirm_delete",$formquestion,0,1);
|
||||
}
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
|
||||
@ -233,7 +233,6 @@ if (! $rowid && $action != 'create' && $action != 'edit')
|
||||
/* ************************************************************************** */
|
||||
if ($action == 'create')
|
||||
{
|
||||
$form = new Form($db);
|
||||
$adht = new AdherentType($db);
|
||||
|
||||
print_fiche_titre($langs->trans("NewMemberType"));
|
||||
@ -620,8 +619,6 @@ if ($rowid > 0)
|
||||
|
||||
if ($action == 'edit')
|
||||
{
|
||||
$form = new Form($db);
|
||||
|
||||
$adht = new AdherentType($db);
|
||||
$adht->id = $rowid;
|
||||
$adht->fetch($rowid);
|
||||
|
||||
@ -143,6 +143,8 @@ if ($action == 'delete')
|
||||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
llxHeader('',$langs->trans("OtherSetup"));
|
||||
|
||||
// Add logic to show/hide buttons
|
||||
@ -184,9 +186,6 @@ print '<td align="center">'.$langs->trans("Action").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
|
||||
// Line to add new record
|
||||
$var=false;
|
||||
print "\n";
|
||||
|
||||
@ -123,6 +123,8 @@ if ($action == 'update')
|
||||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
llxHeader();
|
||||
|
||||
print_fiche_titre($langs->trans("DelaysOfToleranceBeforeWarning"),'','setup');
|
||||
@ -131,7 +133,6 @@ print $langs->transnoentities("DelaysOfToleranceDesc",img_warning());
|
||||
print " ".$langs->trans("OnlyActiveElementsAreShown",DOL_URL_ROOT.'/admin/modules.php')."<br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
$form = new Form($db);
|
||||
$countrynotdefined='<font class="error">'.$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')</font>';
|
||||
|
||||
if ($action == 'edit')
|
||||
|
||||
@ -676,8 +676,7 @@ print "<br>\n";
|
||||
// Confirmation de la suppression de la ligne
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$_GET["code"].'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete','',0,1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$_GET["code"].'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete','',0,1);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@ -251,8 +251,7 @@ if ($action == 'delete')
|
||||
$result = $db->query($sql);
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
$ret=$form->form_confirm("index.php?menu_handler=".$menu_handler."&menuId=".$_GET['menuId'],$langs->trans("DeleteMenu"),$langs->trans("ConfirmDeleteMenu",$obj->titre),"confirm_delete");
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm("index.php?menu_handler=".$menu_handler."&menuId=".$_GET['menuId'],$langs->trans("DeleteMenu"),$langs->trans("ConfirmDeleteMenu",$obj->titre),"confirm_delete");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -66,6 +66,8 @@ if ($action == 'reset' && $user->admin)
|
||||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
$_SESSION["mode"]=$mode;
|
||||
|
||||
$help_url='EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
|
||||
@ -252,7 +254,6 @@ if (! empty($categ[$categidx]))
|
||||
$categidx='expdev';
|
||||
if (! empty($categ[$categidx]))
|
||||
{
|
||||
$form = new Form($db);
|
||||
$categidx='expdev';
|
||||
$head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx;
|
||||
$head[$h][1] = $form->textwithpicto($langs->trans("ModuleFamilyExperimental"), $langs->trans('DoNotUseInProduction'), 1, 'warning', '', 0, 3);
|
||||
|
||||
@ -35,13 +35,13 @@ if (! $user->admin)
|
||||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
$title=$langs->trans("SystemToolsArea");
|
||||
if (GETPOST('leftmenu') == 'modulesadmintools') $title=$langs->trans("ModulesSystemTools");
|
||||
|
||||
llxHeader(array(),$title);
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
print_fiche_titre($title,'','setup');
|
||||
|
||||
print $langs->trans("SystemToolsAreaDesc").'<br>';
|
||||
|
||||
@ -150,8 +150,7 @@ if ($result)
|
||||
if ($action == 'purge')
|
||||
{
|
||||
$formquestion=array();
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeAuditEvents'), $langs->trans('ConfirmPurgeAuditEvents'),'confirm_purge',$formquestion,'no',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeAuditEvents'), $langs->trans('ConfirmPurgeAuditEvents'),'confirm_purge',$formquestion,'no',1);
|
||||
}
|
||||
|
||||
print '<table class="liste" width="100%">';
|
||||
|
||||
@ -116,14 +116,12 @@ print '<br>';
|
||||
if ($action == 'purge')
|
||||
{
|
||||
$formquestion=array();
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeSessions'), $langs->trans('ConfirmPurgeSessions'),'confirm_purge',$formquestion,'no',2);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeSessions'), $langs->trans('ConfirmPurgeSessions'),'confirm_purge',$formquestion,'no',2);
|
||||
}
|
||||
else if ($action == 'lock')
|
||||
{
|
||||
$formquestion=array();
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('LockNewSessions'), $langs->trans('ConfirmLockNewSessions',$user->login),'confirm_lock',$formquestion,'no',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('LockNewSessions'), $langs->trans('ConfirmLockNewSessions',$user->login),'confirm_lock',$formquestion,'no',1);
|
||||
}
|
||||
|
||||
if ($savehandler == 'files')
|
||||
|
||||
@ -193,9 +193,10 @@ if (($action == 'add' || $action == 'confirmed') && $user->rights->categorie->cr
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader("","",$langs->trans("Categories"));
|
||||
$form = new Form($db);
|
||||
|
||||
llxHeader("","",$langs->trans("Categories"));
|
||||
|
||||
if ($user->rights->categorie->creer)
|
||||
{
|
||||
/*
|
||||
|
||||
@ -104,8 +104,7 @@ if ($object->id)
|
||||
*/
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type.'&file='.$_GET["file"], $langs->trans('DeletePicture'), $langs->trans('ConfirmDeletePicture'), 'confirm_delete', '', 0, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type.'&file='.$_GET["file"], $langs->trans('DeletePicture'), $langs->trans('ConfirmDeletePicture'), 'confirm_delete', '', 0, 1);
|
||||
}
|
||||
|
||||
print($mesg);
|
||||
|
||||
@ -144,8 +144,7 @@ dol_fiche_head($head, 'card', $title, 0, 'category');
|
||||
*/
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type,$langs->trans('DeleteCategory'),$langs->trans('ConfirmDeleteCategory'),'confirm_delete');
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type,$langs->trans('DeleteCategory'),$langs->trans('ConfirmDeleteCategory'),'confirm_delete');
|
||||
}
|
||||
|
||||
print '<table border="0" width="100%" class="border">';
|
||||
|
||||
@ -685,8 +685,7 @@ if ($id > 0)
|
||||
// Confirmation suppression action
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm("fiche.php?id=".$id,$langs->trans("DeleteAction"),$langs->trans("ConfirmDeleteAction"),"confirm_delete",'','',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm("fiche.php?id=".$id,$langs->trans("DeleteAction"),$langs->trans("ConfirmDeleteAction"),"confirm_delete",'','',1);
|
||||
}
|
||||
|
||||
if ($action == 'edit')
|
||||
|
||||
@ -416,9 +416,7 @@ else
|
||||
// Confirmation delete
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$form = new Form($db);
|
||||
$ret=$form->form_confirm($_SERVER['PHP_SELF']."?socid=".$object->socid."&id=".$id,$langs->trans("DeleteAddress"),$langs->trans("ConfirmDeleteAddress"),"confirm_delete");
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER['PHP_SELF']."?socid=".$object->socid."&id=".$id,$langs->trans("DeleteAddress"),$langs->trans("ConfirmDeleteAddress"),"confirm_delete");
|
||||
}
|
||||
|
||||
$nblines = count($object->lines);
|
||||
|
||||
@ -299,7 +299,6 @@ if ($id > 0)
|
||||
|
||||
// Conditions de reglement par defaut
|
||||
$langs->load('bills');
|
||||
$form = new Form($db);
|
||||
print '<tr><td>';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td>';
|
||||
print $langs->trans('PaymentConditions');
|
||||
|
||||
@ -700,20 +700,17 @@ else
|
||||
// Confirmation de la validation du mailing
|
||||
if ($action == 'valid')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ValidMailing"),$langs->trans("ConfirmValidMailing"),"confirm_valid",'','',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ValidMailing"),$langs->trans("ConfirmValidMailing"),"confirm_valid",'','',1);
|
||||
}
|
||||
// Confirm reset
|
||||
else if ($action == 'reset')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ResetMailing"),$langs->trans("ConfirmResetMailing",$object->ref),"confirm_reset",'','',2);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ResetMailing"),$langs->trans("ConfirmResetMailing",$object->ref),"confirm_reset",'','',2);
|
||||
}
|
||||
// Confirm delete
|
||||
else if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id.(! empty($urlfrom) ? '&urlfrom='.urlencode($urlfrom) : ''),$langs->trans("DeleteAMailing"),$langs->trans("ConfirmDeleteMailing"),"confirm_delete",'','',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id.(! empty($urlfrom) ? '&urlfrom='.urlencode($urlfrom) : ''),$langs->trans("DeleteAMailing"),$langs->trans("ConfirmDeleteMailing"),"confirm_delete",'','',1);
|
||||
}
|
||||
|
||||
|
||||
@ -749,8 +746,7 @@ else
|
||||
}
|
||||
$text.=$langs->trans('ConfirmSendingEmailing').'<br>';
|
||||
$text.=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB);
|
||||
$ret=$form->form_confirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('SendMailing'),$text,'sendallconfirmed',$formquestion,'',1,260);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('SendMailing'),$text,'sendallconfirmed',$formquestion,'',1,260);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -158,8 +158,7 @@ if ($object->id > 0)
|
||||
*/
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&urlfile='.urlencode(GETPOST("urlfile")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&urlfile='.urlencode(GETPOST("urlfile")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||
}
|
||||
|
||||
// Affiche formulaire upload
|
||||
|
||||
@ -297,7 +297,7 @@ if ($socid > 0)
|
||||
|
||||
if ($_GET['action'] == 'remove')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$objsoc->id.'&remid='.$_GET["remid"], $langs->trans('RemoveDiscount'), $langs->trans('ConfirmRemoveDiscount'), 'confirm_remove', '', 0, 1);
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$objsoc->id.'&remid='.$_GET["remid"], $langs->trans('RemoveDiscount'), $langs->trans('ConfirmRemoveDiscount'), 'confirm_remove', '', 0, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -394,7 +394,7 @@ if ($socid > 0)
|
||||
array('type' => 'text', 'name' => 'amount_ttc_2', 'label' => $langs->trans("AmountTTC").' 2', 'value' => $amount2, 'size' => '5')
|
||||
);
|
||||
$langs->load("dict");
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$objsoc->id.'&remid='.$obj->rowid, $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount',price($obj->amount_ttc),$langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0);
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$objsoc->id.'&remid='.$obj->rowid, $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount',price($obj->amount_ttc),$langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@ -145,8 +145,8 @@ if ($id > 0 || ! empty($ref))
|
||||
*/
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||
|
||||
}
|
||||
|
||||
// Affiche formulaire upload
|
||||
|
||||
@ -1123,14 +1123,11 @@ else if ($action == 'builddoc') // In get or post
|
||||
{
|
||||
/*
|
||||
* Generate order document
|
||||
* define into /core/modules/commande/modules_commande.php
|
||||
*/
|
||||
* define into /core/modules/commande/modules_commande.php
|
||||
*/
|
||||
|
||||
// Sauvegarde le dernier modele choisi pour generer un document
|
||||
if ($_REQUEST['model'])
|
||||
{
|
||||
$object->setDocModel($user, $_REQUEST['model']);
|
||||
}
|
||||
// Save last template used to generate document
|
||||
if (GETPOST('model')) $object->setDocModel($user, GETPOST('model','alpha'));
|
||||
|
||||
// Define output language
|
||||
$outputlangs = $langs;
|
||||
@ -1149,11 +1146,6 @@ else if ($action == 'builddoc') // In get or post
|
||||
dol_print_error($db,$result);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc'));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
// Remove file in doc form
|
||||
|
||||
@ -300,8 +300,8 @@ if ($id > 0 || ! empty($ref))
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$text=$langs->trans('ConfirmDeleteTransaction');
|
||||
$ret=$form->form_confirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&rowid='.GETPOST("rowid"),$langs->trans('DeleteTransaction'),$text,'confirm_delete');
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&rowid='.GETPOST("rowid"),$langs->trans('DeleteTransaction'),$text,'confirm_delete');
|
||||
|
||||
}
|
||||
|
||||
// Define transaction list navigation string
|
||||
|
||||
@ -130,8 +130,8 @@ if (($_GET["id"] || $_GET["ref"]) && $action != 'edit')
|
||||
// Confirmation de la suppression
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$account->id,$langs->trans("DeleteAccount"),$langs->trans("ConfirmDeleteAccount"),"confirm_delete");
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$account->id,$langs->trans("DeleteAccount"),$langs->trans("ConfirmDeleteAccount"),"confirm_delete");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -373,8 +373,8 @@ else
|
||||
*/
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$account->id,$langs->trans("DeleteAccount"),$langs->trans("ConfirmDeleteAccount"),"confirm_delete");
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$account->id,$langs->trans("DeleteAccount"),$langs->trans("ConfirmDeleteAccount"),"confirm_delete");
|
||||
|
||||
}
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
@ -266,8 +266,8 @@ if ($result)
|
||||
// Confirmations
|
||||
if ($action == 'delete_categ')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER['PHP_SELF']."?rowid=".$rowid."&cat1=".GETPOST("fk_categ")."&orig_account=".$orig_account, $langs->trans("RemoveFromRubrique"), $langs->trans("RemoveFromRubriqueConfirm"), "confirm_delete_categ", '', 'yes', 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER['PHP_SELF']."?rowid=".$rowid."&cat1=".GETPOST("fk_categ")."&orig_account=".$orig_account, $langs->trans("RemoveFromRubrique"), $langs->trans("RemoveFromRubriqueConfirm"), "confirm_delete_categ", '', 'yes', 1);
|
||||
|
||||
}
|
||||
|
||||
print '<form name="update" method="POST" action="'.$_SERVER['PHP_SELF'].'?rowid='.$rowid.'">';
|
||||
|
||||
@ -146,8 +146,8 @@ if ($object->id)
|
||||
*/
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||
|
||||
}
|
||||
|
||||
// Affiche formulaire upload
|
||||
|
||||
@ -436,8 +436,8 @@ else if ($id)
|
||||
*/
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("DeleteTrip"),$langs->trans("ConfirmDeleteTrip"),"confirm_delete");
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("DeleteTrip"),$langs->trans("ConfirmDeleteTrip"),"confirm_delete");
|
||||
|
||||
}
|
||||
|
||||
$soc = new Societe($db);
|
||||
|
||||
@ -217,35 +217,28 @@ if ($action == 'set_encaisse')
|
||||
*/
|
||||
if ($action == 'builddoc')
|
||||
{
|
||||
$donation = new Don($db);
|
||||
$donation->fetch($id);
|
||||
$object = new Don($db);
|
||||
$object->fetch($id);
|
||||
|
||||
if ($_REQUEST['model'])
|
||||
{
|
||||
$donation->setDocModel($user, $_REQUEST['model']);
|
||||
}
|
||||
// Save last template used to generate document
|
||||
if (GETPOST('model')) $object->setDocModel($user, GETPOST('model','alpha'));
|
||||
|
||||
// Define output language
|
||||
$outputlangs = $langs;
|
||||
$newlang='';
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id'];
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$donation->client->default_lang;
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
|
||||
if (! empty($newlang))
|
||||
{
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$result=don_create($db, $donation->id, '', $donation->modelpdf, $outputlangs);
|
||||
$result=don_create($db, $object->id, '', $object->modelpdf, $outputlangs);
|
||||
if ($result <= 0)
|
||||
{
|
||||
dol_print_error($db,$result);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$donation->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc'));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1795,7 +1795,8 @@ else if ($action == 'builddoc') // En get ou en post
|
||||
$object->fetch($id);
|
||||
$object->fetch_thirdparty();
|
||||
|
||||
if (GETPOST('model')) $object->setDocModel($user, GETPOST('model'));
|
||||
// Save last template used to generate document
|
||||
if (GETPOST('model')) $object->setDocModel($user, GETPOST('model','alpha'));
|
||||
if (GETPOST('fk_bank')) $object->fk_bank=GETPOST('fk_bank');
|
||||
|
||||
// Define output language
|
||||
@ -1814,11 +1815,6 @@ else if ($action == 'builddoc') // En get ou en post
|
||||
dol_print_error($db,$result);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc'));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
// Remove file in doc form
|
||||
|
||||
@ -174,8 +174,8 @@ if ($id > 0 || ! empty($ref))
|
||||
*/
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?facid='.$id.'&urlfile='.urlencode(GETPOST("urlfile")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$id.'&urlfile='.urlencode(GETPOST("urlfile")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -211,10 +211,8 @@ if ($action == 'builddoc' && $user->rights->banque->cheque)
|
||||
{
|
||||
$result = $object->fetch($id);
|
||||
|
||||
/*if ($_REQUEST['model'])
|
||||
{
|
||||
$object->setDocModel($user, $_REQUEST['model']);
|
||||
}*/
|
||||
// Save last template used to generate document
|
||||
//if (GETPOST('model')) $object->setDocModel($user, GETPOST('model','alpha'));
|
||||
|
||||
$outputlangs = $langs;
|
||||
$newlang='';
|
||||
@ -306,8 +304,8 @@ else
|
||||
*/
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("DeleteCheckReceipt"), $langs->trans("ConfirmDeleteCheckReceipt"), 'confirm_delete','','',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("DeleteCheckReceipt"), $langs->trans("ConfirmDeleteCheckReceipt"), 'confirm_delete','','',1);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@ -315,8 +313,8 @@ else
|
||||
*/
|
||||
if ($action == 'valide')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("ValidateCheckReceipt"), $langs->trans("ConfirmValidateCheckReceipt"), 'confirm_valide','','',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("ValidateCheckReceipt"), $langs->trans("ConfirmValidateCheckReceipt"), 'confirm_valide','','',1);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -192,8 +192,8 @@ dol_fiche_head($head, $hselected, $langs->trans("PaymentCustomerInvoice"), 0, 'p
|
||||
*/
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@ -202,8 +202,8 @@ if ($action == 'delete')
|
||||
if ($action == 'valide')
|
||||
{
|
||||
$facid = $_GET['facid'];
|
||||
$ret=$form->form_confirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -55,10 +55,10 @@ if ($action == 'builddoc')
|
||||
$rap = new pdf_paiement($db);
|
||||
|
||||
$outputlangs = $langs;
|
||||
if (! empty($_REQUEST['lang_id']))
|
||||
if (! empty(GETPOST('lang_id')))
|
||||
{
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($_REQUEST['lang_id']);
|
||||
$outputlangs->setDefaultLang(GETPOST('lang_id'));
|
||||
}
|
||||
|
||||
// We save charset_output to restore it because write_file can change it if needed for
|
||||
|
||||
@ -146,8 +146,8 @@ dol_fiche_head($head, $hselected, $langs->trans("PaymentSocialContribution"), 0,
|
||||
*/
|
||||
if ($_GET['action'] == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm('fiche.php?id='.$paiement->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm('fiche.php?id='.$paiement->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete','',0,2);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@ -156,8 +156,8 @@ if ($_GET['action'] == 'delete')
|
||||
if ($_GET['action'] == 'valide')
|
||||
{
|
||||
$facid = $_GET['facid'];
|
||||
$ret=$form->form_confirm('fiche.php?id='.$paiement->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm('fiche.php?id='.$paiement->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide','',0,2);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -150,8 +150,8 @@ if ($id > 0)
|
||||
|
||||
/*if ($action == 'credite')
|
||||
{
|
||||
$ret=$form->form_confirm("fiche.php?id=".$bon->id,$langs->trans("ClassCredited"),$langs->trans("ClassCreditedConfirm"),"confirm_credite",'',1,1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm("fiche.php?id=".$bon->id,$langs->trans("ClassCredited"),$langs->trans("ClassCreditedConfirm"),"confirm_credite",'',1,1);
|
||||
|
||||
}*/
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
@ -723,6 +723,22 @@ class Contact extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
// Remove category
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_contact WHERE fk_socpeople = ".$rowid;
|
||||
dol_syslog(get_class($this)."::delete sql=".$sql);
|
||||
$resql=$this->db->query($sql);
|
||||
if (! $resql)
|
||||
{
|
||||
$error++;
|
||||
$this->error .= $this->db->lasterror();
|
||||
$errorflag=-1;
|
||||
dol_syslog(get_class($this)."::delete erreur ".$errorflag." ".$this->error, LOG_ERR);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."socpeople";
|
||||
|
||||
@ -343,8 +343,8 @@ else
|
||||
{
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$_GET["id"],$langs->trans("DeleteContact"),$langs->trans("ConfirmDeleteContact"),"confirm_delete",'',0,1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$_GET["id"],$langs->trans("DeleteContact"),$langs->trans("ConfirmDeleteContact"),"confirm_delete",'',0,1);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -839,8 +839,8 @@ else
|
||||
if ($object->socid > 0) $text.=$langs->trans("UserWillBeExternalUser");
|
||||
else $text.=$langs->trans("UserWillBeInternalUser");
|
||||
}
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("CreateDolibarrLogin"),$text,"confirm_create_user",$formquestion,'yes');
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("CreateDolibarrLogin"),$text,"confirm_create_user",$formquestion,'yes');
|
||||
|
||||
}
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
@ -122,7 +122,7 @@ $sql.= " cp.code as country_code";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as p";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_pays as cp ON cp.rowid = p.fk_pays";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = p.fk_soc";
|
||||
if (! empty($search_categ)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_contact as cs ON s.rowid = cs.fk_socpeople"; // We need this table joined to the select in order to filter by categ
|
||||
if (! empty($search_categ)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_contact as cs ON p.rowid = cs.fk_socpeople"; // We need this table joined to the select in order to filter by categ
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc";
|
||||
$sql.= ' WHERE p.entity IN ('.getEntity('societe', 1).')';
|
||||
if (!$user->rights->societe->client->voir && !$socid) //restriction
|
||||
|
||||
@ -145,8 +145,8 @@ if ($object->id)
|
||||
*/
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$id.'&urlfile='.urlencode(GETPOST("urlfile")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$id.'&urlfile='.urlencode(GETPOST("urlfile")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -947,8 +947,8 @@ else
|
||||
*/
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("DeleteAContract"),$langs->trans("ConfirmDeleteAContract"),"confirm_delete",'',0,1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("DeleteAContract"),$langs->trans("ConfirmDeleteAContract"),"confirm_delete",'',0,1);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@ -968,8 +968,8 @@ else
|
||||
|
||||
$text=$langs->trans('ConfirmValidateContract',$numref);
|
||||
|
||||
$ret=$form->form_confirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("ValidateAContract"),$text,"confirm_valid",'',0,1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("ValidateAContract"),$text,"confirm_valid",'',0,1);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@ -977,8 +977,8 @@ else
|
||||
*/
|
||||
if ($action == 'close')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("CloseAContract"),$langs->trans("ConfirmCloseContract"),"confirm_close",'',0,1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("CloseAContract"),$langs->trans("ConfirmCloseContract"),"confirm_close",'',0,1);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1314,7 +1314,7 @@ else
|
||||
*/
|
||||
if ($action == 'deleteline' && ! $_REQUEST["cancel"] && $user->rights->contrat->creer && $object->lines[$cursorline-1]->id == GETPOST('rowid'))
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".GETPOST('rowid'),$langs->trans("DeleteContractLine"),$langs->trans("ConfirmDeleteContractLine"),"confirm_deleteline",'',0,1);
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&lineid=".GETPOST('rowid'),$langs->trans("DeleteContractLine"),$langs->trans("ConfirmDeleteContractLine"),"confirm_deleteline",'',0,1);
|
||||
if ($ret == 'html') print '<table class="notopnoleftnoright" width="100%"><tr '.$bc[false].' height="6"><td></td></tr></table>';
|
||||
}
|
||||
|
||||
|
||||
@ -2471,10 +2471,11 @@ class Form
|
||||
* @param string $action Action
|
||||
* @param array $formquestion An array with forms complementary inputs
|
||||
* @param string $selectedchoice "" or "no" or "yes"
|
||||
* @param int $useajax 0=No, 1=Yes, 2=Yes but submit page with &confirm=no if choice is No
|
||||
* @param int $useajax 0=No, 1=Yes, 2=Yes but submit page with &confirm=no if choice is No, 'xxx'=preoutput confirm box with div id=dialog-confirm-xxx
|
||||
* @param int $height Force height of box
|
||||
* @param int $width Force width of box
|
||||
* @return void
|
||||
* @deprecated
|
||||
*/
|
||||
function form_confirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0, $height=170, $width=500)
|
||||
{
|
||||
@ -2482,7 +2483,15 @@ class Form
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a confirmation HTML form or AJAX popup
|
||||
* Show a confirmation HTML form or AJAX popup.
|
||||
* Easiest way to use this is with useajax=1.
|
||||
* If you use useajax='xxx', you must also add jquery code to trigger opening of box (with correct parameters)
|
||||
* just after calling this method. For example:
|
||||
* print '<script type="text/javascript">'."\n";
|
||||
* print 'jQuery(document).ready(function() {'."\n";
|
||||
* print 'jQuery(".xxxlink").click(function(e) { jQuery("#aparamid").val(jQuery(this).attr("rel")); jQuery("#dialog-confirm-xxx").dialog("open"); return false; });'."\n";
|
||||
* print '});'."\n";
|
||||
* print '</script>'."\n";
|
||||
*
|
||||
* @param string $page Url of page to call if confirmation is OK
|
||||
* @param string $title Title
|
||||
@ -2578,7 +2587,9 @@ class Form
|
||||
$more.='</table>'."\n";
|
||||
}
|
||||
|
||||
if (! empty($conf->dol_use_jmobile)) $useajax=0; // JQUI method dialog is broken with jmobile, we use standard HTML. We also change code for button to have get on url with action=xxx and output confirm only when action=xxx
|
||||
// JQUI method dialog is broken with jmobile, we use standard HTML.
|
||||
// Note: When using dol_use_jmobile, you must also check code for button use a GET url with action=xxx and output the confirm code only when action=xxx
|
||||
if (! empty($conf->dol_use_jmobile)) $useajax=0;
|
||||
|
||||
if ($useajax && $conf->use_javascript_ajax)
|
||||
{
|
||||
|
||||
@ -585,7 +585,7 @@ function cleanSerialize(expr) {
|
||||
var reg = new RegExp("(&)", "g");
|
||||
var reg2 = new RegExp("[^A-Z0-9,]", "g");
|
||||
var liste1 = expr.replace(reg, ",");
|
||||
return liste = liste1.replace(reg2, "");
|
||||
return liste1.replace(reg2, "");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1033,7 +1033,7 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl
|
||||
}
|
||||
|
||||
// Add an additional description for the category products
|
||||
if (! empty($conf->categorie->enabled))
|
||||
if (! empty($conf->global->CATEGORY_ADD_DESC_INTO_DOC) && $idprod && ! empty($conf->categorie->enabled))
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
$categstatic=new Categorie($db);
|
||||
|
||||
@ -209,6 +209,9 @@ if ($action=='inactive')
|
||||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
$formCron = new FormCron($db);
|
||||
|
||||
llxHeader('',$langs->trans("CronAdd"));
|
||||
|
||||
if ($action=='edit' || empty($action) || $action=='delete' || $action=='execute')
|
||||
@ -244,19 +247,16 @@ if ($conf->use_javascript_ajax)
|
||||
print '</script>'."\n";
|
||||
}
|
||||
|
||||
$form = new Form($db);
|
||||
$formCron = new FormCron($db);
|
||||
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("CronDelete"),$langs->trans("CronConfirmDelete"),"confirm_delete",'','',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("CronDelete"),$langs->trans("CronConfirmDelete"),"confirm_delete",'','',1);
|
||||
|
||||
$action='';
|
||||
}
|
||||
|
||||
if ($action == 'execute'){
|
||||
$ret=$form->form_confirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("CronExecute"),$langs->trans("CronConfirmExecute"),"confirm_execute",'','',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("CronExecute"),$langs->trans("CronConfirmExecute"),"confirm_execute",'','',1);
|
||||
|
||||
$action='';
|
||||
}
|
||||
|
||||
|
||||
@ -122,14 +122,14 @@ print $langs->trans('CronInfo');
|
||||
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER['PHP_SELF']."?id=".$id.'&status='.$status,$langs->trans("CronDelete"),$langs->trans("CronConfirmDelete"),"confirm_delete",'','',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$id.'&status='.$status,$langs->trans("CronDelete"),$langs->trans("CronConfirmDelete"),"confirm_delete",'','',1);
|
||||
|
||||
}
|
||||
|
||||
if ($action == 'execute')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER['PHP_SELF']."?id=".$id.'&status='.$status,$langs->trans("CronExecute"),$langs->trans("CronConfirmExecute"),"confirm_execute",'','',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$id.'&status='.$status,$langs->trans("CronExecute"),$langs->trans("CronConfirmExecute"),"confirm_execute",'','',1);
|
||||
|
||||
}
|
||||
|
||||
// liste des jobs creer
|
||||
|
||||
@ -204,8 +204,8 @@ if (empty($action) || $action == 'delete_section')
|
||||
// Confirmation de la suppression d'une ligne categorie
|
||||
if ($action == 'delete_section')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?section='.$section, $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection',$ecmdir->label), 'confirm_deletesection');
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.$section, $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection',$ecmdir->label), 'confirm_deletesection');
|
||||
|
||||
}
|
||||
|
||||
// Construit fiche rubrique
|
||||
|
||||
@ -252,8 +252,8 @@ print '</div>';
|
||||
// Confirmation de la suppression d'une ligne categorie
|
||||
if ($_GET['action'] == 'delete_file')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?section='.urlencode($_GET["section"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile',$urlfile), 'confirm_deletefile', '', 1, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.urlencode($_GET["section"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile',$urlfile), 'confirm_deletefile', '', 1, 1);
|
||||
|
||||
}
|
||||
|
||||
if ($_GET["action"] != 'edit')
|
||||
|
||||
@ -334,16 +334,16 @@ if ($action != 'edit' && $action != 'delete')
|
||||
// Confirm remove file
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?section='.$_REQUEST["section"].'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile');
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.$_REQUEST["section"].'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile');
|
||||
|
||||
}
|
||||
|
||||
// Confirm remove file
|
||||
if ($action == 'delete_dir')
|
||||
{
|
||||
$relativepathwithoutslash=preg_replace('/[\/]$/','',$relativepath);
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?section='.$_REQUEST["section"], $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection',$relativepathwithoutslash), 'confirm_deletedir', '', 1, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.$_REQUEST["section"], $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection',$relativepathwithoutslash), 'confirm_deletedir', '', 1, 1);
|
||||
|
||||
}
|
||||
|
||||
$formfile=new FormFile($db);
|
||||
|
||||
@ -112,8 +112,8 @@ print_fiche_titre($langs->trans("ECMAutoOrg"));
|
||||
*/
|
||||
if ($_GET['action'] == 'delete_file')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?socid='.$socid.'&urlfile='.urldecode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile');
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?socid='.$socid.'&urlfile='.urldecode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile');
|
||||
|
||||
}
|
||||
|
||||
// Construit liste des fichiers
|
||||
|
||||
@ -405,8 +405,8 @@ print '</div>';
|
||||
// Confirm remove file (for non javascript users)
|
||||
if ($action == 'delete' && empty($conf->use_javascript_ajax))
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?section='.$section.'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile','','',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.$section.'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile','','',1);
|
||||
|
||||
}
|
||||
|
||||
dol_htmloutput_mesg($mesg);
|
||||
@ -455,8 +455,8 @@ print '</div>';
|
||||
// Confirmation de la suppression d'une ligne categorie
|
||||
if ($action == 'delete_section')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?section='.$section, $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection',$ecmdir->label), 'confirm_deletesection','','',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?section='.$section, $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection',$ecmdir->label), 'confirm_deletesection','','',1);
|
||||
|
||||
}
|
||||
// End confirm
|
||||
|
||||
|
||||
@ -294,10 +294,9 @@ else if ($action == 'settrackingnumber' || $action == 'settrackingurl'
|
||||
// Build document
|
||||
else if ($action == 'builddoc') // En get ou en post
|
||||
{
|
||||
if (GETPOST('model','alpha'))
|
||||
{
|
||||
$object->setDocModel($user, GETPOST('model','alpha'));
|
||||
}
|
||||
|
||||
// Save last template used to generate document
|
||||
if (GETPOST('model')) $object->setDocModel($user, GETPOST('model','alpha'));
|
||||
|
||||
// Define output language
|
||||
$outputlangs = $langs;
|
||||
@ -924,8 +923,8 @@ else
|
||||
*/
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('DeleteSending'),$langs->trans("ConfirmDeleteSending",$object->ref),'confirm_delete','',0,1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('DeleteSending'),$langs->trans("ConfirmDeleteSending",$object->ref),'confirm_delete','',0,1);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@ -953,16 +952,16 @@ else
|
||||
$text.=$notify->confirmMessage('SHIPPING_VALIDATE',$object->socid);
|
||||
}
|
||||
|
||||
$ret=$form->form_confirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('ValidateSending'),$text,'confirm_valid','',0,1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('ValidateSending'),$text,'confirm_valid','',0,1);
|
||||
|
||||
}
|
||||
/*
|
||||
* Confirmation de l'annulation
|
||||
*/
|
||||
if ($action == 'annuler')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('CancelSending'),$langs->trans("ConfirmCancelSending",$object->ref),'confirm_cancel','',0,1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('CancelSending'),$langs->trans("ConfirmCancelSending",$object->ref),'confirm_cancel','',0,1);
|
||||
|
||||
}
|
||||
|
||||
// Calculate true totalWeight and totalVolume for all products
|
||||
|
||||
@ -152,8 +152,8 @@ if ($id > 0 || ! empty($ref))
|
||||
*/
|
||||
if ($action == 'cloture')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER['PHP_SELF']."?id=".$id,$langs->trans("CloseShipment"),$langs->trans("ConfirmCloseShipment"),"confirm_cloture");
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$id,$langs->trans("CloseShipment"),$langs->trans("ConfirmCloseShipment"),"confirm_cloture");
|
||||
|
||||
}
|
||||
|
||||
// Onglet commande
|
||||
|
||||
@ -225,7 +225,7 @@ if ($step == 1 || $action == 'cleanselect')
|
||||
if ($action == 'builddoc')
|
||||
{
|
||||
// Build export file
|
||||
$result=$objexport->build_file($user, $_POST['model'], $datatoexport, $array_selected, $array_filtervalue);
|
||||
$result=$objexport->build_file($user, GETPOST('model','alpha'), $datatoexport, $array_selected, $array_filtervalue);
|
||||
if ($result < 0)
|
||||
{
|
||||
setEventMessage($objexport->error, 'errors');
|
||||
@ -1025,8 +1025,8 @@ if ($step == 5 && $datatoexport)
|
||||
*/
|
||||
if ($action == 'remove_file')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?step=5&datatoexport='.$datatoexport.'&file='.urlencode(GETPOST("file")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?step=5&datatoexport='.$datatoexport.'&file='.urlencode(GETPOST("file")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||
|
||||
}
|
||||
|
||||
print '<table width="100%" class="border">';
|
||||
|
||||
@ -146,8 +146,8 @@ if ($object->id)
|
||||
*/
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||
|
||||
}
|
||||
|
||||
// Affiche formulaire upload
|
||||
|
||||
@ -333,10 +333,8 @@ else if ($action == 'builddoc' && $user->rights->ficheinter->creer) // En get ou
|
||||
$object->fetch_thirdparty();
|
||||
$object->fetch_lines();
|
||||
|
||||
if (GETPOST('model','alpha'))
|
||||
{
|
||||
$object->setDocModel($user, GETPOST('model','alpha'));
|
||||
}
|
||||
// Save last template used to generate document
|
||||
if (GETPOST('model')) $object->setDocModel($user, GETPOST('model','alpha'));
|
||||
|
||||
// Define output language
|
||||
$outputlangs = $langs;
|
||||
@ -1136,8 +1134,8 @@ else if ($id > 0 || ! empty($ref))
|
||||
// Confirmation de la suppression de la fiche d'intervention
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteIntervention'), $langs->trans('ConfirmDeleteIntervention'), 'confirm_delete','',0,1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteIntervention'), $langs->trans('ConfirmDeleteIntervention'), 'confirm_delete','',0,1);
|
||||
|
||||
}
|
||||
|
||||
// Confirmation validation
|
||||
@ -1160,22 +1158,22 @@ else if ($id > 0 || ! empty($ref))
|
||||
}
|
||||
$text=$langs->trans('ConfirmValidateIntervention',$numref);
|
||||
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateIntervention'), $text, 'confirm_validate','',0,1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateIntervention'), $text, 'confirm_validate','',0,1);
|
||||
|
||||
}
|
||||
|
||||
// Confirmation de la validation de la fiche d'intervention
|
||||
if ($action == 'modify')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ModifyIntervention'), $langs->trans('ConfirmModifyIntervention'), 'confirm_modify','',0,1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ModifyIntervention'), $langs->trans('ConfirmModifyIntervention'), 'confirm_modify','',0,1);
|
||||
|
||||
}
|
||||
|
||||
// Confirmation de la suppression d'une ligne d'intervention
|
||||
if ($action == 'ask_deleteline')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&line_id='.GETPOST('line_id','int'), $langs->trans('DeleteInterventionLine'), $langs->trans('ConfirmDeleteInterventionLine'), 'confirm_deleteline','',0,1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&line_id='.GETPOST('line_id','int'), $langs->trans('DeleteInterventionLine'), $langs->trans('ConfirmDeleteInterventionLine'), 'confirm_deleteline','',0,1);
|
||||
|
||||
}
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
@ -181,8 +181,8 @@ if ($object->id > 0)
|
||||
*/
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||
|
||||
}
|
||||
|
||||
// Affiche formulaire upload
|
||||
|
||||
@ -628,13 +628,9 @@ else if ($action == 'builddoc' && $user->rights->fournisseur->commande->creer) /
|
||||
{
|
||||
// Build document
|
||||
|
||||
// Sauvegarde le dernier module choisi pour generer un document
|
||||
|
||||
if (GETPOST('model'))
|
||||
{
|
||||
$object->setDocModel($user, GETPOST('model'));
|
||||
}
|
||||
|
||||
// Save last template used to generate document
|
||||
if (GETPOST('model')) $object->setDocModel($user, GETPOST('model','alpha'));
|
||||
|
||||
$outputlangs = $langs;
|
||||
if (GETPOST('lang_id'))
|
||||
{
|
||||
@ -647,11 +643,6 @@ else if ($action == 'builddoc' && $user->rights->fournisseur->commande->creer) /
|
||||
dol_print_error($db,$result);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc'));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
// Delete file in doc form
|
||||
@ -1069,8 +1060,8 @@ elseif (! empty($object->id))
|
||||
*/
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete', '', 0, 2);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete', '', 0, 2);
|
||||
|
||||
}
|
||||
|
||||
// Clone confirmation
|
||||
@ -1081,8 +1072,8 @@ elseif (! empty($object->id))
|
||||
//array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1)
|
||||
);
|
||||
// Paiement incomplet. On demande si motif = escompte ou autre
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneOrder'),$langs->trans('ConfirmCloneOrder',$object->ref),'confirm_clone',$formquestion,'yes',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneOrder'),$langs->trans('ConfirmCloneOrder',$object->ref),'confirm_clone',$formquestion,'yes',1);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1105,8 +1096,8 @@ elseif (! empty($object->id))
|
||||
$text.=$notify->confirmMessage('ORDER_SUPPLIER_APPROVE', $object->socid);
|
||||
}
|
||||
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateOrder'), $text, 'confirm_valid', '', 0, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateOrder'), $text, 'confirm_valid', '', 0, 1);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1128,8 +1119,8 @@ elseif (! empty($object->id))
|
||||
);
|
||||
}
|
||||
|
||||
$ret=$form->form_confirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("ApproveThisOrder"),$langs->trans("ConfirmApproveThisOrder",$object->ref),"confirm_approve", $formquestion, 1, 1, 240);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("ApproveThisOrder"),$langs->trans("ConfirmApproveThisOrder",$object->ref),"confirm_approve", $formquestion, 1, 1, 240);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1137,8 +1128,8 @@ elseif (! empty($object->id))
|
||||
*/
|
||||
if ($action == 'refuse')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER['PHP_SELF']."?id=$object->id",$langs->trans("DenyingThisOrder"),$langs->trans("ConfirmDenyingThisOrder",$object->ref),"confirm_refuse", '', 0, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER['PHP_SELF']."?id=$object->id",$langs->trans("DenyingThisOrder"),$langs->trans("ConfirmDenyingThisOrder",$object->ref),"confirm_refuse", '', 0, 1);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1146,8 +1137,8 @@ elseif (! empty($object->id))
|
||||
*/
|
||||
if ($action == 'cancel')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER['PHP_SELF']."?id=$object->id",$langs->trans("Cancel"),$langs->trans("ConfirmCancelThisOrder",$object->ref),"confirm_cancel", '', 0, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER['PHP_SELF']."?id=$object->id",$langs->trans("Cancel"),$langs->trans("ConfirmCancelThisOrder",$object->ref),"confirm_cancel", '', 0, 1);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1156,8 +1147,8 @@ elseif (! empty($object->id))
|
||||
if ($action == 'commande')
|
||||
{
|
||||
$date_com = dol_mktime(0,0,0,$_POST["remonth"],$_POST["reday"],$_POST["reyear"]);
|
||||
$ret=$form->form_confirm($_SERVER['PHP_SELF']."?id=".$object->id."&datecommande=".$date_com."&methode=".$_POST["methodecommande"]."&comment=".urlencode($_POST["comment"]), $langs->trans("MakeOrder"),$langs->trans("ConfirmMakeOrder",dol_print_date($date_com,'day')),"confirm_commande",'',0,2);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id."&datecommande=".$date_com."&methode=".$_POST["methodecommande"]."&comment=".urlencode($_POST["comment"]), $langs->trans("MakeOrder"),$langs->trans("ConfirmMakeOrder",dol_print_date($date_com,'day')),"confirm_commande",'',0,2);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1165,8 +1156,8 @@ elseif (! empty($object->id))
|
||||
*/
|
||||
if ($action == 'delete_product_line')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$_GET["lineid"], $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteproductline','',0,2);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$_GET["lineid"], $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteproductline','',0,2);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1240,7 +1231,6 @@ elseif (! empty($object->id))
|
||||
|
||||
// Conditions de reglement par defaut
|
||||
$langs->load('bills');
|
||||
$form = new Form($db);
|
||||
print '<tr><td class="nowrap">';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
|
||||
print $langs->trans('PaymentConditions');
|
||||
@ -1261,7 +1251,6 @@ elseif (! empty($object->id))
|
||||
|
||||
// Mode of payment
|
||||
$langs->load('bills');
|
||||
$form = new Form($db);
|
||||
print '<tr><td class="nowrap">';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
|
||||
print $langs->trans('PaymentMode');
|
||||
|
||||
@ -121,8 +121,8 @@ if ($object->id > 0)
|
||||
*/
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&urlfile='.urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||
|
||||
}
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
@ -86,7 +86,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
*/
|
||||
|
||||
// Action clone object
|
||||
if ($action == 'confirm_clone' && $confirm == 'yes')
|
||||
@ -168,7 +168,7 @@ elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->fourn
|
||||
}
|
||||
}
|
||||
|
||||
elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->fournisseur->facture->creer)
|
||||
elseif ($action == 'confirm_delete_line' && $confirm == 'yes' && $user->rights->fournisseur->facture->creer)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$ret = $object->deleteline(GETPOST('lineid'));
|
||||
@ -898,21 +898,22 @@ if ($action == 'send' && ! $_POST['addfile'] && ! $_POST['removedfile'] && ! $_P
|
||||
}
|
||||
|
||||
// Build document
|
||||
elseif ($action == 'builddoc')
|
||||
elseif ($action == 'builddoc')
|
||||
{
|
||||
// Save modele used
|
||||
// Save modele used
|
||||
$object->fetch($id);
|
||||
$object->fetch_thirdparty();
|
||||
if ($_REQUEST['model'])
|
||||
{
|
||||
$object->setDocModel($user, $_REQUEST['model']);
|
||||
}
|
||||
|
||||
// Save last template used to generate document
|
||||
if (GETPOST('model')) $object->setDocModel($user, GETPOST('model','alpha'));
|
||||
|
||||
$outputlangs = $langs;
|
||||
if (! empty($_REQUEST['lang_id']))
|
||||
$newlang=GETPOST('lang_id','alpha');
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
|
||||
if (! empty($newlang))
|
||||
{
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($_REQUEST['lang_id']);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$result=supplier_invoice_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
if ($result <= 0)
|
||||
@ -920,11 +921,6 @@ elseif ($action == 'builddoc')
|
||||
dol_print_error($db,$result);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc'));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
// Delete file in doc form
|
||||
@ -1373,8 +1369,7 @@ else
|
||||
// Confirmation de la suppression d'une ligne produit
|
||||
if ($action == 'confirm_delete_line')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$_GET["lineid"], $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 1, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$_GET["lineid"], $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_delete_line', '', 1, 1);
|
||||
}
|
||||
|
||||
// Clone confirmation
|
||||
@ -1386,8 +1381,7 @@ else
|
||||
//array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1)
|
||||
);
|
||||
// Paiement incomplet. On demande si motif = escompte ou autre
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneInvoice'),$langs->trans('ConfirmCloneInvoice',$object->ref),'confirm_clone',$formquestion,'yes', 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneInvoice'),$langs->trans('ConfirmCloneInvoice',$object->ref),'confirm_clone',$formquestion,'yes', 1);
|
||||
}
|
||||
|
||||
// Confirmation de la validation
|
||||
@ -1433,22 +1427,22 @@ else
|
||||
array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockIncrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1)));
|
||||
}
|
||||
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, 1, 1, 240);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, 1, 1, 240);
|
||||
|
||||
}
|
||||
|
||||
// Confirmation set paid
|
||||
if ($action == 'paid')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', 0, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', 0, 1);
|
||||
|
||||
}
|
||||
|
||||
// Confirmation de la suppression de la facture fournisseur
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteBill'), $langs->trans('ConfirmDeleteBill'), 'confirm_delete', '', 0, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteBill'), $langs->trans('ConfirmDeleteBill'), 'confirm_delete', '', 0, 1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1638,7 +1632,6 @@ else
|
||||
|
||||
// Conditions de reglement par defaut
|
||||
$langs->load('bills');
|
||||
$form = new Form($db);
|
||||
print '<tr><td class="nowrap">';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
|
||||
print $langs->trans('PaymentConditions');
|
||||
@ -1659,7 +1652,6 @@ else
|
||||
|
||||
// Mode of payment
|
||||
$langs->load('bills');
|
||||
$form = new Form($db);
|
||||
print '<tr><td class="nowrap">';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
|
||||
print $langs->trans('PaymentMode');
|
||||
@ -1787,7 +1779,7 @@ else
|
||||
|
||||
/*
|
||||
* Lines
|
||||
*/
|
||||
*/
|
||||
print '<br>';
|
||||
print '<table class="noborder" width="100%">';
|
||||
$var=1;
|
||||
@ -1956,7 +1948,10 @@ else
|
||||
print '</td>';
|
||||
|
||||
print '<td align="center" width="16">';
|
||||
if ($object->statut == 0) print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_delete_line&lineid='.$object->lines[$i]->rowid.'">'.img_delete().'</a>';
|
||||
if ($object->statut == 0)
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_delete_line&lineid='.$object->lines[$i]->rowid.'">'.img_delete().'</a>';
|
||||
}
|
||||
else print ' ';
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -161,8 +161,8 @@ if ($result > 0)
|
||||
*/
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete');
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete');
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@ -170,8 +170,8 @@ if ($result > 0)
|
||||
*/
|
||||
if ($action == 'valide')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide');
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide');
|
||||
|
||||
}
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
@ -341,4 +341,4 @@ dol_fiche_end();
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
?>
|
||||
?>
|
||||
|
||||
@ -403,15 +403,15 @@ else
|
||||
// Confirm remove file
|
||||
if ($_GET['action'] == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?numero_ftp='.$numero_ftp.'§ion='.urlencode($_REQUEST["section"]).'&file='.urlencode($_GET["file"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile','','',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?numero_ftp='.$numero_ftp.'§ion='.urlencode($_REQUEST["section"]).'&file='.urlencode($_GET["file"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile','','',1);
|
||||
|
||||
}
|
||||
|
||||
// Confirmation de la suppression d'une ligne categorie
|
||||
if ($_GET['action'] == 'delete_section')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?numero_ftp='.$numero_ftp.'§ion='.urlencode($_REQUEST["section"]).'&file='.urlencode($_GET["file"]), $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection',$ecmdir->label), 'confirm_deletesection','','',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?numero_ftp='.$numero_ftp.'§ion='.urlencode($_REQUEST["section"]).'&file='.urlencode($_GET["file"]), $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection',$ecmdir->label), 'confirm_deletesection','','',1);
|
||||
|
||||
}
|
||||
|
||||
print $langs->trans("Server").': <b>'.$ftp_server.'</b><br>';
|
||||
|
||||
@ -832,7 +832,7 @@ else
|
||||
if ($action == 'delete' && $cp->statut == 1) {
|
||||
if($user->rights->holiday->delete)
|
||||
{
|
||||
$ret=$form->form_confirm("fiche.php?id=".$id,$langs->trans("TitleDeleteCP"),$langs->trans("ConfirmDeleteCP"),"confirm_delete", '', 0, 1);
|
||||
print $form->formconfirm("fiche.php?id=".$id,$langs->trans("TitleDeleteCP"),$langs->trans("ConfirmDeleteCP"),"confirm_delete", '', 0, 1);
|
||||
if ($ret == 'html') print '<br />';
|
||||
}
|
||||
}
|
||||
@ -840,14 +840,14 @@ else
|
||||
// Si envoi en validation
|
||||
if ($action == 'sendToValidate' && $cp->statut == 1 && $user->id == $cp->fk_user)
|
||||
{
|
||||
$ret=$form->form_confirm("fiche.php?id=".$id,$langs->trans("TitleToValidCP"),$langs->trans("ConfirmToValidCP"),"confirm_send", '', 1, 1);
|
||||
print $form->formconfirm("fiche.php?id=".$id,$langs->trans("TitleToValidCP"),$langs->trans("ConfirmToValidCP"),"confirm_send", '', 1, 1);
|
||||
if ($ret == 'html') print '<br />';
|
||||
}
|
||||
|
||||
// Si validation de la demande
|
||||
if ($action == 'valid' && $cp->statut == 2 && $user->id == $cp->fk_validator)
|
||||
{
|
||||
$ret=$form->form_confirm("fiche.php?id=".$id,$langs->trans("TitleValidCP"),$langs->trans("ConfirmValidCP"),"confirm_valid", '', 1, 1);
|
||||
print $form->formconfirm("fiche.php?id=".$id,$langs->trans("TitleValidCP"),$langs->trans("ConfirmValidCP"),"confirm_valid", '', 1, 1);
|
||||
if ($ret == 'html') print '<br />';
|
||||
}
|
||||
|
||||
@ -855,14 +855,14 @@ else
|
||||
if ($action == 'refuse' && $cp->statut == 2 && $user->id == $cp->fk_validator)
|
||||
{
|
||||
$array_input = array(array('type'=>"text",'label'=> $langs->trans('DetailRefusCP'),'name'=>"detail_refuse",'size'=>"50",'value'=>""));
|
||||
$ret=$form->form_confirm("fiche.php?id=".$id."&action=confirm_refuse", $langs->trans("TitleRefuseCP"), $langs->trans('ConfirmRefuseCP'), "confirm_refuse", $array_input, 1, 0);
|
||||
print $form->formconfirm("fiche.php?id=".$id."&action=confirm_refuse", $langs->trans("TitleRefuseCP"), $langs->trans('ConfirmRefuseCP'), "confirm_refuse", $array_input, 1, 0);
|
||||
if ($ret == 'html') print '<br />';
|
||||
}
|
||||
|
||||
// Si annulation de la demande
|
||||
if ($action == 'cancel' && $cp->statut == 2 && ($user->id == $cp->fk_validator || $user->id == $cp->fk_user))
|
||||
{
|
||||
$ret=$form->form_confirm("fiche.php?id=".$id,$langs->trans("TitleCancelCP"),$langs->trans("ConfirmCancelCP"),"confirm_cancel", '', 1, 1);
|
||||
print $form->formconfirm("fiche.php?id=".$id,$langs->trans("TitleCancelCP"),$langs->trans("ConfirmCancelCP"),"confirm_cancel", '', 1, 1);
|
||||
if ($ret == 'html') print '<br />';
|
||||
}
|
||||
|
||||
|
||||
@ -135,7 +135,7 @@ if ($action=='downfield' || $action=='upfield')
|
||||
if ($action == 'builddoc')
|
||||
{
|
||||
// Build import file
|
||||
$result=$objimport->build_file($user, $_POST['model'], $datatoimport, $array_match_file_to_database);
|
||||
$result=$objimport->build_file($user, GETPOST('model','alpha'), $datatoimport, $array_match_file_to_database);
|
||||
if ($result < 0)
|
||||
{
|
||||
$mesg='<div class="error">'.$objimport->error.'</div>';
|
||||
@ -481,8 +481,8 @@ if ($step == 3 && $datatoimport)
|
||||
*/
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?urlfile='.urlencode(GETPOST('urlfile')).'&step=3'.$param, $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?urlfile='.urlencode(GETPOST('urlfile')).'&step=3'.$param, $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||
|
||||
}
|
||||
|
||||
print '<table width="100%" class="border">';
|
||||
|
||||
@ -95,3 +95,4 @@ ReplenishmentOrders=Replenishment orders
|
||||
UseVirtualStock=Use virtual stock instead of physical stock
|
||||
RuleForStockReplenishment=Rule for stocks replenishment
|
||||
SelectProduct=Select at least one product
|
||||
AlertOnly= Alerts only
|
||||
|
||||
@ -95,3 +95,4 @@ ReplenishmentOrders=Commandes de réapprovisionnement
|
||||
UseVirtualStock=Utiliser le stock théorique à la place du stock physique
|
||||
RuleForStockReplenishment=Règle de gestion du réapprovisionnement des stocks
|
||||
SelectProduct=Sélectionnez au moins un produit
|
||||
AlertOnly = Alertes seulement
|
||||
|
||||
@ -184,15 +184,13 @@ if ($action == 'builddoc') // En get ou en post
|
||||
$object->fetch($id);
|
||||
$object->fetch_thirdparty();
|
||||
|
||||
if ($_REQUEST['model'])
|
||||
{
|
||||
$object->setDocModel($user, $_REQUEST['model']);
|
||||
}
|
||||
// Save last template used to generate document
|
||||
if (GETPOST('model')) $object->setDocModel($user, GETPOST('model','alpha'));
|
||||
|
||||
// Define output language
|
||||
$outputlangs = $langs;
|
||||
$newlang='';
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id'];
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id')) $newlang=GETPOST('lang_id');
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
|
||||
if (! empty($newlang))
|
||||
{
|
||||
@ -490,8 +488,8 @@ else
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$expedition_id = $_GET["expid"];
|
||||
$ret=$form->form_confirm($_SERVER['PHP_SELF'].'?id='.$delivery->id.'&expid='.$expedition_id,$langs->trans("DeleteDeliveryReceipt"),$langs->trans("DeleteDeliveryReceiptConfirm",$delivery->ref),'confirm_delete','','',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$delivery->id.'&expid='.$expedition_id,$langs->trans("DeleteDeliveryReceipt"),$langs->trans("DeleteDeliveryReceiptConfirm",$delivery->ref),'confirm_delete','','',1);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@ -500,8 +498,8 @@ else
|
||||
*/
|
||||
if ($action == 'valid')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER['PHP_SELF'].'?id='.$delivery->id,$langs->trans("ValidateDeliveryReceipt"),$langs->trans("ValidateDeliveryReceiptConfirm",$delivery->ref),'confirm_valid','','',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$delivery->id,$langs->trans("ValidateDeliveryReceipt"),$langs->trans("ValidateDeliveryReceiptConfirm",$delivery->ref),'confirm_valid','','',1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -157,7 +157,6 @@ $productstatic = new Product($db);
|
||||
$form = new Form($db);
|
||||
|
||||
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||
$form = new Form($db);
|
||||
|
||||
|
||||
dol_htmloutput_errors($mesg);
|
||||
|
||||
@ -303,7 +303,9 @@ else
|
||||
print_liste_field_titre($langs->trans("DateModification"), $_SERVER["PHP_SELF"], "p.tms",$param,"",'align="center"',$sortfield,$sortorder);
|
||||
if (! empty($conf->service->enabled) && $type != 0) print_liste_field_titre($langs->trans("Duration"), $_SERVER["PHP_SELF"], "p.duration",$param,"",'align="center"',$sortfield,$sortorder);
|
||||
if (empty($conf->global->PRODUIT_MULTIPRICES)) print_liste_field_titre($langs->trans("SellingPrice"), $_SERVER["PHP_SELF"], "p.price",$param,"",'align="right"',$sortfield,$sortorder);
|
||||
print '<td class="liste_titre" align="right">'.$langs->trans("BuyingPriceMinShort").'</td>';
|
||||
if ($user->rights->produit->creer) {
|
||||
print '<td class="liste_titre" align="right">'.$langs->trans("BuyingPriceMinShort").'</td>';
|
||||
}
|
||||
if (! empty($conf->stock->enabled) && $user->rights->stock->lire && $type != 1) print '<td class="liste_titre" align="right">'.$langs->trans("DesiredStock").'</td>';
|
||||
if (! empty($conf->stock->enabled) && $user->rights->stock->lire && $type != 1) print '<td class="liste_titre" align="right">'.$langs->trans("PhysicalStock").'</td>';
|
||||
print_liste_field_titre($langs->trans("Sell"), $_SERVER["PHP_SELF"], "p.tosell",$param,"",'align="right"',$sortfield,$sortorder);
|
||||
@ -345,9 +347,11 @@ else
|
||||
}
|
||||
|
||||
// Minimum buying Price
|
||||
print '<td class="liste_titre">';
|
||||
print ' ';
|
||||
print '</td>';
|
||||
if ($user->rights->produit->creer) {
|
||||
print '<td class="liste_titre">';
|
||||
print ' ';
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Stock
|
||||
if (! empty($conf->stock->enabled) && $user->rights->stock->lire && $type != 1)
|
||||
@ -442,21 +446,23 @@ else
|
||||
}
|
||||
|
||||
// Better buy price
|
||||
print '<td align="right">';
|
||||
if ($objp->minsellprice != '')
|
||||
{
|
||||
//print price($objp->minsellprice).' '.$langs->trans("HT");
|
||||
if ($product_fourn->find_min_price_product_fournisseur($objp->rowid) > 0)
|
||||
if ($user->rights->produit->creer) {
|
||||
print '<td align="right">';
|
||||
if ($objp->minsellprice != '')
|
||||
{
|
||||
if ($product_fourn->product_fourn_price_id > 0)
|
||||
{
|
||||
$htmltext=$product_fourn->display_price_product_fournisseur();
|
||||
if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire) print $form->textwithpicto(price($product_fourn->fourn_unitprice).' '.$langs->trans("HT"),$htmltext);
|
||||
else print price($product_fourn->fourn_unitprice).' '.$langs->trans("HT");
|
||||
}
|
||||
//print price($objp->minsellprice).' '.$langs->trans("HT");
|
||||
if ($product_fourn->find_min_price_product_fournisseur($objp->rowid) > 0)
|
||||
{
|
||||
if ($product_fourn->product_fourn_price_id > 0)
|
||||
{
|
||||
$htmltext=$product_fourn->display_price_product_fournisseur();
|
||||
if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire) print $form->textwithpicto(price($product_fourn->fourn_unitprice).' '.$langs->trans("HT"),$htmltext);
|
||||
else print price($product_fourn->fourn_unitprice).' '.$langs->trans("HT");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
print '</td>';
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Show stock
|
||||
if (! empty($conf->stock->enabled) && $user->rights->stock->lire && $type != 1)
|
||||
|
||||
@ -96,8 +96,8 @@ if ($object->id)
|
||||
*/
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&file='.$_GET["file"], $langs->trans('DeletePicture'), $langs->trans('ConfirmDeletePicture'), 'confirm_delete', '', 0, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&file='.$_GET["file"], $langs->trans('DeletePicture'), $langs->trans('ConfirmDeletePicture'), 'confirm_delete', '', 0, 1);
|
||||
|
||||
}
|
||||
|
||||
print($mesg);
|
||||
|
||||
@ -240,9 +240,7 @@ else
|
||||
// Confirm delete third party
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$form = new Form($db);
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("DeleteAWarehouse"),$langs->trans("ConfirmDeleteWarehouse",$object->libelle),"confirm_delete",'',0,2);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("DeleteAWarehouse"),$langs->trans("ConfirmDeleteWarehouse",$object->libelle),"confirm_delete",'',0,2);
|
||||
}
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
@ -117,7 +117,7 @@ function ordered($product_id)
|
||||
} else {
|
||||
$error = $db->lasterror();
|
||||
dol_print_error($db);
|
||||
dol_syslog('replenish.php: ' . $error, LOG_ERROR);
|
||||
dol_syslog('replenish.php: ' . $error, LOG_ERR);
|
||||
|
||||
return $langs->trans('error');
|
||||
}
|
||||
|
||||
@ -47,6 +47,7 @@ $snom = GETPOST('snom', 'alpha');
|
||||
$sall = GETPOST('sall', 'alpha');
|
||||
$type = GETPOST('type','int');
|
||||
$tobuy = GETPOST('tobuy', 'int');
|
||||
$salert = GETPOST('salert', 'alpha');
|
||||
|
||||
$sortfield = GETPOST('sortfield','alpha');
|
||||
$sortorder = GETPOST('sortorder','alpha');
|
||||
@ -66,9 +67,16 @@ $offset = $limit * $page ;
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (isset($_POST['button_removefilter']) || isset($_POST['valid'])) {
|
||||
$sref = '';
|
||||
$snom = '';
|
||||
$sal = '';
|
||||
$salert = '';
|
||||
}
|
||||
|
||||
//orders creation
|
||||
//FIXME: could go in the lib
|
||||
if ($action == 'order') {
|
||||
if ($action == 'order' && isset($_POST['valid'])) {
|
||||
$linecount = GETPOST('linecount', 'int');
|
||||
$box = 0;
|
||||
unset($_POST['linecount']);
|
||||
@ -105,7 +113,7 @@ if ($action == 'order') {
|
||||
} else {
|
||||
$error=$db->lasterror();
|
||||
dol_print_error($db);
|
||||
dol_syslog('replenish.php: '.$error, LOG_ERROR);
|
||||
dol_syslog('replenish.php: '.$error, LOG_ERR);
|
||||
}
|
||||
$db->free($resql);
|
||||
unset($_POST['fourn' . $i]);
|
||||
@ -152,7 +160,7 @@ $title = $langs->trans('Status');
|
||||
$sql = 'SELECT p.rowid, p.ref, p.label, p.price';
|
||||
$sql .= ', p.price_ttc, p.price_base_type,p.fk_product_type';
|
||||
$sql .= ', p.tms as datem, p.duration, p.tobuy, p.seuil_stock_alerte,';
|
||||
$sql .= ' SUM(s.reel) as stock_physique';
|
||||
$sql .= ' SUM(COALESCE(s.reel, 0)) as stock_physique';
|
||||
$sql .= ', p.desiredstock';
|
||||
$sql .= ' FROM ' . MAIN_DB_PREFIX . 'product as p';
|
||||
$sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'product_fournisseur_price as pf';
|
||||
@ -175,10 +183,18 @@ if (dol_strlen($type)) {
|
||||
}
|
||||
}
|
||||
if ($sref) {
|
||||
$sql .= ' AND p.ref LIKE "%' . $sref . '%"';
|
||||
//natural search
|
||||
$scrit = explode(' ', $sref);
|
||||
foreach ($scrit as $crit) {
|
||||
$sql .= ' AND p.ref LIKE "%' . $crit . '%"';
|
||||
}
|
||||
}
|
||||
if ($snom) {
|
||||
$sql .= ' AND p.label LIKE "%' . $db->escape($snom) . '%"';
|
||||
//natural search
|
||||
$scrit = explode(' ', $snom);
|
||||
foreach ($scrit as $crit) {
|
||||
$sql .= ' AND p.label LIKE "%' . $db->escape($crit) . '%"';
|
||||
}
|
||||
}
|
||||
|
||||
$sql .= ' AND p.tobuy = 1';
|
||||
@ -190,8 +206,12 @@ $sql .= ' GROUP BY p.rowid, p.ref, p.label, p.price';
|
||||
$sql .= ', p.price_ttc, p.price_base_type,p.fk_product_type, p.tms';
|
||||
$sql .= ', p.duration, p.tobuy, p.seuil_stock_alerte';
|
||||
$sql .= ', p.desiredstock';
|
||||
$sql .= ' HAVING (p.desiredstock > SUM(s.reel) or SUM(s.reel) is NULL)';
|
||||
$sql .= ' HAVING p.desiredstock > SUM(COALESCE(s.reel, 0))';
|
||||
$sql .= ' AND p.desiredstock > 0';
|
||||
if ($salert == 'on') {
|
||||
$sql .= ' AND SUM(COALESCE(s.reel, 0)) < p.seuil_stock_alerte AND p.seuil_stock_alerte is not NULL';
|
||||
$alertchecked = 'checked="checked"';
|
||||
}
|
||||
$sql .= $db->order($sortfield,$sortorder);
|
||||
$sql .= $db->plimit($limit + 1, $offset);
|
||||
$resql = $db->query($sql);
|
||||
@ -199,11 +219,6 @@ $resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
if ($num == 1 && ($sall or $snom or $sref)) {
|
||||
$objp = $db->fetch_object($resql);
|
||||
header('Location: ../fiche.php?id=' . $objp->rowid);
|
||||
exit;
|
||||
}
|
||||
|
||||
$helpurl = 'EN:Module_Stocks_En|FR:Module_Stock|';
|
||||
$helpurl .= 'ES:Módulo_Stocks';
|
||||
@ -216,9 +231,10 @@ if ($resql) {
|
||||
$head[1][1] = $langs->trans("ReplenishmentOrders");
|
||||
$head[1][2] = 'replenishorders';
|
||||
dol_fiche_head($head, 'replenish', $langs->trans('Replenishment'), 0, 'stock');
|
||||
if ($sref || $snom || $sall || GETPOST('search', 'alpha')) {
|
||||
if ($sref || $snom || $sall || $salert || GETPOST('search', 'alpha')) {
|
||||
$filters = '&sref=' . $sref . '&snom=' . $snom;
|
||||
$filters .= '&sall=' . $sall;
|
||||
$filters .= '&sall=' . $sall;
|
||||
$filters .= '&salert=' . $salert;
|
||||
print_barre_liste($texte,
|
||||
$page,
|
||||
'replenish.php',
|
||||
@ -231,7 +247,8 @@ if ($resql) {
|
||||
} else {
|
||||
$filters = '&sref=' . $sref . '&snom=' . $snom;
|
||||
$filters .= '&fourn_id=' . $fourn_id;
|
||||
$filters .= (isset($type)?'&type=' . $type:'');
|
||||
$filters .= (isset($type)?'&type=' . $type:'');
|
||||
$filters .= '&salert=' . $salert;
|
||||
print_barre_liste($texte,
|
||||
$page,
|
||||
'replenish.php',
|
||||
@ -253,7 +270,7 @@ if ($resql) {
|
||||
'<table class="liste" width="100%">';
|
||||
|
||||
$param = (isset($type)? '&type=' . $type : '');
|
||||
$param .= '&fourn_id=' . $fourn_id . '&snom='. $snom;
|
||||
$param .= '&fourn_id=' . $fourn_id . '&snom='. $snom . '&salert=' . $salert;
|
||||
$param .= '&sref=' . $sref;
|
||||
|
||||
// Lignes des titres
|
||||
@ -356,13 +373,15 @@ if ($resql) {
|
||||
'</td>';
|
||||
}
|
||||
echo '<td class="liste_titre"> </td>',
|
||||
'<td class="liste_titre"> </td>',
|
||||
'<td class="liste_titre" align="right">' . $langs->trans('AlertOnly') . ' <input type="checkbox" name="salert" ' . $alertchecked . '></td>',
|
||||
'<td class="liste_titre" align="right"> </td>',
|
||||
'<td class="liste_titre"> </td>',
|
||||
'<td class="liste_titre"> </td>',
|
||||
'<td class="liste_titre" align="right">',
|
||||
'<input type="image" class="liste_titre" name="button_search"',
|
||||
'src="' . DOL_URL_ROOT . '/theme/' . $conf->theme . '/img/search.png" alt="' . $langs->trans("Search") . '">',
|
||||
'<input type="image" class="liste_titre" name="button_removefilter"
|
||||
src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/searchclear.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">',
|
||||
'</td>',
|
||||
'</tr>';
|
||||
|
||||
@ -396,9 +415,6 @@ if ($resql) {
|
||||
$prod->type = $objp->fk_product_type;
|
||||
$ordered = ordered($prod->id);
|
||||
|
||||
if (!$objp->stock_physique) {
|
||||
$objp->stock_physique = 0;
|
||||
}
|
||||
if ($conf->global->USE_VIRTUAL_STOCK) {
|
||||
//compute virtual stock
|
||||
$prod->fetch($prod->id);
|
||||
@ -487,14 +503,15 @@ if ($resql) {
|
||||
'</div>',
|
||||
'<table width="100%">',
|
||||
'<tr><td align="right">',
|
||||
'<input class="butAction" type="submit" value="' . $value . '">',
|
||||
'<input class="butAction" type="submit" name="valid" value="' . $value . '">',
|
||||
'</td></tr></table>',
|
||||
'</form>';
|
||||
|
||||
if ($num > $conf->liste_limit) {
|
||||
if ($sref || $snom || $sall || GETPOST('search', 'alpha')) {
|
||||
if ($sref || $snom || $sall || $salert || GETPOST('search', 'alpha')) {
|
||||
$filters = '&sref=' . $sref . '&snom=' . $snom;
|
||||
$filters .= '&sall=' . $sall;
|
||||
$filters .= '&sall=' . $sall;
|
||||
$filters .= '&salert=' . $salert;
|
||||
print_barre_liste('',
|
||||
$page,
|
||||
'replenish.php',
|
||||
@ -509,7 +526,8 @@ if ($resql) {
|
||||
} else {
|
||||
$filters = '&sref=' . $sref . '&snom=' . $snom;
|
||||
$filters .= '&fourn_id=' . $fourn_id;
|
||||
$filters .= (isset($type)? '&type=' . $type : '');
|
||||
$filters .= (isset($type)? '&type=' . $type : '');
|
||||
$filters .= '&salert=' . $salert;
|
||||
print_barre_liste('',
|
||||
$page,
|
||||
'replenish.php',
|
||||
|
||||
@ -103,10 +103,17 @@ if (!$user->rights->societe->client->voir && !$socid) {
|
||||
$sql .= ' AND s.rowid = sc.fk_soc AND sc.fk_user = ' . $user->id;
|
||||
}
|
||||
if ($sref) {
|
||||
$sql .= ' AND cf.ref LIKE "%' . $db->escape($sref) . '%"';
|
||||
//natural search
|
||||
$scrit = explode(' ', $sref);
|
||||
foreach ($scrit as $crit) {
|
||||
$sql .= ' AND cf.ref LIKE "%' . $db->escape($crit) . '%"';
|
||||
}
|
||||
}
|
||||
if ($snom) {
|
||||
$sql .= ' AND s.nom LIKE "%' . $db->escape($snom) . '%"';
|
||||
$scrit = explode(' ', $snom);
|
||||
foreach ($scrit as $crit) {
|
||||
$sql .= ' AND s.nom LIKE "%' . $db->escape($crit) . '%"';
|
||||
}
|
||||
}
|
||||
if ($suser) {
|
||||
$sql .= ' AND u.login LIKE "%' . $db->escape($suser) . '%"';
|
||||
|
||||
@ -122,8 +122,7 @@ if ($object->id > 0)
|
||||
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id."&urlfile=".urlencode(GETPOST("urlfile")),$langs->trans("DeleteAFile"),$langs->trans("ConfirmDeleteAFile"),"confirm_delete",'','',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&urlfile=".urlencode(GETPOST("urlfile")),$langs->trans("DeleteAFile"),$langs->trans("ConfirmDeleteAFile"),"confirm_delete",'','',1);
|
||||
}
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
@ -233,10 +233,8 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->projet->creer)
|
||||
// Build doc
|
||||
if ($action == 'builddoc' && $user->rights->projet->creer)
|
||||
{
|
||||
if (GETPOST('model'))
|
||||
{
|
||||
$object->setDocModel($user, GETPOST('model'));
|
||||
}
|
||||
// Save last template used to generate document
|
||||
if (GETPOST('model')) $object->setDocModel($user, GETPOST('model','alpha'));
|
||||
|
||||
$outputlangs = $langs;
|
||||
if (GETPOST('lang_id'))
|
||||
@ -250,11 +248,6 @@ if ($action == 'builddoc' && $user->rights->projet->creer)
|
||||
dol_print_error($db,$result);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc'));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
// Delete file in doc form
|
||||
@ -458,20 +451,17 @@ else
|
||||
// Confirmation validation
|
||||
if ($action == 'validate')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateProject'), $langs->trans('ConfirmValidateProject'), 'confirm_validate','',0,1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateProject'), $langs->trans('ConfirmValidateProject'), 'confirm_validate','',0,1);
|
||||
}
|
||||
// Confirmation close
|
||||
if ($action == 'close')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("CloseAProject"),$langs->trans("ConfirmCloseAProject"),"confirm_close",'','',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("CloseAProject"),$langs->trans("ConfirmCloseAProject"),"confirm_close",'','',1);
|
||||
}
|
||||
// Confirmation reopen
|
||||
if ($action == 'reopen')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ReOpenAProject"),$langs->trans("ConfirmReOpenAProject"),"confirm_reopen",'','',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("ReOpenAProject"),$langs->trans("ConfirmReOpenAProject"),"confirm_reopen",'','',1);
|
||||
}
|
||||
// Confirmation delete
|
||||
if ($action == 'delete')
|
||||
@ -481,8 +471,7 @@ else
|
||||
$taskarray=$task->getTasksArray(0,0,$object->id,0,0);
|
||||
$nboftask=count($taskarray);
|
||||
if ($nboftask) $text.='<br>'.img_warning().' '.$langs->trans("ThisWillAlsoRemoveTasks",$nboftask);
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("DeleteAProject"),$text,"confirm_delete",'','',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("DeleteAProject"),$text,"confirm_delete",'','',1);
|
||||
}
|
||||
|
||||
// Clone confirmation
|
||||
|
||||
@ -146,30 +146,22 @@ if (! empty($project_ref) && ! empty($withproject))
|
||||
// Build doc
|
||||
if ($action == 'builddoc' && $user->rights->projet->creer)
|
||||
{
|
||||
if ($object->fetch($id,$ref) >= 0 )
|
||||
{
|
||||
if (GETPOST('model'))
|
||||
{
|
||||
$object->setDocModel($user, GETPOST('model'));
|
||||
}
|
||||
$object->fetch($id,$ref);
|
||||
|
||||
// Save last template used to generate document
|
||||
if (GETPOST('model')) $object->setDocModel($user, GETPOST('model','alpha'));
|
||||
|
||||
$outputlangs = $langs;
|
||||
if (GETPOST('lang_id'))
|
||||
{
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang(GETPOST('lang_id'));
|
||||
}
|
||||
$result=task_pdf_create($db, $object, $object->modelpdf, $outputlangs);
|
||||
if ($result <= 0)
|
||||
{
|
||||
dol_print_error($db,$result);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc'));
|
||||
exit;
|
||||
}
|
||||
$outputlangs = $langs;
|
||||
if (GETPOST('lang_id'))
|
||||
{
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang(GETPOST('lang_id'));
|
||||
}
|
||||
$result=task_pdf_create($db, $object, $object->modelpdf, $outputlangs);
|
||||
if ($result <= 0)
|
||||
{
|
||||
dol_print_error($db,$result);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
@ -385,8 +377,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$_GET["id"].'&withproject='.$withproject,$langs->trans("DeleteATask"),$langs->trans("ConfirmDeleteATask"),"confirm_delete");
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$_GET["id"].'&withproject='.$withproject,$langs->trans("DeleteATask"),$langs->trans("ConfirmDeleteATask"),"confirm_delete");
|
||||
}
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
@ -241,8 +241,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
if ($action == 'deleteline')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id.'&lineid='.$_GET["lineid"].($withproject?'&withproject=1':''),$langs->trans("DeleteATimeSpent"),$langs->trans("ConfirmDeleteATimeSpent"),"confirm_delete",'','',1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id.'&lineid='.$_GET["lineid"].($withproject?'&withproject=1':''),$langs->trans("DeleteATimeSpent"),$langs->trans("ConfirmDeleteATimeSpent"),"confirm_delete",'','',1);
|
||||
}
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
@ -333,24 +333,19 @@ abstract class ActionsCardCommon
|
||||
// Define output language
|
||||
$outputlangs = $langs;
|
||||
$newlang='';
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id') ) $newlang=GETPOST('lang_id');
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id')) $newlang=GETPOST('lang_id');
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$this->object->default_lang;
|
||||
if (! empty($newlang))
|
||||
{
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$result=thirdparty_doc_create($this->db, $this->object->id, '', GETPOST('model'), $outputlangs);
|
||||
$result=thirdparty_doc_create($this->db, $this->object->id, '', GETPOST('model','alpha'), $outputlangs);
|
||||
if ($result <= 0)
|
||||
{
|
||||
dol_print_error($this->db,$result);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
header('Location: '.$_SERVER["PHP_SELF"].'?socid='.$this->object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc'));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -177,8 +177,7 @@ if ($object->id)
|
||||
*/
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&urlfile='.urlencode(GETPOST("urlfile")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&urlfile='.urlencode(GETPOST("urlfile")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
|
||||
}
|
||||
|
||||
$formfile=new FormFile($db);
|
||||
|
||||
@ -130,10 +130,8 @@ $result=$object->fetch($socid);
|
||||
|
||||
if ($result > 0)
|
||||
{
|
||||
$form = new Form($db);
|
||||
$langs->load("other");
|
||||
|
||||
|
||||
$head = societe_prepare_head($object);
|
||||
|
||||
dol_fiche_head($head, 'notify', $langs->trans("ThirdParty"),0,'company');
|
||||
|
||||
@ -475,17 +475,12 @@ if (empty($reshook))
|
||||
$outputlangs = new Translate("",$conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$result=thirdparty_doc_create($db, $object, '', $_REQUEST['model'], $outputlangs);
|
||||
$result=thirdparty_doc_create($db, $object, '', GETPOST('model','alpha'), $outputlangs);
|
||||
if ($result <= 0)
|
||||
{
|
||||
dol_print_error($db,$result);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
header('Location: '.$_SERVER["PHP_SELF"].'?socid='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc'));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -871,7 +866,6 @@ else
|
||||
if ($j % 2 == 1) print '<td colspan="2"></td></tr>';
|
||||
|
||||
// Assujeti TVA
|
||||
$form = new Form($db);
|
||||
print '<tr><td>'.$langs->trans('VATIsUsed').'</td>';
|
||||
print '<td>';
|
||||
print $form->selectyesno('assujtva_value',1,1); // Assujeti par defaut en creation
|
||||
@ -1440,9 +1434,7 @@ else
|
||||
// Confirm delete third party
|
||||
if ($action == 'delete' || ($conf->use_javascript_ajax && empty($conf->dol_use_jmobile)))
|
||||
{
|
||||
$form = new Form($db);
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?socid=".$object->id,$langs->trans("DeleteACompany"),$langs->trans("ConfirmDeleteCompany"),"confirm_delete",'',0,"action-delete");
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$object->id,$langs->trans("DeleteACompany"),$langs->trans("ConfirmDeleteCompany"),"confirm_delete",'',0,"action-delete");
|
||||
}
|
||||
|
||||
dol_htmloutput_errors($error,$errors);
|
||||
@ -1595,7 +1587,6 @@ else
|
||||
if ($j % 2 == 1) print '<td colspan="2"></td></tr>';
|
||||
|
||||
// VAT payers
|
||||
$form = new Form($db);
|
||||
print '<tr><td>';
|
||||
print $langs->trans('VATIsUsed');
|
||||
print '</td><td>';
|
||||
|
||||
@ -82,7 +82,6 @@ $langs->load("users");
|
||||
$langs->load("companies");
|
||||
$langs->load("ldap");
|
||||
|
||||
$form = new Form($db);
|
||||
$object = new User($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
|
||||
@ -566,10 +565,10 @@ if ($action == 'adduserldap')
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader('',$langs->trans("UserCard"));
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
llxHeader('',$langs->trans("UserCard"));
|
||||
|
||||
if (($action == 'create') || ($action == 'adduserldap'))
|
||||
{
|
||||
/* ************************************************************************** */
|
||||
@ -997,8 +996,7 @@ else
|
||||
*/
|
||||
if ($action == 'password')
|
||||
{
|
||||
$ret=$form->form_confirm("fiche.php?id=$object->id",$langs->trans("ReinitPassword"),$langs->trans("ConfirmReinitPassword",$object->login),"confirm_password", '', 0, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm("fiche.php?id=$object->id",$langs->trans("ReinitPassword"),$langs->trans("ConfirmReinitPassword",$object->login),"confirm_password", '', 0, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1006,8 +1004,7 @@ else
|
||||
*/
|
||||
if ($action == 'passwordsend')
|
||||
{
|
||||
$ret=$form->form_confirm("fiche.php?id=$object->id",$langs->trans("SendNewPassword"),$langs->trans("ConfirmSendNewPassword",$object->login),"confirm_passwordsend", '', 0, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm("fiche.php?id=$object->id",$langs->trans("SendNewPassword"),$langs->trans("ConfirmSendNewPassword",$object->login),"confirm_passwordsend", '', 0, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1015,8 +1012,7 @@ else
|
||||
*/
|
||||
if ($action == 'disable')
|
||||
{
|
||||
$ret=$form->form_confirm("fiche.php?id=$object->id",$langs->trans("DisableAUser"),$langs->trans("ConfirmDisableUser",$object->login),"confirm_disable", '', 0, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm("fiche.php?id=$object->id",$langs->trans("DisableAUser"),$langs->trans("ConfirmDisableUser",$object->login),"confirm_disable", '', 0, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1024,8 +1020,7 @@ else
|
||||
*/
|
||||
if ($action == 'enable')
|
||||
{
|
||||
$ret=$form->form_confirm("fiche.php?id=$object->id",$langs->trans("EnableAUser"),$langs->trans("ConfirmEnableUser",$object->login),"confirm_enable", '', 0, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm("fiche.php?id=$object->id",$langs->trans("EnableAUser"),$langs->trans("ConfirmEnableUser",$object->login),"confirm_enable", '', 0, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1033,8 +1028,7 @@ else
|
||||
*/
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm("fiche.php?id=$object->id",$langs->trans("DeleteAUser"),$langs->trans("ConfirmDeleteUser",$object->login),"confirm_delete", '', 0, 1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm("fiche.php?id=$object->id",$langs->trans("DeleteAUser"),$langs->trans("ConfirmDeleteUser",$object->login),"confirm_delete", '', 0, 1);
|
||||
}
|
||||
|
||||
dol_htmloutput_mesg($message);
|
||||
@ -1409,7 +1403,6 @@ else
|
||||
|
||||
if ($caneditgroup)
|
||||
{
|
||||
$form = new Form($db);
|
||||
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="POST">'."\n";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />';
|
||||
print '<input type="hidden" name="action" value="addgroup" />';
|
||||
|
||||
@ -278,8 +278,7 @@ else
|
||||
*/
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$ret=$form->form_confirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("DeleteAGroup"),$langs->trans("ConfirmDeleteGroup",$object->name),"confirm_delete", '',0,1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("DeleteAGroup"),$langs->trans("ConfirmDeleteGroup",$object->name),"confirm_delete", '',0,1);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user