Merge remote branch 'upstream/develop' into tooltip
Conflicts: htdocs/fourn/commande/list.php
This commit is contained in:
commit
6a1865adb6
@ -1894,7 +1894,7 @@ if ($action == 'create')
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
if ($action == 'classify') {
|
||||
$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0);
|
||||
$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1);
|
||||
} else {
|
||||
$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0);
|
||||
}
|
||||
|
||||
@ -932,6 +932,10 @@ if (empty($reshook))
|
||||
$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1975,7 +1979,7 @@ if ($action == 'create' && $user->rights->commande->creer) {
|
||||
print '</td><td colspan="3">';
|
||||
// print "$object->id, $object->socid, $object->fk_project";
|
||||
if ($action == 'classify') {
|
||||
$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0);
|
||||
$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1);
|
||||
} else {
|
||||
$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0);
|
||||
}
|
||||
|
||||
@ -486,11 +486,11 @@ else if ($id)
|
||||
print '</td><td colspan="3">';
|
||||
if ($action == 'classify')
|
||||
{
|
||||
$form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project,'projectid');
|
||||
$form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project,'projectid', 0, 0, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
$form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project,'none');
|
||||
$form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project,'none', 0, 0);
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -2538,7 +2538,8 @@ if ($action == 'create')
|
||||
}
|
||||
|
||||
// Confirmation de la validation
|
||||
if ($action == 'valid') {
|
||||
if ($action == 'valid')
|
||||
{
|
||||
// on verifie si l'objet est en numerotation provisoire
|
||||
$objectref = substr($object->ref, 1, 4);
|
||||
if ($objectref == 'PROV') {
|
||||
@ -2569,7 +2570,8 @@ if ($action == 'create')
|
||||
$qualified_for_stock_change = $object->hasProductsOrServices(1);
|
||||
}
|
||||
|
||||
if ($object->type != Facture::TYPE_DEPOSIT && ! empty($conf->global->STOCK_CALCULATE_ON_BILL) && $qualified_for_stock_change) {
|
||||
if ($object->type != Facture::TYPE_DEPOSIT && ! empty($conf->global->STOCK_CALCULATE_ON_BILL) && $qualified_for_stock_change)
|
||||
{
|
||||
$langs->load("stocks");
|
||||
require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/product/stock/class/entrepot.class.php';
|
||||
@ -3352,7 +3354,7 @@ if ($action == 'create')
|
||||
|
||||
print '</td><td colspan="3">';
|
||||
if ($action == 'classify') {
|
||||
$form->form_project($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0);
|
||||
$form->form_project($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1);
|
||||
} else {
|
||||
$form->form_project($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0);
|
||||
}
|
||||
|
||||
@ -1192,11 +1192,11 @@ else
|
||||
print '</td><td colspan="3">';
|
||||
if ($action == "classify")
|
||||
{
|
||||
$form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id,$object->socid,$object->fk_project,"projectid");
|
||||
$form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id,$object->socid,$object->fk_project,"projectid", 0, 0, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
$form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id,$object->socid,$object->fk_project,"none");
|
||||
$form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id,$object->socid,$object->fk_project,"none", 0, 0);
|
||||
}
|
||||
print "</td></tr>";
|
||||
}
|
||||
@ -1730,7 +1730,7 @@ else
|
||||
if ($user->societe_id == 0)
|
||||
{
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('addMoreActionsButtons',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
|
||||
|
||||
@ -1226,12 +1226,13 @@ class Form
|
||||
if ($num)
|
||||
{
|
||||
// Enhance with select2
|
||||
if ($conf->use_javascript_ajax)
|
||||
$nodatarole='';
|
||||
/*if ($conf->use_javascript_ajax)
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
|
||||
$out.= ajax_combobox($htmlname);
|
||||
$out.= ajax_combobox($htmlname);
|
||||
$nodatarole=' data-role="none"';
|
||||
}
|
||||
}*/
|
||||
|
||||
$out.= '<select class="flat" id="'.$htmlname.'" name="'.$htmlname.'"'.($disabled?' disabled="disabled"':'').$nodatarole.'>';
|
||||
if ($show_empty) $out.= '<option value="-1"'.((empty($selected) || $selected==-1)?' selected="selected"':'').'> </option>'."\n";
|
||||
@ -3147,9 +3148,10 @@ class Form
|
||||
* @param string $htmlname Name of select field
|
||||
* @param int $discard_closed Discard closed projects (0=Keep,1=hide completely,2=Disable)
|
||||
* @param int $maxlength Max length
|
||||
* @param int $forcefocus Force focus on field (works with javascript only)
|
||||
* @return void
|
||||
*/
|
||||
function form_project($page, $socid, $selected='', $htmlname='projectid', $discard_closed=0, $maxlength=20)
|
||||
function form_project($page, $socid, $selected='', $htmlname='projectid', $discard_closed=0, $maxlength=20, $forcefocus=0)
|
||||
{
|
||||
global $langs;
|
||||
|
||||
@ -3161,12 +3163,13 @@ class Form
|
||||
$langs->load("project");
|
||||
if ($htmlname != "none")
|
||||
{
|
||||
print "\n";
|
||||
print '<form method="post" action="'.$page.'">';
|
||||
print '<input type="hidden" name="action" value="classin">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<table class="nobordernopadding" cellpadding="0" cellspacing="0">';
|
||||
print '<tr><td>';
|
||||
$formproject->select_projects($socid,$selected,$htmlname,$maxlength,0,1,$discard_closed);
|
||||
$formproject->select_projects($socid,$selected,$htmlname,$maxlength,0,1,$discard_closed, $forcefocus);
|
||||
print '</td>';
|
||||
print '<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||
print '</tr></table></form>';
|
||||
|
||||
@ -52,9 +52,10 @@ class FormProjets
|
||||
* @param int $option_only Return only html options lines without the select tag
|
||||
* @param int $show_empty Add an empty line
|
||||
* @param int $discard_closed Discard closed projects (0=Keep,1=hide completely,2=Disable)
|
||||
* @param int $forcefocus Force focus on field (works with javascript only)
|
||||
* @return int Nber of project if OK, <0 if KO
|
||||
*/
|
||||
function select_projects($socid=-1, $selected='', $htmlname='projectid', $maxlength=24, $option_only=0, $show_empty=1, $discard_closed=0)
|
||||
function select_projects($socid=-1, $selected='', $htmlname='projectid', $maxlength=24, $option_only=0, $show_empty=1, $discard_closed=0, $forcefocus=0)
|
||||
{
|
||||
global $user,$conf,$langs;
|
||||
|
||||
@ -85,8 +86,17 @@ class FormProjets
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
// Use select2 selector
|
||||
$nodatarole='';
|
||||
if (! empty($conf->use_javascript_ajax))
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
|
||||
$out.= ajax_combobox($htmlname, '', 0, $forcefocus);
|
||||
$nodatarole=' data-role="none"';
|
||||
}
|
||||
|
||||
if (empty($option_only)) {
|
||||
$out.= '<select class="flat" name="'.$htmlname.'">';
|
||||
$out.= '<select class="flat" id="'.$htmlname.'" name="'.$htmlname.'"'.$nodatarole.'>';
|
||||
}
|
||||
if (!empty($show_empty)) {
|
||||
$out.= '<option value="0"> </option>';
|
||||
@ -162,14 +172,9 @@ class FormProjets
|
||||
if (empty($option_only)) {
|
||||
$out.= '</select>';
|
||||
}
|
||||
|
||||
print $out;
|
||||
|
||||
// Use select2 selector
|
||||
if (! empty($conf->use_javascript_ajax))
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
$this->db->free($resql);
|
||||
return $num;
|
||||
}
|
||||
|
||||
@ -314,25 +314,28 @@ function ajax_dialog($title,$message,$w=350,$h=150)
|
||||
* @param string $htmlname Name of html select field
|
||||
* @param array $events More events option. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
|
||||
* @param int $minLengthToAutocomplete Minimum length of input string to start autocomplete
|
||||
* @param int $forcefocus Force focus on field
|
||||
* @return string Return html string to convert a select field into a combo
|
||||
*/
|
||||
function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0)
|
||||
function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $forcefocus=0)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
//if (! empty($conf->browser->phone)) return ''; // combobox disabled for smartphones (does not works)
|
||||
//if (! empty($conf->dol_use_jmobile)) return ''; // select2 works with jmobile
|
||||
if (! empty($conf->global->MAIN_DISABLE_AJAX_COMBOX)) return '';
|
||||
if (empty($conf->use_javascript_ajax)) return '';
|
||||
|
||||
if (empty($conf->use_javascript_ajax)) return '';
|
||||
|
||||
if (empty($minLengthToAutocomplete)) $minLengthToAutocomplete=0;
|
||||
|
||||
|
||||
$msg = '<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$(\'#'.$htmlname.'\').select2({
|
||||
width: \'resolve\',
|
||||
minimumInputLength: '.$minLengthToAutocomplete.',
|
||||
});';
|
||||
})';
|
||||
if ($forcefocus) $msg.= '.select2(\'focus\')';
|
||||
$msg.= ';';
|
||||
|
||||
if (count($event))
|
||||
{
|
||||
@ -345,7 +348,7 @@ function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function runJsCodeForEvent'.$htmlname.'(obj) {
|
||||
var id = $("#'.$htmlname.'").val();
|
||||
var method = obj.method;
|
||||
@ -383,7 +386,7 @@ function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0)
|
||||
);
|
||||
}';
|
||||
}
|
||||
|
||||
|
||||
$msg.= '});'."\n";
|
||||
$msg.= "</script>\n";
|
||||
|
||||
|
||||
@ -337,11 +337,11 @@ if ($id > 0 || ! empty($ref))
|
||||
print '</td><td colspan="2">';
|
||||
if ($action == 'classify')
|
||||
{
|
||||
$form->form_project($_SERVER['PHP_SELF'].'?id='.$commande->id, $commande->socid, $commande->fk_project, 'projectid');
|
||||
$form->form_project($_SERVER['PHP_SELF'].'?id='.$commande->id, $commande->socid, $commande->fk_project, 'projectid', 0, 0, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
$form->form_project($_SERVER['PHP_SELF'].'?id='.$commande->id, $commande->socid, $commande->fk_project, 'none');
|
||||
$form->form_project($_SERVER['PHP_SELF'].'?id='.$commande->id, $commande->socid, $commande->fk_project, 'none', 0, 0);
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -1270,11 +1270,11 @@ else if ($id > 0 || ! empty($ref))
|
||||
print '</td><td colspan="3">';
|
||||
if ($action == 'classify')
|
||||
{
|
||||
$form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project,'projectid');
|
||||
$form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project,'projectid', 0, 0, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
$form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project,'none');
|
||||
$form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project,'none', 0, 0);
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -947,7 +947,7 @@ class FactureFournisseur extends CommonInvoice
|
||||
}
|
||||
|
||||
// Triggers call
|
||||
if (! $error && $notrigger)
|
||||
if (! $error && empty($notrigger))
|
||||
{
|
||||
// Call trigger
|
||||
$result=$this->call_trigger('BILL_SUPPLIER_VALIDATE',$user);
|
||||
|
||||
@ -534,8 +534,8 @@ if ($action == 'confirm_valid' && $confirm == 'yes' &&
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($object->error, 'errors');
|
||||
{
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
|
||||
// If we have permission, and if we don't need to provide the idwarehouse, we go directly on approved step
|
||||
@ -1615,7 +1615,7 @@ elseif (! empty($object->id))
|
||||
//print "$object->id, $object->socid, $object->fk_project";
|
||||
if ($action == 'classify')
|
||||
{
|
||||
$form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS)?$object->socid:'-1', $object->fk_project, 'projectid', 0, 0);
|
||||
$form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, (empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS)?$object->socid:'-1'), $object->fk_project, 'projectid', 0, 0, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -32,6 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formorder.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
|
||||
$langs->load("orders");
|
||||
$langs->load("sendings");
|
||||
@ -41,6 +42,7 @@ $search_ref=GETPOST('search_ref');
|
||||
$search_refsupp=GETPOST('search_refsupp');
|
||||
$search_company=GETPOST('search_company');
|
||||
$search_user=GETPOST('search_user');
|
||||
$search_ht=GETPOST('search_ht');
|
||||
$search_ttc=GETPOST('search_ttc');
|
||||
$sall=GETPOST('search_all');
|
||||
$search_status=GETPOST('search_status','int');
|
||||
@ -64,12 +66,14 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both
|
||||
$search_refsupp='';
|
||||
$search_company='';
|
||||
$search_user='';
|
||||
$search_ht='';
|
||||
$search_ttc='';
|
||||
$search_status='';
|
||||
}
|
||||
|
||||
if ($search_status == '') $search_status=-1;
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
@ -89,6 +93,7 @@ if ($socid > 0)
|
||||
|
||||
llxHeader('',$title);
|
||||
|
||||
|
||||
if ($sortorder == "") $sortorder="DESC";
|
||||
if ($sortfield == "") $sortfield="cf.date_creation";
|
||||
$offset = $conf->liste_limit * $page ;
|
||||
@ -98,14 +103,13 @@ $offset = $conf->liste_limit * $page ;
|
||||
* Mode Liste
|
||||
*/
|
||||
|
||||
$sql = "SELECT s.rowid as socid, s.nom as name, cf.date_commande as dc";
|
||||
$sql.= ", cf.rowid,cf.ref, cf.ref_supplier, cf.fk_statut, cf.total_ht, cf.tva as total_tva, cf.total_ttc, cf.fk_user_author,cf.date_livraison";
|
||||
$sql.= ", p.rowid as project_id";
|
||||
$sql.= ", p.ref as project_ref";
|
||||
$sql.= ", u.firstname";
|
||||
$sql.= ", u.lastname";
|
||||
$sql.= ", u.photo";
|
||||
$sql.= ", u.login";
|
||||
$sql = "SELECT s.rowid as socid, s.nom as name, cf.date_commande as dc,";
|
||||
$sql.= " cf.rowid,cf.ref, cf.ref_supplier, cf.fk_statut, cf.total_ht, cf.tva as total_tva, cf.total_ttc, cf.fk_user_author,cf.date_livraison,";
|
||||
$sql.= " p.rowid as project_id, p.ref as project_ref,";
|
||||
$sql.= " u.firstname,";
|
||||
$sql.= " u.lastname,";
|
||||
$sql.= " u.photo,";
|
||||
$sql.= " u.login";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s,";
|
||||
$sql.= " ".MAIN_DB_PREFIX."commande_fournisseur as cf";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON cf.fk_user_author = u.rowid";
|
||||
@ -126,9 +130,13 @@ if ($search_user)
|
||||
{
|
||||
$sql.= " AND u.login LIKE '%".$db->escape($search_user)."%'";
|
||||
}
|
||||
if ($search_ht)
|
||||
{
|
||||
$sql .= " AND cf.total_ht = '".$db->escape(price2num($search_ht))."'";
|
||||
}
|
||||
if ($search_ttc)
|
||||
{
|
||||
$sql .= " AND total_ttc = '".$db->escape(price2num($search_ttc))."'";
|
||||
$sql .= " AND cf.total_ttc = '".$db->escape(price2num($search_ttc))."'";
|
||||
}
|
||||
if ($sall)
|
||||
{
|
||||
@ -139,7 +147,7 @@ if ($socid) $sql.= " AND s.rowid = ".$socid;
|
||||
//Required triple check because statut=0 means draft filter
|
||||
if (GETPOST('statut', 'int') !== '')
|
||||
{
|
||||
$sql .= " AND fk_statut IN (".GETPOST('statut').")";
|
||||
$sql .= " AND cf.fk_statut IN (".GETPOST('statut').")";
|
||||
}
|
||||
if ($search_refsupp)
|
||||
{
|
||||
@ -147,8 +155,8 @@ if ($search_refsupp)
|
||||
}
|
||||
if ($search_status >= 0)
|
||||
{
|
||||
if ($search_status == 6 || $search_status == 7) $sql.=" AND fk_statut IN (6,7)";
|
||||
else $sql.=" AND fk_statut = ".$search_status;
|
||||
if ($search_status == 6 || $search_status == 7) $sql.=" AND cf.fk_statut IN (6,7)";
|
||||
else $sql.=" AND cf.fk_statut = ".$search_status;
|
||||
}
|
||||
|
||||
$sql.= $db->order($sortfield,$sortorder);
|
||||
@ -187,7 +195,8 @@ if ($resql)
|
||||
print_liste_field_titre($langs->trans("Thirdparty"),$_SERVER["PHP_SELF"],"s.nom","",$param,'',$sortfield,$sortorder);
|
||||
if (! empty($conf->global->PROJECT_SHOW_REF_INTO_LISTS)) print_liste_field_titre($langs->trans("Project"),$_SERVER["PHP_SELF"],"p.ref","",$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Author"),$_SERVER["PHP_SELF"],"u.login","",$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("AmountTTC"),$_SERVER["PHP_SELF"],"total_ttc","",$param,$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"cf.total_ht","",$param,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("AmountTTC"),$_SERVER["PHP_SELF"],"cf.total_ttc","",$param,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("OrderDate"),$_SERVER["PHP_SELF"],"dc","",$param,'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('DateDeliveryPlanned'),$_SERVER["PHP_SELF"],'cf.date_livraison','',$param, 'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"cf.fk_statut","",$param,'align="right"',$sortfield,$sortorder);
|
||||
@ -197,15 +206,16 @@ if ($resql)
|
||||
print '<tr class="liste_titre">';
|
||||
|
||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_ref" value="'.$search_ref.'"></td>';
|
||||
if (empty($conf->global->SUPPLIER_ORDER_HIDE_REF_SUPPLIER)) print '<td class="liste_titre"><input type="text" class="flat" name="search_refsupp" value="'.$search_refsupp.'"></td>';
|
||||
if (empty($conf->global->SUPPLIER_ORDER_HIDE_REF_SUPPLIER)) print '<td class="liste_titre"><input type="text" class="flat" size="8" name="search_refsupp" value="'.$search_refsupp.'"></td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_company" value="'.$search_company.'"></td>';
|
||||
if (! empty($conf->global->PROJECT_SHOW_REF_INTO_LISTS))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print '</td>';
|
||||
}
|
||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_user" value="'.$search_user.'"></td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_ttc" value="'.$search_ttc.'"></td>';
|
||||
print '<td class="liste_titre"><input type="text" size="6" class="flat" name="search_user" value="'.$search_user.'"></td>';
|
||||
print '<td class="liste_titre" align="right"><input type="text" size="4" class="flat" name="search_ht" value="'.$search_ht.'"></td>';
|
||||
print '<td class="liste_titre" align="right"><input type="text" size="4" class="flat" name="search_ttc" value="'.$search_ttc.'"></td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre" align="right">';
|
||||
@ -219,6 +229,7 @@ if ($resql)
|
||||
|
||||
$userstatic = new User($db);
|
||||
$objectstatic=new CommandeFournisseur($db);
|
||||
$projectstatic=new Project($db);
|
||||
|
||||
while ($i < min($num,$conf->liste_limit))
|
||||
{
|
||||
@ -242,7 +253,7 @@ if ($resql)
|
||||
print '</td>'."\n";
|
||||
|
||||
// Ref Supplier
|
||||
if (empty($conf->global->SUPPLIER_ORDER_HIDE_REF_SUPPLIER)) print '<td>'.$obj->ref_supplier.'</td>'."\n";
|
||||
if (empty($conf->global->SUPPLIER_ORDER_HIDE_REF_SUPPLIER)) print '<td>'.$obj->ref_supplier.'</td>'."\n";
|
||||
|
||||
// Thirdparty
|
||||
print '<td>';
|
||||
@ -272,7 +283,10 @@ if ($resql)
|
||||
else print " ";
|
||||
print "</td>";
|
||||
|
||||
// Amount
|
||||
// Amount net
|
||||
print '<td align="right" width="100">'.price($obj->total_ht)."</td>";
|
||||
|
||||
// Amount with tax
|
||||
print '<td align="right" width="100">'.price($obj->total_ttc)."</td>";
|
||||
|
||||
// Date
|
||||
|
||||
@ -157,8 +157,7 @@ elseif ($action == 'confirm_valid' && $confirm == 'yes' &&
|
||||
$result = $object->validate($user,'',$idwarehouse);
|
||||
if ($result < 0)
|
||||
{
|
||||
setEventMessage($object->error,'errors');
|
||||
setEventMessage($object->errors,'errors');
|
||||
setEventMessages($object->error,$object->errors,'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1941,7 +1940,7 @@ else
|
||||
print '</td><td colspan="3">';
|
||||
if ($action == 'classify')
|
||||
{
|
||||
$form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS)?$object->socid:'-1', $object->fk_project, 'projectid', 0, 0);
|
||||
$form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, (empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS)?$object->socid:'-1'), $object->fk_project, 'projectid', 0, 0, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user