mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Debug v17
This commit is contained in:
parent
833505b5e2
commit
e2c558f9cc
|
|
@ -3188,7 +3188,7 @@ if ($action == 'create') {
|
|||
$arrayoutstandingbills = $soc->getOutstandingBills();
|
||||
$outstandingBills = $arrayoutstandingbills['opened'];
|
||||
print ' - <span class="opacitymedium">'.$langs->trans('CurrentOutstandingBill').':</span> ';
|
||||
print price($outstandingBills, '', $langs, 0, 0, -1, $conf->currency);
|
||||
print '<span class="amount">'.price($outstandingBills, '', $langs, 0, 0, -1, $conf->currency).'</span>';
|
||||
if ($soc->outstanding_limit != '') {
|
||||
if ($outstandingBills > $soc->outstanding_limit) {
|
||||
print img_warning($langs->trans("OutstandingBillReached"));
|
||||
|
|
@ -3307,7 +3307,7 @@ if ($action == 'create') {
|
|||
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
|
||||
$tmp = '<input type="radio" id="radio_standard" name="type" value="0"'.(GETPOST('type', 'int') ? '' : ' checked').'> ';
|
||||
$tmp = $tmp.'<label for="radio_standard" >'.$langs->trans("InvoiceStandardAsk").'</label>';
|
||||
$desc = $form->textwithpicto($tmp, $langs->transnoentities("InvoiceStandardDesc"), 1, 'help', '', 0, 3);
|
||||
$desc = $form->textwithpicto($tmp, $langs->transnoentities("InvoiceStandardDesc"), 1, 'help', '', 0, 3, 'standardonsmartphone');
|
||||
print '<table class="nobordernopadding"><tr>';
|
||||
print '<td>';
|
||||
print $desc;
|
||||
|
|
@ -3346,7 +3346,7 @@ if ($action == 'create') {
|
|||
jQuery("#radio_deposit").prop("checked", true);
|
||||
setRadioForTypeOfIncoice();
|
||||
});
|
||||
jQuery("#radio_standard, #radio_deposit, #radio_replacement, #radio_template").change(function() {
|
||||
jQuery("#radio_standard, #radio_deposit, #radio_replacement, #radio_creditnote, #radio_template").change(function() {
|
||||
setRadioForTypeOfIncoice();
|
||||
});
|
||||
function setRadioForTypeOfIncoice() {
|
||||
|
|
@ -3362,10 +3362,10 @@ if ($action == 'create') {
|
|||
});
|
||||
</script>';
|
||||
|
||||
$tmp = $tmp.'<label for="radio_deposit" >'.$langs->trans("InvoiceDeposit").'</label>';
|
||||
$desc = $form->textwithpicto($tmp, $langs->transnoentities("InvoiceDepositDesc"), 1, 'help', '', 0, 3);
|
||||
print '<table class="nobordernopadding"><tr>';
|
||||
print '<td>';
|
||||
$tmp = $tmp.'<label for="radio_deposit">'.$langs->trans("InvoiceDeposit").'</label>';
|
||||
$desc = $form->textwithpicto($tmp, $langs->transnoentities("InvoiceDepositDesc"), 1, 'help', '', 0, 3, 'depositonsmartphone');
|
||||
print $desc;
|
||||
print '</td>';
|
||||
if (($origin == 'propal') || ($origin == 'commande')) {
|
||||
|
|
@ -3404,7 +3404,7 @@ if ($action == 'create') {
|
|||
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
|
||||
$tmp = '<input id="radio_situation" type="radio" name="type" value="5"'.(GETPOST('type') == 5 ? ' checked' : '').'> ';
|
||||
$tmp = $tmp.'<label for="radio_situation" >'.$langs->trans("InvoiceFirstSituationAsk").'</label>';
|
||||
$desc = $form->textwithpicto($tmp, $langs->transnoentities("InvoiceFirstSituationDesc"), 1, 'help', '', 0, 3);
|
||||
$desc = $form->textwithpicto($tmp, $langs->transnoentities("InvoiceFirstSituationDesc"), 1, 'help', '', 0, 3, 'firstsituationonsmartphone');
|
||||
print $desc;
|
||||
print '</div></div>';
|
||||
|
||||
|
|
@ -3417,7 +3417,7 @@ if ($action == 'create') {
|
|||
$tmp .= ' disabled';
|
||||
}
|
||||
$tmp .= '> ';
|
||||
$text = '<label>'.$tmp.$langs->trans("InvoiceSituationAsk").'</label> ';
|
||||
$text = $tmp.'<label>'.$langs->trans("InvoiceSituationAsk").'</label> ';
|
||||
$text .= '<select class="flat" id="situations" name="situations"';
|
||||
if ($opt == ('<option value ="0" selected>'.$langs->trans('NoSituations').'</option>') || (GETPOST('origin') && GETPOST('origin') != 'facture' && GETPOST('origin') != 'commande')) {
|
||||
$text .= ' disabled';
|
||||
|
|
@ -3465,7 +3465,7 @@ if ($action == 'create') {
|
|||
});
|
||||
});
|
||||
</script>';
|
||||
$text = '<label>'.$tmp.$langs->trans("InvoiceReplacementAsk").'</label>';
|
||||
$text = $tmp.'<label for="radio_replacement">'.$langs->trans("InvoiceReplacementAsk").'</label>';
|
||||
$text .= '<select class="flat" name="fac_replacement" id="fac_replacement"';
|
||||
if (!$options || $invoice_predefined->id > 0) {
|
||||
$text .= ' disabled';
|
||||
|
|
@ -3486,26 +3486,18 @@ if ($action == 'create') {
|
|||
if (!empty($conf->global->INVOICE_USE_SITUATION)) {
|
||||
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
|
||||
$tmp = '<input type="radio" name="type" id="radio_situation" value="0" disabled> ';
|
||||
$text = '<label>'.$tmp.$langs->trans("InvoiceFirstSituationAsk").'</label> ';
|
||||
$text = $tmp.'<label>'.$langs->trans("InvoiceSituationAsk").'</label> ';
|
||||
$text .= '<span class="opacitymedium">('.$langs->trans("YouMustCreateInvoiceFromThird").')</span> ';
|
||||
$desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceFirstSituationDesc"), 1, 'help', '', 0, 3);
|
||||
print $desc;
|
||||
print '</div></div>';
|
||||
|
||||
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
|
||||
$tmp = '<input type="radio" name="type" id="radio_situation" value="0" disabled> ';
|
||||
$text = '<label>'.$tmp.$langs->trans("InvoiceSituationAsk").'</label> ';
|
||||
$text .= '<span class="opacitymedium">('.$langs->trans("YouMustCreateInvoiceFromThird").')</span> ';
|
||||
$desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceFirstSituationDesc"), 1, 'help', '', 0, 3);
|
||||
$desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceFirstSituationDesc"), 1, 'help', '', 0, 3, 'firstsituationonsmartphone');
|
||||
print $desc;
|
||||
print '</div></div>';
|
||||
}
|
||||
|
||||
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
|
||||
$tmp = '<input type="radio" name="type" id="radio_replacement" value="0" disabled> ';
|
||||
$text = '<label>'.$tmp.$langs->trans("InvoiceReplacement").'</label> ';
|
||||
$text .= '<span class="opacitymedium">('.$langs->trans("YouMustCreateInvoiceFromThird").')</span> ';
|
||||
$desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceReplacementDesc"), 1, 'help', '', 0, 3);
|
||||
$text = $tmp.'<label for="radio_replacement" class="opacitymedium">'.$langs->trans("InvoiceReplacement").'</label> ';
|
||||
//$text .= '<span class="opacitymedium hideonsmartphone">('.$langs->trans("YouMustCreateInvoiceFromThird").')</span> ';
|
||||
$desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceReplacementDesc").'<br><br>'.$langs->trans("YouMustCreateInvoiceFromThird"), 1, 'help', '', 0, 3, 'replacementonsmartphone');
|
||||
print $desc;
|
||||
print '</div></div>';
|
||||
}
|
||||
|
|
@ -3565,7 +3557,6 @@ if ($action == 'create') {
|
|||
});
|
||||
</script>';
|
||||
$text = '<label>'.$tmp.$langs->transnoentities("InvoiceAvoirAsk").'</label> ';
|
||||
// $text.='<input type="text" value="">';
|
||||
$text .= '<select class="flat valignmiddle" name="fac_avoir" id="fac_avoir"';
|
||||
if (!$optionsav || $invoice_predefined->id > 0) {
|
||||
$text .= ' disabled';
|
||||
|
|
@ -3581,7 +3572,7 @@ if ($action == 'create') {
|
|||
$desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceAvoirDesc"), 1, 'help', '', 0, 3);
|
||||
print $desc;
|
||||
|
||||
print '<div id="credit_note_options" class="clearboth">';
|
||||
print '<div id="credit_note_options" class="clearboth paddingtop marginbottomonly">';
|
||||
print ' <input type="checkbox" name="invoiceAvoirWithLines" id="invoiceAvoirWithLines" value="1" onclick="$(\'#credit_note_options input[type=checkbox]\').not(this).prop(\'checked\', false);" '.(GETPOST('invoiceAvoirWithLines', 'int') > 0 ? 'checked' : '').' /> <label for="invoiceAvoirWithLines">'.$langs->trans('invoiceAvoirWithLines')."</label>";
|
||||
print '<br> <input type="checkbox" name="invoiceAvoirWithPaymentRestAmount" id="invoiceAvoirWithPaymentRestAmount" value="1" onclick="$(\'#credit_note_options input[type=checkbox]\').not(this).prop(\'checked\', false);" '.(GETPOST('invoiceAvoirWithPaymentRestAmount', 'int') > 0 ? 'checked' : '').' /> <label for="invoiceAvoirWithPaymentRestAmount">'.$langs->trans('invoiceAvoirWithPaymentRestAmount')."</label>";
|
||||
print '</div>';
|
||||
|
|
@ -3595,9 +3586,9 @@ if ($action == 'create') {
|
|||
} else {
|
||||
$tmp = '<input type="radio" name="type" id="radio_creditnote" value="2" > ';
|
||||
}
|
||||
$text = '<label>'.$tmp.$langs->trans("InvoiceAvoir").'</label> ';
|
||||
$text .= '<span class="opacitymedium">('.$langs->trans("YouMustCreateInvoiceFromThird").')</span> ';
|
||||
$desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceAvoirDesc"), 1, 'help', '', 0, 3);
|
||||
$text = $tmp.'<label class="opacitymedium" for="radio_creditnote">'.$langs->trans("InvoiceAvoir").'</label> ';
|
||||
//$text .= '<span class="opacitymedium hideonsmartphone">('.$langs->trans("YouMustCreateInvoiceFromThird").')</span> ';
|
||||
$desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceAvoirDesc").'<br><br>'.$langs->trans("YouMustCreateInvoiceFromThird"), 1, 'help', '', 0, 3, 'creditnoteonsmartphone');
|
||||
print $desc;
|
||||
print '</div></div>'."\n";
|
||||
}
|
||||
|
|
@ -3606,9 +3597,8 @@ if ($action == 'create') {
|
|||
// Template invoice
|
||||
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
|
||||
$tmp = '<input type="radio" name="type" id="radio_template" value="0" disabled> ';
|
||||
$text = '<label>'.$tmp.$langs->trans("RepeatableInvoice").'</label> ';
|
||||
//$text.= '('.$langs->trans("YouMustCreateStandardInvoiceFirst").') ';
|
||||
$desc = $form->textwithpicto($text, $langs->transnoentities("YouMustCreateStandardInvoiceFirstDesc"), 1, 'help', '', 0, 3);
|
||||
$text = $tmp.'<label class="opacitymedium" for="radio_template">'.$langs->trans("RepeatableInvoice").'</label> ';
|
||||
$desc = $form->textwithpicto($text, $langs->transnoentities("YouMustCreateStandardInvoiceFirstDesc"), 1, 'help', '', 0, 3, 'templateonsmartphone');
|
||||
print $desc;
|
||||
print '</div></div>';
|
||||
|
||||
|
|
@ -3629,7 +3619,8 @@ if ($action == 'create') {
|
|||
$(document).ready(function() {
|
||||
var listType = {'.$jsListType.'};
|
||||
$("[name=\'type\'").change(function() {
|
||||
if($( this ).prop("checked"))
|
||||
console.log("change name=type");
|
||||
if ($( this ).prop("checked"))
|
||||
{
|
||||
if(($( this ).val() in listType))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -724,7 +724,7 @@ class Form
|
|||
* @param string $extracss Add a CSS style to td, div or span tag
|
||||
* @param int $noencodehtmltext Do not encode into html entity the htmltext
|
||||
* @param int $notabs 0=Include table and tr tags, 1=Do not include table and tr tags, 2=use div, 3=use span
|
||||
* @param string $tooltiptrigger ''=Tooltip on hover, 'abc'=Tooltip on click (abc is a unique key, clickable link is on image or on link if param $type='none' or on both if $type='xxxclickable')
|
||||
* @param string $tooltiptrigger ''=Tooltip on hover and hidden on smartphone, 'abconsmartphone'=Tooltip on hover and on click on smartphone, 'abc'=Tooltip on click (abc is a unique key, clickable link is on image or on link if param $type='none' or on both if $type='xxxclickable')
|
||||
* @param int $forcenowrap Force no wrap between text and picto (works with notabs=2 only)
|
||||
* @return string HTML code of text, picto, tooltip
|
||||
*/
|
||||
|
|
@ -732,11 +732,6 @@ class Form
|
|||
{
|
||||
global $conf, $langs;
|
||||
|
||||
$alt = '';
|
||||
if ($tooltiptrigger) {
|
||||
$alt = $langs->transnoentitiesnoconv("ClickToShowHelp");
|
||||
}
|
||||
|
||||
//For backwards compatibility
|
||||
if ($type == '0') {
|
||||
$type = 'info';
|
||||
|
|
@ -744,6 +739,15 @@ class Form
|
|||
$type = 'help';
|
||||
}
|
||||
|
||||
if (preg_match('/onsmartphone$/', $tooltiptrigger) && empty($conf->dol_no_mouse_hover)) {
|
||||
$tooltiptrigger = preg_replace('/^.*onsmartphone$/', '', $tooltiptrigger);
|
||||
}
|
||||
|
||||
$alt = '';
|
||||
if ($tooltiptrigger) {
|
||||
$alt = $langs->transnoentitiesnoconv("ClickToShowHelp");
|
||||
}
|
||||
|
||||
// If info or help with no javascript, show only text
|
||||
if (empty($conf->use_javascript_ajax)) {
|
||||
if ($type == 'info' || $type == 'infoclickable' || $type == 'help' || $type == 'helpclickable') {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user