Debug v11
This commit is contained in:
parent
eae021cd6b
commit
796f34628d
@ -252,7 +252,7 @@ if ($socid > 0)
|
||||
print '<input type="hidden" name="action" value="setremise">';
|
||||
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
|
||||
|
||||
dol_fiche_head($head, 'absolutediscount', $langs->trans("ThirdParty"), 0, 'company');
|
||||
dol_fiche_head($head, 'absolutediscount', $langs->trans("ThirdParty"), -1, 'company');
|
||||
|
||||
dol_banner_tab($object, 'socid', '', ($user->socid ? 0 : 1), 'rowid', 'nom');
|
||||
|
||||
@ -273,7 +273,7 @@ if ($socid > 0)
|
||||
}
|
||||
|
||||
|
||||
print '<table class="border centpercent">';
|
||||
print '<table class="border centpercent tableforfield borderbottom">';
|
||||
|
||||
if ($isCustomer) { // Calcul avoirs client en cours
|
||||
$remise_all = $remise_user = 0;
|
||||
@ -342,13 +342,15 @@ if ($socid > 0)
|
||||
|
||||
print '</div>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
if ($user->rights->societe->creer)
|
||||
{
|
||||
print '<br>';
|
||||
|
||||
print load_fiche_titre($langs->trans("NewGlobalDiscount"), '', '');
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
if ($isCustomer && !$isSupplier) {
|
||||
print '<input type="hidden" name="discount_type" value="0" />';
|
||||
@ -358,6 +360,8 @@ if ($socid > 0)
|
||||
print '<input type="hidden" name="discount_type" value="1" />';
|
||||
}
|
||||
|
||||
dol_fiche_head();
|
||||
|
||||
print '<table class="border centpercent">';
|
||||
if ($isCustomer && $isSupplier) {
|
||||
print '<tr><td class="titlefield fieldrequired">'.$langs->trans('DiscountType').'</td>';
|
||||
@ -376,9 +380,9 @@ if ($socid > 0)
|
||||
print '<td><input type="text" class="quatrevingtpercent" name="desc" value="'.GETPOST('desc', 'none').'"></td></tr>';
|
||||
|
||||
print "</table>";
|
||||
}
|
||||
|
||||
dol_fiche_end();
|
||||
dol_fiche_end();
|
||||
}
|
||||
|
||||
if ($user->rights->societe->creer)
|
||||
{
|
||||
@ -404,7 +408,7 @@ if ($socid > 0)
|
||||
|
||||
|
||||
/*
|
||||
* Liste remises fixes client restant en cours (= liees a aucune facture ni ligne de facture)
|
||||
* List remises fixes client restant en cours (= liees a aucune facture ni ligne de facture)
|
||||
*/
|
||||
|
||||
print load_fiche_titre($langs->trans("DiscountStillRemaining"));
|
||||
@ -511,15 +515,14 @@ if ($socid > 0)
|
||||
{
|
||||
print '<td class="right">'.price($obj->multicurrency_amount_ttc).'</td>';
|
||||
}
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"), 'user').' '.$obj->login.'</a>';
|
||||
print '</td>';
|
||||
if ($user->rights->societe->creer || $user->rights->facture->creer)
|
||||
{
|
||||
print '<td class="nowrap">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=split&remid='.$obj->rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_split($langs->trans("SplitDiscount")).'</a>';
|
||||
//print ' ';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=remove&remid='.$obj->rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_delete($langs->trans("RemoveDiscount")).'</a>';
|
||||
print '<td class="center nowrap">';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=split&remid='.$obj->rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_split($langs->trans("SplitDiscount")).'</a>';
|
||||
print '<a class="reposition marginleftonly" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=remove&remid='.$obj->rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_delete($langs->trans("RemoveDiscount")).'</a>';
|
||||
print '</td>';
|
||||
}
|
||||
else print '<td> </td>';
|
||||
@ -535,7 +538,9 @@ if ($socid > 0)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr><td colspan="8" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
|
||||
$colspan = 8;
|
||||
if (!empty($conf->multicurrency->enabled)) $colspan+=2;
|
||||
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
|
||||
}
|
||||
$db->free($resql);
|
||||
print "</table>";
|
||||
@ -551,7 +556,7 @@ if ($socid > 0)
|
||||
array('type' => 'text', 'name' => 'amount_ttc_2', 'label' => $langs->trans("AmountTTC").' 2', 'value' => $amount2, 'size' => '5')
|
||||
);
|
||||
$langs->load("dict");
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$showconfirminfo['rowid'].($backtopage ? '&backtopage='.urlencode($backtopage) : ''), $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount', price($showconfirminfo['amount_ttc']), $langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0);
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$showconfirminfo['rowid'].($backtopage ? '&backtopage='.urlencode($backtopage) : ''), $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount', price($showconfirminfo['amount_ttc']), $langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, '', 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -672,9 +677,8 @@ if ($socid > 0)
|
||||
if ($user->rights->societe->creer || $user->rights->facture->creer)
|
||||
{
|
||||
print '<td class="center nowrap">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=split&remid='.$obj->rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_split($langs->trans("SplitDiscount")).'</a>';
|
||||
//print ' ';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=remove&remid='.$obj->rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_delete($langs->trans("RemoveDiscount")).'</a>';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=split&remid='.$obj->rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_split($langs->trans("SplitDiscount")).'</a>';
|
||||
print '<a class="reposition marginleftonly" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=remove&remid='.$obj->rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_delete($langs->trans("RemoveDiscount")).'</a>';
|
||||
print '</td>';
|
||||
}
|
||||
else print '<td> </td>';
|
||||
@ -690,7 +694,9 @@ if ($socid > 0)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr><td colspan="8" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
|
||||
$colspan = 8;
|
||||
if (!empty($conf->multicurrency->enabled)) $colspan+=2;
|
||||
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
|
||||
}
|
||||
$db->free($resql);
|
||||
print "</table>";
|
||||
@ -701,9 +707,9 @@ if ($socid > 0)
|
||||
$amount1 = price2num($showconfirminfo['amount_ttc'] / 2, 'MT');
|
||||
$amount2 = ($showconfirminfo['amount_ttc'] - $amount1);
|
||||
$formquestion = array(
|
||||
'text' => $langs->trans('TypeAmountOfEachNewDiscount'),
|
||||
array('type' => 'text', 'name' => 'amount_ttc_1', 'label' => $langs->trans("AmountTTC").' 1', 'value' => $amount1, 'size' => '5'),
|
||||
array('type' => 'text', 'name' => 'amount_ttc_2', 'label' => $langs->trans("AmountTTC").' 2', 'value' => $amount2, 'size' => '5')
|
||||
'text' => $langs->trans('TypeAmountOfEachNewDiscount'),
|
||||
array('type' => 'text', 'name' => 'amount_ttc_1', 'label' => $langs->trans("AmountTTC").' 1', 'value' => $amount1, 'size' => '5'),
|
||||
array('type' => 'text', 'name' => 'amount_ttc_2', 'label' => $langs->trans("AmountTTC").' 2', 'value' => $amount2, 'size' => '5')
|
||||
);
|
||||
$langs->load("dict");
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$showconfirminfo['rowid'].($backtopage ? '&backtopage='.urlencode($backtopage) : ''), $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount', price($showconfirminfo['amount_ttc']), $langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0);
|
||||
@ -738,7 +744,7 @@ if ($socid > 0)
|
||||
|
||||
// Discount linked to invoice lines
|
||||
$sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx, rc.multicurrency_amount_ht, rc.multicurrency_amount_tva, rc.multicurrency_amount_ttc,";
|
||||
$sql .= " rc.fk_facture_source,";
|
||||
$sql .= " rc.datec as dc, rc.description, rc.fk_facture_line, rc.fk_facture_source,";
|
||||
$sql .= " u.login, u.rowid as user_id,";
|
||||
$sql .= " f.rowid as invoiceid, f.ref,";
|
||||
$sql .= " fa.ref as invoice_source_ref, fa.type as type";
|
||||
@ -890,7 +896,9 @@ if ($socid > 0)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr><td colspan="8" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
|
||||
$colspan = 8;
|
||||
if (!empty($conf->multicurrency->enabled)) $colspan+=2;
|
||||
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
@ -1064,7 +1072,9 @@ if ($socid > 0)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr><td colspan="8" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
|
||||
$colspan = 8;
|
||||
if (!empty($conf->multicurrency->enabled)) $colspan+=2;
|
||||
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
|
||||
@ -4117,7 +4117,9 @@ class Form
|
||||
|
||||
// Now add questions
|
||||
$more .= '<div class="tagtable paddingtopbottomonly centpercent noborderspacing">'."\n";
|
||||
if (!empty($formquestion['text'])) $more .= '<tr><td colspan="2">'.$formquestion['text'].'</td></tr>'."\n";
|
||||
if (!empty($formquestion['text'])) {
|
||||
$more .= '<div class="tagtr"><div class="tagtd">'.$formquestion['text'].'</div></div>'."\n";
|
||||
}
|
||||
foreach ($formquestion as $key => $input)
|
||||
{
|
||||
if (is_array($input) && !empty($input))
|
||||
|
||||
@ -3081,7 +3081,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
'address'=> 'address-book', 'setup'=>'cog', 'companies'=>'building', 'products'=>'cube', 'commercial'=>'suitcase', 'invoicing'=>'coins', 'accountancy'=>'money-check-alt', 'project'=>'sitemap',
|
||||
'hrm'=>'umbrella-beach', 'members'=>'users', 'ticket'=>'ticket-alt', 'generic'=>'folder-open',
|
||||
'switch_off'=>'toggle-off', 'switch_on'=>'toggle-on', 'object_bookmark'=>'star', 'bookmark'=>'star', 'stats' => 'chart-bar',
|
||||
'bank'=>'university', 'close_title'=>'window-close', 'delete'=>'trash', 'edit'=>'pencil', 'filter'=>'filter', 'split'=>'code-fork',
|
||||
'bank'=>'university', 'close_title'=>'window-close', 'delete'=>'trash', 'edit'=>'pencil', 'filter'=>'filter', 'split'=>'code-branch',
|
||||
'object_list'=>'list-alt', 'object_calendar'=>'calendar-alt', 'object_calendarweek'=>'calendar-week', 'object_calendarmonth'=>'calendar-alt', 'object_calendarday'=>'calendar-day', 'object_calendarperuser'=>'table',
|
||||
'error'=>'exclamation-triangle', 'warning'=>'exclamation-triangle',
|
||||
'title_setup'=>'tools', 'title_accountancy'=>'money-check-alt', 'title_bank'=>'university', 'title_hrm'=>'umbrella-beach', 'title_agenda'=>'calendar-alt'
|
||||
|
||||
@ -108,7 +108,7 @@ $badgeStatus0 = '#cbd3d3';
|
||||
$badgeStatus1 = '#bc9526';
|
||||
$badgeStatus2 = '#e6f0f0';
|
||||
$badgeStatus3 = '#bca52b';
|
||||
$badgeStatus4 = '#759580';
|
||||
$badgeStatus4 = '#55a590';
|
||||
$badgeStatus5 = '#cad2d2';
|
||||
$badgeStatus6 = '#cad2d2';
|
||||
$badgeStatus7 = '#baa32b';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user