Fix: Miscellaneous bug fixes

This commit is contained in:
Laurent Destailleur 2011-12-05 23:05:11 +01:00
parent 37f44dbd75
commit 9dcfc044a4
3 changed files with 12 additions and 10 deletions

View File

@ -3977,7 +3977,7 @@ function get_htmloutput_mesg($mesgstring='',$mesgarray='', $style='ok', $keepemb
} }
// If inline message with no format, we add it. // If inline message with no format, we add it.
if ((! empty($conf->global->MAIN_DISABLE_JQUERY_JNOTIFY) || $keepembedded) && ! preg_match('/<div class=".*">/i',$out)) if ((empty($conf->use_javascript_ajax) || ! empty($conf->global->MAIN_DISABLE_JQUERY_JNOTIFY) || $keepembedded) && ! preg_match('/<div class=".*">/i',$out))
{ {
$divstart='<div class="'.$style.'">'; $divstart='<div class="'.$style.'">';
$divend='</div>'; $divend='</div>';
@ -4007,7 +4007,7 @@ function get_htmloutput_mesg($mesgstring='',$mesgarray='', $style='ok', $keepemb
if ($out) if ($out)
{ {
if (empty($conf->global->MAIN_DISABLE_JQUERY_JNOTIFY) && empty($keepembedded)) if ($conf->use_javascript_ajax && empty($conf->global->MAIN_DISABLE_JQUERY_JNOTIFY) && empty($keepembedded))
{ {
$return = '<script type="text/javascript"> $return = '<script type="text/javascript">
jQuery(document).ready(function() { jQuery(document).ready(function() {
@ -4046,7 +4046,7 @@ function get_htmloutput_errors($mesgstring='', $mesgarray='', $keepembedded=0)
/** /**
* Print formated messages to output (Used to show messages on html output). * Print formated messages to output (Used to show messages on html output).
* *
* @param string $mesgstring Message * @param string $mesgstring Message
* @param array $mesgarray Messages array * @param array $mesgarray Messages array
* @param string $style Which style to use ('ok', 'error') * @param string $style Which style to use ('ok', 'error')
* @param int $keepembedded Set to 1 if message must be kept embedded into its html place (this disable jnotify) * @param int $keepembedded Set to 1 if message must be kept embedded into its html place (this disable jnotify)

View File

@ -1231,7 +1231,7 @@ else
array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockDecrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1))); array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockDecrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1)));
} }
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateBill'), $langs->trans('ConfirmValidateBill', $object->ref), 'confirm_valid', $formquestion, 0, 1, 240); $ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateBill'), $langs->trans('ConfirmValidateBill', $object->ref), 'confirm_valid', $formquestion, 1, 1, 240);
if ($ret == 'html') print '<br>'; if ($ret == 'html') print '<br>';
} }

View File

@ -49,7 +49,7 @@ $object = new PaiementFourn($db);
if ($action == 'setnote' && $user->rights->fournisseur->facture->creer) if ($action == 'setnote' && $user->rights->fournisseur->facture->creer)
{ {
$db->begin(); $db->begin();
$object->fetch($id); $object->fetch($id);
$result = $object->update_note(GETPOST('note')); $result = $object->update_note(GETPOST('note'));
if ($result > 0) if ($result > 0)
@ -67,7 +67,7 @@ if ($action == 'setnote' && $user->rights->fournisseur->facture->creer)
if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->fournisseur->facture->supprimer) if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->fournisseur->facture->supprimer)
{ {
$db->begin(); $db->begin();
$object->fetch($id); $object->fetch($id);
$result = $object->delete(); $result = $object->delete();
if ($result > 0) if ($result > 0)
@ -177,11 +177,13 @@ if ($result > 0)
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
print '<tr>'; print '<tr>';
print '<td valign="top" width="20%" colspan="2">'.$langs->trans('Ref').'</td><td colspan="3">'.$object->id.'</td></tr>'; print '<td valign="top" width="20%" colspan="2">'.$langs->trans('Ref').'</td><td colspan="3">';
print $form->showrefnav($object,'id','',1,'rowid','ref');
print '</td></tr>';
// Date payment // Date payment
print '<tr><td valign="top" colspan="2">'.$form->editfieldkey("Date",'date',$object->date,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer).'</td><td colspan="3">'; print '<tr><td valign="top" colspan="2">'.$form->editfieldkey("Date",'date',$object->date,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer).'</td><td colspan="3">';
print $form->editfieldval("Date",'date',$object->date,'id',$object->id,$object->statut == 0 && $user->rights->fournisseur->facture->creer,'day'); print $form->editfieldval("Date",'date',$object->date,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer,'day');
print '</td></tr>'; print '</td></tr>';
// Payment mode // Payment mode
@ -189,7 +191,7 @@ if ($result > 0)
// Payment numero // Payment numero
print '<tr><td valign="top" colspan="2">'.$form->editfieldkey("Numero",'num',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer).'</td><td colspan="3">'; print '<tr><td valign="top" colspan="2">'.$form->editfieldkey("Numero",'num',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer).'</td><td colspan="3">';
print $form->editfieldval("Numero",'num',$object->numero,'id',$object->id,$object->statut == 0 && $user->rights->fournisseur->facture->creer,'string'); print $form->editfieldval("Numero",'num',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer,'string');
print '</td></tr>'; print '</td></tr>';
// Amount // Amount
@ -202,7 +204,7 @@ if ($result > 0)
// Note // Note
print '<tr><td valign="top"" colspan="2">'.$form->editfieldkey("Note",'note',$object->note,$object,$user->rights->fournisseur->facture->creer).'</td><td colspan="3">'; print '<tr><td valign="top"" colspan="2">'.$form->editfieldkey("Note",'note',$object->note,$object,$user->rights->fournisseur->facture->creer).'</td><td colspan="3">';
print $form->editfieldval("Note",'note',$object->note,'id',$object->id,$user->rights->fournisseur->facture->creer,'text'); print $form->editfieldval("Note",'note',$object->note,$object,$user->rights->fournisseur->facture->creer,'text');
print '</td></tr>'; print '</td></tr>';
// Bank account // Bank account