Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
ece46511f2
@ -640,7 +640,9 @@ $newcardbutton .= dolGetButtonTitle($buttonLabel, $langs->trans("ExportFilteredL
|
||||
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('GroupByAccountAccounting'), '', 'fa fa-stream paddingleft', DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?'.$param);
|
||||
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewAccountingMvt'), '', 'fa fa-plus-circle paddingleft', './card.php?action=create', '', $user->rights->accounting->mouvements->creer);
|
||||
$url = './card.php?action=create';
|
||||
if (!empty($socid)) $url .= '&socid='.$socid;
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewAccountingMvt'), '', 'fa fa-plus-circle paddingleft', $url, '', $user->rights->accounting->mouvements->creer);
|
||||
|
||||
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $newcardbutton, '', $limit);
|
||||
|
||||
|
||||
@ -67,7 +67,6 @@ $arrayofcss = array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css
|
||||
|
||||
llxHeader('', $title, '', '', 0, 0, $arrayofjs, $arrayofcss);
|
||||
|
||||
|
||||
$newcardbutton = '';
|
||||
if (!empty($user->rights->categorie->creer)) {
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewCategory'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/categories/card.php?action=create&type='.$type.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?type='.$type.$moreparam).$moreparam);
|
||||
|
||||
@ -519,20 +519,21 @@ if ($resql)
|
||||
|
||||
$viewmode .= '<span class="marginrightonly"></span>';
|
||||
|
||||
$newcardbutton = '';
|
||||
if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create)
|
||||
{
|
||||
$tmpforcreatebutton = dol_getdate(dol_now(), true);
|
||||
$tmpforcreatebutton = dol_getdate(dol_now(), true);
|
||||
|
||||
$newparam .= '&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$tmpforcreatebutton['year'];
|
||||
$newparam .= '&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$tmpforcreatebutton['year'];
|
||||
|
||||
//$param='month='.$monthshown.'&year='.$year;
|
||||
$hourminsec = '100000';
|
||||
|
||||
$url = DOL_URL_ROOT.'/comm/action/card.php?action=create';
|
||||
$url .= '&datep='.sprintf("%04d%02d%02d", $tmpforcreatebutton['year'], $tmpforcreatebutton['mon'], $tmpforcreatebutton['mday']).$hourminsec;
|
||||
$url .= '&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam ? '?'.$newparam : ''));
|
||||
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', $url, '', $user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create);
|
||||
|
||||
//$param='month='.$monthshown.'&year='.$year;
|
||||
$hourminsec = '100000';
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.sprintf("%04d%02d%02d", $tmpforcreatebutton['year'], $tmpforcreatebutton['mon'], $tmpforcreatebutton['mday']).$hourminsec.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam ? '?'.$newparam : '')));
|
||||
}
|
||||
$param .= '&action='.$action;
|
||||
|
||||
|
||||
print_barre_liste($langs->trans("Agenda"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, -1 * $nbtotalofrecords, 'object_action', 0, $nav.$newcardbutton, '', $limit, 0, 0, 1, $viewmode);
|
||||
|
||||
print $s;
|
||||
|
||||
@ -480,11 +480,9 @@ if ($resql)
|
||||
if (in_array($massaction, array('presend', 'predelete', 'closed'))) $arrayofmassactions = array();
|
||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton = '';
|
||||
if ($user->rights->propal->creer)
|
||||
{
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewPropal'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/propal/card.php?action=create');
|
||||
}
|
||||
$url = DOL_URL_ROOT.'/comm/propal/card.php?action=create';
|
||||
if (!empty($socid)) $url .= '&socid='.$socid;
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('NewPropal'), '', 'fa fa-plus-circle', $url, '', $user->rights->propal->creer);
|
||||
|
||||
// Fields title search
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
|
||||
@ -483,11 +483,9 @@ if ($resql)
|
||||
if (in_array($massaction, array('presend', 'predelete', 'createbills'))) $arrayofmassactions = array();
|
||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton = '';
|
||||
if ($contextpage == 'orderlist' && $user->rights->commande->creer)
|
||||
{
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewOrder'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/commande/card.php?action=create');
|
||||
}
|
||||
$url = DOL_URL_ROOT.'/commande/card.php?action=create';
|
||||
if (!empty($socid)) $url .= '&socid='.$socid;
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('NewOrder'), '', 'fa fa-plus-circle', $url, '', $contextpage == 'orderlist' && $user->rights->commande->creer);
|
||||
|
||||
// Lines of title fields
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
|
||||
@ -247,12 +247,7 @@ if ($user->rights->banque->supprimer) $arrayofmassactions['predelete'] = '<span
|
||||
if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array();
|
||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton = '';
|
||||
if ($user->rights->banque->configurer)
|
||||
{
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewFinancialAccount'), '', 'fa fa-plus-circle', 'card.php?action=create');
|
||||
}
|
||||
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('NewFinancialAccount'), '', 'fa fa-plus-circle', 'card.php?action=create', '', $user->rights->banque->configurer);
|
||||
|
||||
// Lines of title fields
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
|
||||
@ -253,11 +253,9 @@ if ($result)
|
||||
|
||||
if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss);
|
||||
|
||||
$newcardbutton = '';
|
||||
if ($user->rights->banque->modifier)
|
||||
{
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('MenuNewVariousPayment'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create');
|
||||
}
|
||||
$url = DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create';
|
||||
if (!empty($socid)) $url .= '&socid='.$socid;
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('MenuNewVariousPayment'), '', 'fa fa-plus-circle', $url, '', $user->rights->banque->modifier);
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
|
||||
|
||||
@ -674,10 +674,12 @@ if ($resql)
|
||||
if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array();
|
||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton = '';
|
||||
if ($user->rights->facture->creer && $contextpage != 'poslist')
|
||||
// Show the new button only when this page is not opend from the Extended POS
|
||||
if ($contextpage != 'poslist')
|
||||
{
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewBill'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/facture/card.php?action=create');
|
||||
$url = DOL_URL_ROOT.'/compta/facture/card.php?action=create';
|
||||
if (!empty($socid)) $url .= '&socid='.$socid;
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('NewBill'), '', 'fa fa-plus-circle', $url, '', $user->rights->facture->creer);
|
||||
}
|
||||
|
||||
$i = 0;
|
||||
@ -756,6 +758,7 @@ if ($resql)
|
||||
|
||||
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
||||
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
||||
// Show the massaction checkboxes only when this page is not opend from the Extended POS
|
||||
if ($massactionbutton && $contextpage != 'poslist') $selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
@ -1562,7 +1565,7 @@ if ($resql)
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Action column
|
||||
// Action column (Show the massaction button only when this page is not opend from the Extended POS)
|
||||
print '<td class="nowrap" align="center">';
|
||||
if (($massactionbutton || $massaction) && $contextpage != 'poslist') // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||
{
|
||||
@ -1593,6 +1596,7 @@ if ($resql)
|
||||
|
||||
print "</form>\n";
|
||||
|
||||
// Show the file area only when this page is not opend from the Extended POS
|
||||
if ($contextpage != 'poslist') {
|
||||
$hidegeneratedfilelistifempty = 1;
|
||||
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0;
|
||||
|
||||
@ -42,11 +42,9 @@ llxHeader();
|
||||
|
||||
$localtax_static = new Localtax($db);
|
||||
|
||||
$newcardbutton = '';
|
||||
if ($user->rights->tax->charges->creer)
|
||||
{
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewLocalTaxPayment', ($ltt + 1)), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/localtax/card.php?action=create&localTaxType='.$ltt);
|
||||
}
|
||||
$url = DOL_URL_ROOT.'/compta/localtax/card.php?action=create&localTaxType='.$ltt;
|
||||
if (!empty($socid)) $url .= '&socid='.$socid;
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('NewLocalTaxPayment', ($ltt + 1)), '', 'fa fa-plus-circle', $url, '', $user->rights->tax->charges->creer);
|
||||
|
||||
print load_fiche_titre($langs->transcountry($ltt == 2 ? "LT2Payments" : "LT1Payments", $mysoc->country_code), $newcardbutton, 'title_accountancy');
|
||||
|
||||
|
||||
@ -124,11 +124,9 @@ if ($resql)
|
||||
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.$limit;
|
||||
|
||||
$newcardbutton = '';
|
||||
if ($user->rights->banque->cheque)
|
||||
{
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewCheckDeposit'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/paiement/cheque/card.php?action=new');
|
||||
}
|
||||
$url = DOL_URL_ROOT.'/compta/paiement/cheque/card.php?action=new';
|
||||
if (!empty($socid)) $url .= '&socid='.$socid;
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('NewCheckDeposit'), '', 'fa fa-plus-circle', $url, '', $user->rights->banque->cheque);
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
|
||||
@ -146,11 +146,9 @@ if ($result)
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.$limit;
|
||||
if ($typeid) $param .= '&typeid='.$typeid;
|
||||
|
||||
$newcardbutton = '';
|
||||
if ($user->rights->tax->charges->creer)
|
||||
{
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewVATPayment', ($ltt + 1)), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/tva/card.php?action=create');
|
||||
}
|
||||
$url = DOL_URL_ROOT.'/compta/tva/card.php?action=create';
|
||||
if (!empty($socid)) $url .= '&socid='.$socid;
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('NewVATPayment', ($ltt + 1)), '', 'fa fa-plus-circle', $url, '', $user->rights->tax->charges->creer);
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
|
||||
@ -538,11 +538,7 @@ if ($user->rights->societe->supprimer) $arrayofmassactions['predelete'] = '<span
|
||||
if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array();
|
||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton = '';
|
||||
if ($user->rights->societe->contact->creer)
|
||||
{
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewContactAddress'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/contact/card.php?action=create');
|
||||
}
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('NewContactAddress'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/contact/card.php?action=create', '', $user->rights->societe->contact->creer);
|
||||
|
||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'" name="formfilter">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
|
||||
@ -369,11 +369,9 @@ if ($user->rights->contrat->supprimer) $arrayofmassactions['predelete'] = '<span
|
||||
if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array();
|
||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton = '';
|
||||
if ($user->rights->contrat->creer)
|
||||
{
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewContractSubscription'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/contrat/card.php?action=create');
|
||||
}
|
||||
$url = DOL_URL_ROOT.'/contrat/card.php?action=create';
|
||||
if (!empty($socid)) $url .= '&socid='.$socid;
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('NewContractSubscription'), '', 'fa fa-plus-circle', $url, '', $user->rights->contrat->creer);
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
|
||||
@ -397,6 +397,8 @@ abstract class CommonDocGenerator
|
||||
$array_key.'_payment_term_code'=>$object->cond_reglement_code,
|
||||
$array_key.'_payment_term'=>($outputlangs->transnoentitiesnoconv('PaymentCondition'.$object->cond_reglement_code) != 'PaymentCondition'.$object->cond_reglement_code ? $outputlangs->transnoentitiesnoconv('PaymentCondition'.$object->cond_reglement_code) : ($object->cond_reglement_doc ? $object->cond_reglement_doc : $object->cond_reglement)),
|
||||
|
||||
$array_key.'_incoterms'=>(method_exists($object, 'display_incoterms') ? $object->display_incoterms() : ''),
|
||||
|
||||
$array_key.'_bank_iban'=>$bank_account->iban,
|
||||
$array_key.'_bank_bic'=>$bank_account->bic,
|
||||
|
||||
|
||||
@ -359,11 +359,11 @@ if ($resql)
|
||||
if (in_array($massaction, array('presend'))) $arrayofmassactions = array();
|
||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton = '';
|
||||
if ($user->rights->expedition->creer)
|
||||
{
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewSending'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/expedition/card.php?action=create2');
|
||||
}
|
||||
// Currently: a sending can't create from sending list
|
||||
// $url = DOL_URL_ROOT.'/expedition/card.php?action=create';
|
||||
// if (!empty($socid)) $url .= '&socid='.$socid;
|
||||
// $newcardbutton = dolGetButtonTitle($langs->trans('NewSending'), '', 'fa fa-plus-circle', $url, '', $user->rights->expedition->creer);
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('NewSending'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/expedition/card.php?action=create2', '', $user->rights->expedition->creer);
|
||||
|
||||
$i = 0;
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
|
||||
@ -372,11 +372,9 @@ if ($resql)
|
||||
} else {
|
||||
$title = $langs->trans("ListTripsAndExpenses");
|
||||
|
||||
$newcardbutton = '';
|
||||
if ($user->rights->expensereport->creer)
|
||||
{
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewTrip'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/expensereport/card.php?action=create');
|
||||
}
|
||||
$url = DOL_URL_ROOT.'/expensereport/card.php?action=create';
|
||||
if (!empty($socid)) $url .= '&socid='.$socid;
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('NewTrip'), '', 'fa fa-plus-circle', $url, '', $user->rights->expensereport->creer);
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'trip', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
}
|
||||
|
||||
@ -95,9 +95,10 @@ $fieldstosearchall = array(
|
||||
's.nom'=>"ThirdParty",
|
||||
'f.description'=>'Description',
|
||||
'f.note_public'=>'NotePublic',
|
||||
'fd.description'=>'DescriptionOfLine',
|
||||
);
|
||||
if (empty($user->socid)) $fieldstosearchall["f.note_private"] = "NotePrivate";
|
||||
if (!empty($conf->global->FICHINTER_DISABLE_DETAILS)) unset($fieldstosearchall['f.description']);
|
||||
if (!empty($conf->global->FICHINTER_DISABLE_DETAILS)) unset($fieldstosearchall['fd.description']);
|
||||
|
||||
// Definition of fields for list
|
||||
$arrayfields = array(
|
||||
@ -319,7 +320,10 @@ if ($resql)
|
||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton = '';
|
||||
$morehtmlcenter .= dolGetButtonTitle($langs->trans('NewIntervention'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/fichinter/card.php?action=create', '', $user->rights->ficheinter->creer);
|
||||
|
||||
$url = DOL_URL_ROOT.'/fichinter/card.php?action=create';
|
||||
if (!empty($socid)) $url .= '&socid='.$socid;
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('NewIntervention'), '', 'fa fa-plus-circle', $url, '', $user->rights->ficheinter->creer);
|
||||
|
||||
// Lines of title fields
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
|
||||
@ -649,11 +649,9 @@ if ($resql)
|
||||
if (in_array($massaction, array('presend', 'predelete', 'createbills'))) $arrayofmassactions = array();
|
||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton = '';
|
||||
if ($user->rights->fournisseur->commande->creer)
|
||||
{
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewOrder'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/fourn/commande/card.php?action=create');
|
||||
}
|
||||
$url = DOL_URL_ROOT.'/fourn/commande/card.php?action=create';
|
||||
if (!empty($socid)) $url .= '&socid='.$socid;
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('NewOrder'), '', 'fa fa-plus-circle', $url, '', $user->rights->fournisseur->commande->creer);
|
||||
|
||||
// Fields title search
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
|
||||
@ -508,11 +508,9 @@ if ($resql)
|
||||
if (in_array($massaction, array('presend', 'predelete', 'createbills'))) $arrayofmassactions = array();
|
||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton = '';
|
||||
if ($user->rights->fournisseur->facture->creer)
|
||||
{
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewBill'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/fourn/facture/card.php?action=create');
|
||||
}
|
||||
$url = DOL_URL_ROOT.'/fourn/facture/card.php?action=create';
|
||||
if (!empty($socid)) $url .= '&socid='.$socid;
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('NewBill'), '', 'fa fa-plus-circle', $url, '', $user->rights->fournisseur->facture->creer);
|
||||
|
||||
$i = 0;
|
||||
print '<form method="POST" name="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
|
||||
@ -432,11 +432,7 @@ if ($resql)
|
||||
} else {
|
||||
$title = $langs->trans("ListeCP");
|
||||
|
||||
$newcardbutton = '';
|
||||
if ($user->rights->holiday->write)
|
||||
{
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('MenuAddCP'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/holiday/card.php?action=create');
|
||||
}
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('MenuAddCP'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/holiday/card.php?action=create', '', $user->rights->holiday->write);
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_hrm', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
}
|
||||
|
||||
@ -32,13 +32,13 @@ create table llx_bank
|
||||
fk_type varchar(6), -- TIP,VIR,PRE,CB,CHQ,... (Code in llx_c_paiement)
|
||||
num_releve varchar(50),
|
||||
num_chq varchar(50),
|
||||
numero_compte varchar(32) NULL, -- FEC:CompteNum | account number
|
||||
numero_compte varchar(32) NULL, -- FEC:CompteNum | account number
|
||||
rappro tinyint default 0,
|
||||
note text,
|
||||
fk_bordereau integer DEFAULT 0,
|
||||
banque varchar(255), -- banque pour les cheques
|
||||
emetteur varchar(255), -- emetteur du cheque
|
||||
author varchar(40) -- a supprimer apres migration
|
||||
banque varchar(255), -- banque pour les cheques
|
||||
emetteur varchar(255), -- emetteur du cheque
|
||||
author varchar(40), -- a supprimer apres migration
|
||||
origin_id integer,
|
||||
origin_type varchar(64) NULL,
|
||||
import_key varchar(14)
|
||||
|
||||
@ -150,11 +150,9 @@ if ($resql)
|
||||
if ($search_amount) $param .= "&search_amount=".urlencode($search_amount);
|
||||
if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss);
|
||||
|
||||
$newcardbutton = '';
|
||||
if ($user->rights->loan->write)
|
||||
{
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewLoan'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/loan/card.php?action=create');
|
||||
}
|
||||
$url = DOL_URL_ROOT.'/loan/card.php?action=create';
|
||||
if (!empty($socid)) $url .= '&socid='.$socid;
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('NewLoan'), '', 'fa fa-plus-circle', $url, '', $user->rights->loan->write);
|
||||
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
|
||||
@ -541,21 +541,18 @@ if ($resql)
|
||||
if ($type === "") $perm = ($user->rights->produit->creer || $user->rights->service->creer);
|
||||
elseif ($type == Product::TYPE_SERVICE) $perm = $user->rights->service->creer;
|
||||
elseif ($type == Product::TYPE_PRODUCT) $perm = $user->rights->produit->creer;
|
||||
if ($perm)
|
||||
{
|
||||
$oldtype = $type;
|
||||
$params = array();
|
||||
if ($type === "") $params['forcenohideoftext'] = 1;
|
||||
if ($type === "") {
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewProduct'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&type=0', '', 1, $params);
|
||||
$type = Product::TYPE_SERVICE;
|
||||
}
|
||||
$label = 'NewProduct';
|
||||
if ($type == Product::TYPE_SERVICE) $label = 'NewService';
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&type='.$type, '', 1, $params);
|
||||
|
||||
$type = $oldtype;
|
||||
$oldtype = $type;
|
||||
$params = array();
|
||||
if ($type === "") $params['forcenohideoftext'] = 1;
|
||||
if ($type === "") {
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewProduct'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&type=0', '', $perm, $params);
|
||||
$type = Product::TYPE_SERVICE;
|
||||
}
|
||||
$label = 'NewProduct';
|
||||
if ($type == Product::TYPE_SERVICE) $label = 'NewService';
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&type='.$type, '', $perm, $params);
|
||||
|
||||
$type = $oldtype;
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post" name="formulaire">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
|
||||
@ -448,11 +448,9 @@ if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions =
|
||||
|
||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton = '';
|
||||
if ($user->rights->projet->creer)
|
||||
{
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewProject'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/projet/card.php?action=create');
|
||||
}
|
||||
$url = DOL_URL_ROOT.'/projet/card.php?action=create';
|
||||
if (!empty($socid)) $url .= '&socid='.$socid;
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('NewProject'), '', 'fa fa-plus-circle', $url, '', $user->rights->projet->creer);
|
||||
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
|
||||
@ -421,11 +421,7 @@ if ($user->rights->societe->supprimer) $arrayofmassactions['predelete'] = '<span
|
||||
if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array();
|
||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton = '';
|
||||
if ($user->rights->projet->creer)
|
||||
{
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewTask'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/projet/tasks.php?action=create');
|
||||
}
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('NewTask'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/projet/tasks.php?action=create', '', $user->rights->projet->creer);
|
||||
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
|
||||
@ -153,11 +153,9 @@ if ($result)
|
||||
if ($typeid) $param .= '&typeid='.$typeid;
|
||||
if ($optioncss != '') $param .= '&optioncss='.$optioncss;
|
||||
|
||||
$newcardbutton = '';
|
||||
if (!empty($user->rights->salaries->write))
|
||||
{
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewSalaryPayment'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/salaries/card.php?action=create');
|
||||
}
|
||||
$url = DOL_URL_ROOT.'/salaries/card.php?action=create';
|
||||
if (!empty($socid)) $url .= '&socid='.$socid;
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('NewSalaryPayment'), '', 'fa fa-plus-circle', $url, '', $user->rights->salaries->write);
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
|
||||
@ -598,26 +598,28 @@ if ($user->rights->societe->supprimer) $arrayofmassactions['predelete'] = '<span
|
||||
if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array();
|
||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton = '';
|
||||
if ($user->rights->societe->creer && $contextpage != 'poslist')
|
||||
{
|
||||
$typefilter = '';
|
||||
$label = 'MenuNewThirdParty';
|
||||
$typefilter = '';
|
||||
$label = 'MenuNewThirdParty';
|
||||
|
||||
if (!empty($type))
|
||||
{
|
||||
$typefilter = '&type='.$type;
|
||||
if ($type == 'p') $label = 'MenuNewProspect';
|
||||
if ($type == 'c') $label = 'MenuNewCustomer';
|
||||
if ($type == 'f') $label = 'NewSupplier';
|
||||
}
|
||||
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/societe/card.php?action=create'.$typefilter);
|
||||
} elseif ($user->rights->societe->creer && $contextpage == 'poslist')
|
||||
if (!empty($type))
|
||||
{
|
||||
$typefilter = '&type='.$type;
|
||||
if ($type == 'p') $label = 'MenuNewProspect';
|
||||
if ($type == 'c') $label = 'MenuNewCustomer';
|
||||
if ($type == 'f') $label = 'NewSupplier';
|
||||
}
|
||||
|
||||
// Show the new button only when this page is not opend from the Extended POS (pop-up window)
|
||||
// but allow it too, when a user has the rights to create a new customer
|
||||
if ($contextpage != 'poslist')
|
||||
{
|
||||
$url = DOL_URL_ROOT.'/societe/card.php?action=create'.$typefilter;
|
||||
if (!empty($socid)) $url .= '&socid='.$socid;
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', $url, '', $user->rights->societe->creer);
|
||||
} elseif ($user->rights->societe->creer) {
|
||||
$url = DOL_URL_ROOT.'/societe/card.php?action=create&type=c&contextpage=poslist&optioncss=print&backtopage='.$_SERVER["PHP_SELF"].'?contextpage=poslist&nomassaction=1&optioncss=print&place='.urlencode($place);
|
||||
$label = 'MenuNewCustomer';
|
||||
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/societe/card.php?action=create&type=c&contextpage=poslist&optioncss=print&backtopage='.$_SERVER["PHP_SELF"].'?contextpage=poslist&nomassaction=1&optioncss=print&place='.urlencode($place));
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', $url);
|
||||
}
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'" name="formfilter" autocomplete="off">';
|
||||
@ -701,6 +703,7 @@ if ($moreforfilter)
|
||||
|
||||
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
||||
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
||||
// Show the massaction checkboxes only when this page is not opend from the Extended POS
|
||||
if ($massactionbutton && $contextpage != 'poslist') $selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
|
||||
|
||||
if (empty($arrayfields['customerorsupplier']['checked'])) print '<input type="hidden" name="type" value="'.$type.'">';
|
||||
@ -1308,7 +1311,7 @@ while ($i < min($num, $limit))
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Action column
|
||||
// Action column (Show the massaction button only when this page is not opend from the Extended POS)
|
||||
print '<td class="nowrap center">';
|
||||
if (($massactionbutton || $massaction) && $contextpage != 'poslist') // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||
{
|
||||
|
||||
@ -414,11 +414,9 @@ if ($resql)
|
||||
if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array();
|
||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton = '';
|
||||
if ($user->rights->supplier_proposal->creer)
|
||||
{
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewAskPrice'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/supplier_proposal/card.php?action=create');
|
||||
}
|
||||
$url = DOL_URL_ROOT.'/supplier_proposal/card.php?action=create';
|
||||
if (!empty($socid)) $url .= '&socid='.$socid;
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('NewAskPrice'), '', 'fa fa-plus-circle', $url, '', $user->rights->supplier_proposal->creer);
|
||||
|
||||
// Fields title search
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
|
||||
@ -1065,7 +1065,30 @@ if ($placeid > 0)
|
||||
|
||||
$htmlforlines .= '</td>';
|
||||
$htmlforlines .= '<td class="right">'.vatrate($line->remise_percent, true).'</td>';
|
||||
$htmlforlines .= '<td class="right">'.$line->qty.'</td>';
|
||||
$htmlforlines .= '<td class="right">';
|
||||
if (!empty($conf->stock->enabled))
|
||||
{
|
||||
$constantforkey = 'CASHDESK_ID_WAREHOUSE'.$_SESSION["takeposterminal"];
|
||||
$sql = "SELECT e.rowid, e.ref, e.lieu, e.fk_parent, e.statut, ps.reel, ps.rowid as product_stock_id, p.pmp";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."entrepot as e,";
|
||||
$sql .= " ".MAIN_DB_PREFIX."product_stock as ps";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = ps.fk_product";
|
||||
$sql .= " WHERE ps.reel != 0";
|
||||
$sql .= " AND ps.fk_entrepot = ".$conf->global->$constantforkey;
|
||||
$sql .= " AND e.entity IN (".getEntity('stock').")";
|
||||
$sql .= " AND ps.fk_product = ".$line->fk_product;
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
$stock_real = price2num($obj->reel, 'MS');
|
||||
$htmlforlines .= $line->qty
|
||||
if ($line->qty>$stock_real) $htmlforlines .= '<b><span style="color: var(--amountremaintopaycolor)">';
|
||||
$htmlforlines .= ' <span class="opacitymedium">('.$langs->trans("Stock").' '.$stock_real.')</span>';
|
||||
if ($line->qty>$stock_real) $htmlforlines .= "</span></b>";
|
||||
}
|
||||
}
|
||||
else $htmlforlines .= $line->qty;
|
||||
$htmlforlines .= '</td>';
|
||||
$htmlforlines .= '<td class="right classfortooltip" title="'.$moreinfo.'">'.price($line->total_ttc).'</td>';
|
||||
}
|
||||
$htmlforlines .= '</tr>'."\n";
|
||||
|
||||
@ -568,8 +568,9 @@ print '<input type="hidden" name="mode" value="'.$mode.'" >';
|
||||
if ($socid) print '<input type="hidden" name="socid" value="'.$socid.'" >';
|
||||
if ($projectid) print '<input type="hidden" name="projectid" value="'.$projectid.'" >';
|
||||
|
||||
$newcardbutton = '';
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewTicket'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/ticket/card.php?action=create'.($socid ? '&socid='.$socid : '').($projectid ? '&origin=projet_project&originid='.$projectid : ''), '', !empty($user->rights->ticket->write));
|
||||
$url = DOL_URL_ROOT.'/ticket/card.php?action=create'.($socid ? '&socid='.$socid : '').($projectid ? '&origin=projet_project&originid='.$projectid : '');
|
||||
if (!empty($socid)) $url .= '&socid='.$socid;
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('NewTicket'), '', 'fa fa-plus-circle', $url, '', $user->rights->ticket->write);
|
||||
|
||||
$picto = 'ticket';
|
||||
if ($socid > 0) $picto = '';
|
||||
|
||||
@ -301,11 +301,9 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
||||
|
||||
$text = $langs->trans("ListOfUsers");
|
||||
|
||||
$newcardbutton = '';
|
||||
if ($canadduser)
|
||||
{
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewUser'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/user/card.php?action=create'.($mode == 'employee' ? '&employee=1' : '').'&leftmenu=');
|
||||
}
|
||||
$url = DOL_URL_ROOT.'/user/card.php?action=create'.($mode == 'employee' ? '&employee=1' : '').'&leftmenu=';
|
||||
if (!empty($socid)) $url .= '&socid='.$socid;
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('NewUser'), '', 'fa fa-plus-circle', $url, '', $canadduser);
|
||||
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user