Merge pull request #858 from marcosgdf/fix-notifications-alert-bug

Notifications popup messages were not showing real notifications that we...
This commit is contained in:
Laurent Destailleur 2013-04-21 16:08:33 -07:00
commit 87ce23c4b8
5 changed files with 29 additions and 29 deletions

View File

@ -1534,7 +1534,7 @@ else
require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php'; require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php';
$notify=new Notify($db); $notify=new Notify($db);
$text.='<br>'; $text.='<br>';
$text.=$notify->confirmMessage('NOTIFY_VAL_PROPAL',$object->socid); $text.=$notify->confirmMessage('PROPAL_VALIDATE',$object->socid);
} }
if (! $error) $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateProp'), $text, 'confirm_validate','',0,1); if (! $error) $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateProp'), $text, 'confirm_validate','',0,1);
@ -2171,7 +2171,7 @@ else
//print '</td></tr></table>'; //print '</td></tr></table>';
print '</div></div></div>'; print '</div></div></div>';
} }

View File

@ -1784,7 +1784,7 @@ else
require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php'; require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php';
$notify=new Notify($db); $notify=new Notify($db);
$text.='<br>'; $text.='<br>';
$text.=$notify->confirmMessage('NOTIFY_VAL_ORDER',$object->socid); $text.=$notify->confirmMessage('ORDER_VALIDATE',$object->socid);
} }
$formquestion=array(); $formquestion=array();
if (! empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $object->hasProductsOrServices(1)) if (! empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) && $object->hasProductsOrServices(1))
@ -1935,15 +1935,15 @@ else
print '<td colspan="3">'.$soc->getNomUrl(1).'</td>'; print '<td colspan="3">'.$soc->getNomUrl(1).'</td>';
print '</tr>'; print '</tr>';
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS))
{ {
$filterabsolutediscount="fk_facture_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice $filterabsolutediscount="fk_facture_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
$filtercreditnote="fk_facture_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice $filtercreditnote="fk_facture_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
} }
else else
{ {
$filterabsolutediscount="fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND description='(DEPOSIT)')"; $filterabsolutediscount="fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND description='(DEPOSIT)')";
$filtercreditnote="fk_facture_source IS NOT NULL AND description <> '(DEPOSIT)'"; $filtercreditnote="fk_facture_source IS NOT NULL AND description <> '(DEPOSIT)'";
} }
// Relative and absolute discounts // Relative and absolute discounts
@ -2170,9 +2170,9 @@ else
} }
} }
$rowspan=4; $rowspan=4;
if ($mysoc->localtax1_assuj=="1") $rowspan++; if ($mysoc->localtax1_assuj=="1") $rowspan++;
if ($mysoc->localtax2_assuj=="1") $rowspan++; if ($mysoc->localtax2_assuj=="1") $rowspan++;
// Total HT // Total HT
print '<tr><td>'.$langs->trans('AmountHT').'</td>'; print '<tr><td>'.$langs->trans('AmountHT').'</td>';
@ -2411,7 +2411,7 @@ else
print '</div>'; print '</div>';
} }
} }
print '<br>'; print '<br>';
if ($action != 'presend') if ($action != 'presend')

View File

@ -2523,7 +2523,7 @@ else if ($id > 0 || ! empty($ref))
require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php'; require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php';
$notify=new Notify($db); $notify=new Notify($db);
$text.='<br>'; $text.='<br>';
$text.=$notify->confirmMessage('NOTIFY_VAL_FAC',$object->socid); $text.=$notify->confirmMessage('BILL_VALIDATE',$object->socid);
} }
$formquestion=array(); $formquestion=array();
@ -3618,7 +3618,7 @@ else if ($id > 0 || ! empty($ref))
print '</div>'; print '</div>';
} }
} }
print '<br>'; print '<br>';
if ($action != 'prerelance' && $action != 'presend') if ($action != 'prerelance' && $action != 'presend')
{ {
@ -3659,7 +3659,7 @@ else if ($id > 0 || ! empty($ref))
$somethingshown=$formactions->showactions($object,'invoice',$socid); $somethingshown=$formactions->showactions($object,'invoice',$socid);
//print '</td></tr></table>'; //print '</td></tr></table>';
print '</div></div></div>'; print '</div></div></div>';
} }
else else
{ {

View File

@ -1077,7 +1077,7 @@ elseif (! empty($object->id))
require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php'; require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php';
$notify=new Notify($db); $notify=new Notify($db);
$text.='<br>'; $text.='<br>';
$text.=$notify->confirmMessage(3,$object->socid); $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); $ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateOrder'), $text, 'confirm_valid', '', 0, 1);
@ -1762,10 +1762,10 @@ elseif (! empty($object->id))
print "</div>"; print "</div>";
} }
print "<br>"; print "<br>";
print '<div class="fichecenter"><div class="fichehalfleft">'; print '<div class="fichecenter"><div class="fichehalfleft">';
//print '<table width="100%"><tr><td width="50%" valign="top">'; //print '<table width="100%"><tr><td width="50%" valign="top">';
//print '<a name="builddoc"></a>'; // ancre //print '<a name="builddoc"></a>'; // ancre

View File

@ -1342,12 +1342,12 @@ else
} }
$text=$langs->trans('ConfirmValidateBill',$numref); $text=$langs->trans('ConfirmValidateBill',$numref);
/*if (! empty($conf->notification->enabled)) /*if (! empty($conf->notification->enabled))
{ {
require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php'; require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php';
$notify=new Notify($db); $notify=new Notify($db);
$text.='<br>'; $text.='<br>';
$text.=$notify->confirmMessage('NOTIFY_VAL_FAC_SUP',$object->socid); $text.=$notify->confirmMessage('BILL_SUPPLIER_VALIDATE',$object->socid);
}*/ }*/
$formquestion=array(); $formquestion=array();
@ -2066,7 +2066,7 @@ else
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delete">'.$langs->trans('Delete').'</a>'; print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delete">'.$langs->trans('Delete').'</a>';
} }
print '</div>'; print '</div>';
print '<br>'; print '<br>';
if ($action != 'edit') if ($action != 'edit')
{ {