Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into mko559
This commit is contained in:
commit
c4b12d7371
@ -325,6 +325,10 @@ if ($nboftargetok) {
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/.gitignore $BUILDROOT/$PROJECT/*/.gitignore $BUILDROOT/$PROJECT/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.gitignore`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/theme/amarok`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/geoip/sample*.*`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/jqueryFileTree/connectors/jqueryFileTree.pl`; # Avoid errors into rpmlint
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/template`; # Package not valid for most linux distributions (errors reported into compile.js). Package should be embed by modules to avoid problems.
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpmailer`; # Package not valid for most linux distributions (errors reported into file LICENSE). Package should be embed by modules to avoid problems.
|
||||
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/license.txt`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PDF`;
|
||||
|
||||
@ -21,7 +21,7 @@ Exec=xdg-open http://localhost/dolibarr
|
||||
Icon=dolibarr
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Office;Finance
|
||||
Categories=Office;Finance;
|
||||
StartupNotify=true
|
||||
InitialPreference=5
|
||||
#NoDisplay=true
|
||||
|
||||
@ -242,7 +242,7 @@ then
|
||||
grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
|
||||
fi
|
||||
|
||||
# Create config for se $seconfig
|
||||
# Create config for SE Linux
|
||||
echo Add SE Linux permissions for dolibarr
|
||||
# semanage add records into /etc/selinux/targeted/contexts/files/file_contexts.local
|
||||
semanage fcontext -a -t httpd_sys_script_rw_t "/etc/dolibarr(/.*?)"
|
||||
|
||||
@ -140,7 +140,9 @@ cui hai bisogno ed essere facile da usare.
|
||||
%{__mkdir} -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
|
||||
%{__install} -m 644 doc/images/dolibarr_48x48.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name}.png
|
||||
%{__mkdir} -p $RPM_BUILD_ROOT%{_datadir}/applications
|
||||
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?mdkversion} || 0%{?suse_version}
|
||||
#desktop-file-install --delete-original --dir=$RPM_BUILD_ROOT%{_datadir}/applications build/rpm/%{name}.desktop
|
||||
%endif
|
||||
%{__install} -m 644 build/rpm/dolibarr.desktop $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
|
||||
|
||||
%{__mkdir} -p $RPM_BUILD_ROOT%{_datadir}/%{name}/build/rpm
|
||||
@ -167,11 +169,13 @@ cui hai bisogno ed essere facile da usare.
|
||||
|
||||
# Lang
|
||||
echo "%defattr(0644, root, root, 0644)" > %{name}.lang
|
||||
echo "%dir %{_datadir}/%{name}/htdocs/langs" >> %{name}.lang
|
||||
for i in $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/langs/*_*
|
||||
do
|
||||
lang=$(basename $i)
|
||||
lang1=`expr substr $lang 1 2`;
|
||||
lang2=`expr substr $lang 4 2 | tr "[:upper:]" "[:lower:]"`;
|
||||
echo "%dir %{_datadir}/%{name}/htdocs/langs/${lang}" >> %{name}.lang
|
||||
if [ "$lang1" = "$lang2" ] ; then
|
||||
echo "%lang(${lang1}) %{_datadir}/%{name}/htdocs/langs/${lang}/*.lang"
|
||||
else
|
||||
@ -198,6 +202,9 @@ done >>%{name}.lang
|
||||
%files -f %{name}.lang
|
||||
|
||||
%defattr(0755, root, root, 0755)
|
||||
|
||||
%dir %_datadir/dolibarr
|
||||
|
||||
%dir %_datadir/dolibarr/scripts
|
||||
%_datadir/dolibarr/scripts/*
|
||||
|
||||
@ -207,6 +214,8 @@ done >>%{name}.lang
|
||||
%_datadir/pixmaps/dolibarr.png
|
||||
%_datadir/applications/dolibarr.desktop
|
||||
|
||||
%dir %_datadir/dolibarr/build
|
||||
|
||||
%dir %_datadir/dolibarr/build/rpm
|
||||
%_datadir/dolibarr/build/rpm/*
|
||||
|
||||
@ -261,6 +270,8 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/*.php
|
||||
%_datadir/dolibarr/htdocs/*.txt
|
||||
|
||||
%dir %{_sysconfdir}/dolibarr
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?mdkversion}
|
||||
%defattr(0664, root, apache)
|
||||
%else
|
||||
@ -406,8 +417,13 @@ fi
|
||||
|
||||
# Create a config link dolibarr.conf
|
||||
if [ ! -L $apachelink ]; then
|
||||
echo Create dolibarr web server config link $apachelink
|
||||
ln -fs %{_sysconfdir}/dolibarr/apache.conf $apachelink
|
||||
apachelinkdir=`dirname $apachelink`
|
||||
if [ -d $apachelinkdir ]; then
|
||||
echo Create dolibarr web server config link from %{_sysconfdir}/dolibarr/apache.conf to $apachelink
|
||||
ln -fs %{_sysconfdir}/dolibarr/apache.conf $apachelink
|
||||
else
|
||||
echo Do not create link $apachelink - web server conf dir $apachelinkdir not found. web server package may not be installed
|
||||
fi
|
||||
fi
|
||||
|
||||
echo Set permission to $apacheuser:$apachegroup on /var/lib/dolibarr
|
||||
|
||||
@ -47,6 +47,7 @@ if (! $sortorder) $sortorder="ASC";
|
||||
if (! $sortfield) $sortfield="s.nom";
|
||||
|
||||
$search_nom=GETPOST("search_nom");
|
||||
$search_zipcode=GETPOST("search_zipcode");
|
||||
$search_ville=GETPOST("search_ville");
|
||||
$search_code=GETPOST("search_code");
|
||||
$search_compta=GETPOST("search_compta");
|
||||
@ -77,6 +78,7 @@ if (GETPOST("button_removefilter_x"))
|
||||
$search_sale='';
|
||||
$socname="";
|
||||
$search_nom="";
|
||||
$search_zipcode="";
|
||||
$search_ville="";
|
||||
$search_idprof1='';
|
||||
$search_idprof2='';
|
||||
@ -96,7 +98,7 @@ $thirdpartystatic=new Societe($db);
|
||||
$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
|
||||
llxHeader('',$langs->trans("ThirdParty"),$help_url);
|
||||
|
||||
$sql = "SELECT s.rowid, s.nom as name, s.client, s.ville, st.libelle as stcomm, s.prefix_comm, s.code_client, s.code_compta, s.status as status,";
|
||||
$sql = "SELECT s.rowid, s.nom as name, s.client, s.cp as zip, s.ville, st.libelle as stcomm, s.prefix_comm, s.code_client, s.code_compta, s.status as status,";
|
||||
$sql.= " s.datec, s.datea, s.canvas";
|
||||
// We'll need these fields in order to filter by sale (including the case where the user can only see his prospects)
|
||||
if ($search_sale) $sql .= ", sc.fk_soc, sc.fk_user";
|
||||
@ -115,9 +117,10 @@ if ($catid > 0) $sql.= " AND cs.fk_categorie = ".$catid;
|
||||
if ($catid == -2) $sql.= " AND cs.fk_categorie IS NULL";
|
||||
if ($search_categ > 0) $sql.= " AND cs.fk_categorie = ".$search_categ;
|
||||
if ($search_categ == -2) $sql.= " AND cs.fk_categorie IS NULL";
|
||||
if ($search_nom) $sql.= " AND s.nom LIKE '%".$db->escape(strtolower($search_nom))."%'";
|
||||
if ($search_ville) $sql.= " AND s.ville LIKE '%".$db->escape(strtolower($search_ville))."%'";
|
||||
if ($search_code) $sql.= " AND s.code_client LIKE '%".$db->escape(strtolower($search_code))."%'";
|
||||
if ($search_nom) $sql.= " AND s.nom LIKE '%".$db->escape($search_nom)."%'";
|
||||
if ($search_zipcode) $sql.= " AND s.cp LIKE '%".$db->escape($search_zipcode)."%'";
|
||||
if ($search_ville) $sql.= " AND s.ville LIKE '%".$db->escape($search_ville)."%'";
|
||||
if ($search_code) $sql.= " AND s.code_client LIKE '%".$db->escape($search_code)."%'";
|
||||
if ($search_compta) $sql.= " AND s.code_compta LIKE '%".$db->escape($search_compta)."%'";
|
||||
// Insert sale filter
|
||||
if ($search_sale)
|
||||
@ -149,7 +152,7 @@ if ($result)
|
||||
|
||||
$i = 0;
|
||||
|
||||
print '<form method="GET" id="formList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
print '<form method="GET" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
|
||||
// Filter on categories
|
||||
$moreforfilter='';
|
||||
@ -176,6 +179,7 @@ if ($result)
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Zip"),$_SERVER["PHP_SELF"],"s.cp","",$param,"",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.ville","",$param,"",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","",$param,"",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("AccountancyCode"),$_SERVER["PHP_SELF"],"s.code_compta","",$param,'align="left"',$sortfield,$sortorder);
|
||||
@ -193,6 +197,10 @@ if ($result)
|
||||
print '<input type="text" class="flat" name="search_nom" value="'.$search_nom.'" size="10">';
|
||||
print '</td>';
|
||||
|
||||
print '<td class="liste_titre">';
|
||||
print '<input type="text" class="flat" name="search_zipcode" value="'.$search_zipcode.'" size="10">';
|
||||
print '</td>';
|
||||
|
||||
print '<td class="liste_titre">';
|
||||
print '<input type="text" class="flat" name="search_ville" value="'.$search_ville.'" size="10">';
|
||||
print '</td>';
|
||||
@ -234,6 +242,7 @@ if ($result)
|
||||
$thirdpartystatic->status=$obj->status;
|
||||
print $thirdpartystatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
print '<td>'.$obj->zip.'</td>';
|
||||
print '<td>'.$obj->ville.'</td>';
|
||||
print '<td>'.$obj->code_client.'</td>';
|
||||
print '<td>'.$obj->code_compta.'</td>';
|
||||
|
||||
@ -40,6 +40,7 @@ $action = GETPOST('action','alpha');
|
||||
$socname = GETPOST("socname",'alpha');
|
||||
$stcomm = GETPOST("stcomm",'int');
|
||||
$search_nom = GETPOST("search_nom");
|
||||
$search_zipcode = GETPOST("search_zipcode");
|
||||
$search_ville = GETPOST("search_ville");
|
||||
$search_departement = GETPOST("search_departement");
|
||||
$search_datec = GETPOST("search_datec");
|
||||
@ -145,9 +146,20 @@ if (!$user->rights->societe->client->voir && !$socid) $search_sale = $user->id;
|
||||
// List of avaible states; we'll need that for each lines (quick changing prospect states) and for search bar (filter by prospect state)
|
||||
$sts = array(-1,0,1,2,3);
|
||||
|
||||
|
||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
||||
$hookmanager=new HookManager($db);
|
||||
$hookmanager->initHooks(array('prospectlist'));
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
if ($action == 'cstc')
|
||||
{
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."societe SET fk_stcomm = ".$_GET["pstcomm"];
|
||||
@ -162,7 +174,7 @@ if ($action == 'cstc')
|
||||
|
||||
$formother=new FormOther($db);
|
||||
|
||||
$sql = "SELECT s.rowid, s.nom, s.ville, s.datec, s.datea, s.status as status,";
|
||||
$sql = "SELECT s.rowid, s.nom, s.cp as zip, s.ville, s.datec, s.datea, s.status as status,";
|
||||
$sql.= " st.libelle as stcomm, s.prefix_comm, s.fk_stcomm, s.fk_prospectlevel,";
|
||||
$sql.= " d.nom as departement";
|
||||
// Updated by Matelli
|
||||
@ -183,6 +195,7 @@ if ($catid == -2) $sql.= " AND cs.fk_categorie IS NULL";
|
||||
if ($search_categ > 0) $sql.= " AND cs.fk_categorie = ".$search_categ;
|
||||
if ($search_categ == -2) $sql.= " AND cs.fk_categorie IS NULL";
|
||||
if ($search_nom) $sql .= " AND s.nom LIKE '%".$db->escape(strtolower($search_nom))."%'";
|
||||
if ($search_zipcode) $sql .= " AND s.cp LIKE '%".$db->escape(strtolower($search_zipcode))."%'";
|
||||
if ($search_ville) $sql .= " AND s.ville LIKE '%".$db->escape(strtolower($search_ville))."%'";
|
||||
if ($search_departement) $sql .= " AND d.nom LIKE '%".$db->escape(strtolower($search_departement))."%'";
|
||||
if ($search_datec) $sql .= " AND s.datec LIKE '%".$db->escape($search_datec)."%'";
|
||||
@ -255,9 +268,7 @@ if ($resql)
|
||||
|
||||
|
||||
// Print the search-by-sale and search-by-categ filters
|
||||
print '<form method="get" action="'.$_SERVER["PHP_SELF"].'" id="formulaire_recherche">';
|
||||
|
||||
print '<table class="liste" width="100%">';
|
||||
print '<form method="GET" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
|
||||
// Filter on categories
|
||||
$moreforfilter='';
|
||||
@ -275,14 +286,16 @@ if ($resql)
|
||||
}
|
||||
if ($moreforfilter)
|
||||
{
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre" colspan="8">';
|
||||
print '<div class="liste_titre">';
|
||||
print $moreforfilter;
|
||||
print '</td></tr>';
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print '<table class="liste" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Zip"),$_SERVER["PHP_SELF"],"s.cp","",$param,"",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.ville","",$param,"",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("State"),$_SERVER["PHP_SELF"],"s.fk_departement","",$param,'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"s.datec","",$param,'align="center"',$sortfield,$sortorder);
|
||||
@ -290,12 +303,20 @@ if ($resql)
|
||||
print_liste_field_titre($langs->trans("StatusProsp"),$_SERVER["PHP_SELF"],"s.fk_stcomm","",$param,'align="center"',$sortfield,$sortorder);
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"s.status","",$param,'align="right"',$sortfield,$sortorder);
|
||||
|
||||
$parameters=array();
|
||||
$formconfirm=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre">';
|
||||
print '<input type="text" class="flat" name="search_nom" size="10" value="'.$search_nom.'">';
|
||||
print '</td><td class="liste_titre">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre">';
|
||||
print '<input type="text" class="flat" name="search_zipcode" size="10" value="'.$search_zipcode.'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre">';
|
||||
print '<input type="text" class="flat" name="search_ville" size="10" value="'.$search_ville.'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="center">';
|
||||
@ -348,6 +369,9 @@ if ($resql)
|
||||
print '<input class="liste_titre" name="button_search" type="image" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print '</td>';
|
||||
|
||||
$parameters=array();
|
||||
$formconfirm=$hookmanager->executeHooks('printFieldListOption',$parameters); // Note that $action and $object may have been modified by hook
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
$i = 0;
|
||||
@ -369,6 +393,7 @@ if ($resql)
|
||||
$prospectstatic->status=$obj->status;
|
||||
print $prospectstatic->getNomUrl(1,'prospect');
|
||||
print '</td>';
|
||||
print "<td>".$obj->zip." </td>";
|
||||
print "<td>".$obj->ville." </td>";
|
||||
print '<td align="center">'.$obj->departement.'</td>';
|
||||
// Creation date
|
||||
@ -399,6 +424,9 @@ if ($resql)
|
||||
print $prospectstatic->getLibStatut(3);
|
||||
print '</td>';
|
||||
|
||||
$parameters=array('obj' => $obj);
|
||||
$formconfirm=$hookmanager->executeHooks('printFieldListValue',$parameters); // Note that $action and $object may have been modified by hook
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
@ -410,6 +438,9 @@ if ($resql)
|
||||
print "</form>";
|
||||
|
||||
$db->free($resql);
|
||||
|
||||
$parameters=array('sql' => $sql);
|
||||
$formconfirm=$hookmanager->executeHooks('printFieldListFooter',$parameters); // Note that $action and $object may have been modified by hook
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -527,8 +527,11 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
||||
print "\n".'<table class="noborder" width="100%">'."\n";
|
||||
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Name").'</td>';
|
||||
print '<td>'.$langs->trans("Poste").'</td><td>'.$langs->trans("Tel").'</td>';
|
||||
print '<td>'.$langs->trans("Fax").'</td><td>'.$langs->trans("EMail").'</td>';
|
||||
print '<td>'.$langs->trans("Poste").'</td>';
|
||||
print '<td>'.$langs->trans("PhonePro").'</td>';
|
||||
print '<td>'.$langs->trans("PhoneMobile").'</td>';
|
||||
print '<td>'.$langs->trans("Fax").'</td>'; // TODO Fax is obsolete, not used by several companies
|
||||
print '<td>'.$langs->trans("EMail").'</td>';
|
||||
print "<td> </td>";
|
||||
if (! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create)
|
||||
{
|
||||
@ -536,7 +539,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
||||
}
|
||||
print "</tr>";
|
||||
|
||||
$sql = "SELECT p.rowid, p.name, p.firstname, p.fk_pays, p.poste, p.phone, p.fax, p.email, p.note ";
|
||||
$sql = "SELECT p.rowid, p.name, p.firstname, p.fk_pays, p.poste, p.phone, p.phone_mobile, p.fax, p.email, p.note ";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."socpeople as p";
|
||||
$sql .= " WHERE p.fk_soc = ".$object->id;
|
||||
$sql .= " ORDER by p.datec";
|
||||
@ -572,7 +575,10 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
||||
print dol_print_phone($obj->phone,$country_code,$obj->rowid,$object->id,'AC_TEL');
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print dol_print_phone($obj->fax,$country_code,$obj->rowid,$object->id,'AC_FAX');
|
||||
print dol_print_phone($obj->phone_mobile,$country_code,$obj->rowid,$object->id,'AC_TEL');
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print dol_print_phone($obj->fax,$country_code,$obj->rowid,$object->id,'AC_FAX'); // TODO Fax is obsolete, not used by several companies
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print dol_print_email($obj->email,$obj->rowid,$object->id,'AC_EMAIL');
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
/* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -12,8 +13,7 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@ -61,8 +61,10 @@
|
||||
<tr <?php echo $bcnd[$var]; ?>>
|
||||
<td<?php echo (! empty($conf->global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="2"' : ''); ?>>
|
||||
<?php
|
||||
|
||||
echo '<span>';
|
||||
echo $form->select_type_of_lines(isset($_POST["type"])?$_POST["type"]:-1,'type',1);
|
||||
if ((! empty($conf->product->enabled) && ! empty($conf->service->enabled)) || (empty($conf->product->enabled) && empty($conf->service->enabled))) echo '<br>';
|
||||
echo '</span>';
|
||||
|
||||
if (is_object($hookmanager))
|
||||
{
|
||||
@ -70,6 +72,8 @@
|
||||
$reshook=$hookmanager->executeHooks('formCreateProductOptions',$parameters,$object,$action);
|
||||
}
|
||||
|
||||
if ((! empty($conf->product->enabled) && ! empty($conf->service->enabled)) || (empty($conf->product->enabled) && empty($conf->service->enabled))) echo '<br>';
|
||||
|
||||
// Editor wysiwyg
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$nbrows=ROWS_2;
|
||||
|
||||
@ -84,9 +84,9 @@ if (! empty($conf->margin->enabled)) {
|
||||
'update_textarea' => array(
|
||||
'product_desc' => 'desc'
|
||||
),
|
||||
'show' => array(
|
||||
'price_base_type_area'
|
||||
),
|
||||
//'show' => array(
|
||||
//'price_base_type_area'
|
||||
//),
|
||||
'disabled' => array(
|
||||
'select_type'
|
||||
)
|
||||
@ -236,7 +236,7 @@ $(document).ready(function() {
|
||||
//$('#origin_price_ttc_cache').val(data.price_ttc);
|
||||
$('#origin_tva_tx_cache').val(data.tva_tx);
|
||||
$('#select_type').val(data.type).attr('disabled','disabled').trigger('change');
|
||||
$('#price_base_type_area').show();
|
||||
//$('#price_base_type_area').show();
|
||||
|
||||
if (typeof CKEDITOR == "object" && typeof CKEDITOR.instances != "undefined" && CKEDITOR.instances['product_desc'] != "undefined") {
|
||||
CKEDITOR.instances['product_desc'].setData(data.desc).focus();
|
||||
|
||||
@ -87,6 +87,8 @@
|
||||
$reshook=$hookmanager->executeHooks('formEditProductOptions',$parameters,$this,$action);
|
||||
}
|
||||
|
||||
echo '<br>';
|
||||
|
||||
// editeur wysiwyg
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$nbrows=ROWS_2;
|
||||
|
||||
@ -72,8 +72,9 @@ jQuery(document).ready(function() {
|
||||
<td<?php echo (! empty($conf->global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="4"' : ' colspan="3"'); ?>>
|
||||
<?php
|
||||
|
||||
echo '<span>';
|
||||
$form->select_produits('','idprod','',$conf->product->limit_size,$buyer->price_level);
|
||||
print '<br>';
|
||||
echo '</span>';
|
||||
|
||||
if (is_object($hookmanager))
|
||||
{
|
||||
@ -81,6 +82,8 @@ jQuery(document).ready(function() {
|
||||
$reshook=$hookmanager->executeHooks('formCreateProductOptions',$parameters,$object,$action);
|
||||
}
|
||||
|
||||
echo '<br>';
|
||||
|
||||
// Editor wysiwyg
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$nbrows=ROWS_2;
|
||||
|
||||
@ -33,6 +33,7 @@ $langs->load("companies");
|
||||
|
||||
$socname = GETPOST("socname");
|
||||
$search_nom = GETPOST("search_nom");
|
||||
$search_zipcode = GETPOST("search_zipcode");
|
||||
$search_ville = GETPOST("search_ville");
|
||||
$search_code_fournisseur = GETPOST("search_code_fournisseur");
|
||||
$search_compta_fournisseur = GETPOST("search_compta_fournisseur");
|
||||
@ -55,6 +56,17 @@ $pagenext = $page + 1;
|
||||
if (! $sortorder) $sortorder="ASC";
|
||||
if (! $sortfield) $sortfield="nom";
|
||||
|
||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
||||
$hookmanager=new HookManager($db);
|
||||
$hookmanager->initHooks(array('supplierlist'));
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
|
||||
/*
|
||||
@ -67,7 +79,7 @@ $thirdpartystatic=new Societe($db);
|
||||
$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
|
||||
llxHeader('',$langs->trans("ThirdParty"),$help_url);
|
||||
|
||||
$sql = "SELECT s.rowid as socid, s.nom, s.ville, s.datec, s.datea, st.libelle as stcomm, s.prefix_comm, s.status as status, ";
|
||||
$sql = "SELECT s.rowid as socid, s.nom, s.cp as zip, s.ville, s.datec, s.datea, st.libelle as stcomm, s.prefix_comm, s.status as status, ";
|
||||
$sql.= "code_fournisseur, code_compta_fournisseur";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user ";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
@ -85,6 +97,7 @@ if ($socname)
|
||||
$sortorder = "ASC";
|
||||
}
|
||||
if ($search_nom) $sql .= " AND s.nom LIKE '%".$db->escape($search_nom)."%'";
|
||||
if ($search_zipcode) $sql .= " AND s.cp LIKE '%".$db->escape($search_zipcode)."%'";
|
||||
if ($search_ville) $sql .= " AND s.ville LIKE '%".$db->escape($search_ville)."%'";
|
||||
if ($search_code_fournisseur) $sql .= " AND s.code_fournisseur LIKE '%".$db->escape($search_code_fournisseur)."%'";
|
||||
if ($search_compta_fournisseur) $sql .= " AND s.code_compta_fournisseur LIKE '%".$db->escape($search_compta_fournisseur)."%'";
|
||||
@ -114,8 +127,7 @@ if ($resql)
|
||||
|
||||
print_barre_liste($langs->trans("ListOfSuppliers"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords);
|
||||
|
||||
print '<form action="liste.php" method="GET">';
|
||||
print '<table class="liste" width="100%">';
|
||||
print '<form method="GET" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
|
||||
// Filter on categories
|
||||
$moreforfilter='';
|
||||
@ -127,25 +139,33 @@ if ($resql)
|
||||
}
|
||||
if ($moreforfilter)
|
||||
{
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre" colspan="6">';
|
||||
print '<div class="liste_titre">';
|
||||
print $moreforfilter;
|
||||
print '</td></tr>';
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print '<table class="liste" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,'valign="middle"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Zip"),$_SERVER["PHP_SELF"],"s.cp","",$param,'valign="middle"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.ville","",$param,'valign="middle"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("SupplierCode"),$_SERVER["PHP_SELF"],"s.code_fournisseur","",$param,'align="left"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("AccountancyCode"),$_SERVER["PHP_SELF"],"s.code_compta_fournisseur","",$param,'align="left"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"s.datec","",$param,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"s.status","",$param,'align="right"',$sortfield,$sortorder);
|
||||
|
||||
$parameters=array();
|
||||
$formconfirm=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
|
||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_nom" value="'.$search_nom.'"></td>';
|
||||
|
||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_zipcode" value="'.$search_zipcode.'"></td>';
|
||||
|
||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_ville" value="'.$search_ville.'"></td>';
|
||||
|
||||
print '<td align="left" class="liste_titre">';
|
||||
@ -162,6 +182,9 @@ if ($resql)
|
||||
|
||||
print '<td class="liste_titre" align="right"><input class="liste_titre" type="image" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'"></td>';
|
||||
|
||||
$parameters=array();
|
||||
$formconfirm=$hookmanager->executeHooks('printFieldListOption',$parameters); // Note that $action and $object may have been modified by hook
|
||||
|
||||
print '</tr>';
|
||||
|
||||
$var=True;
|
||||
@ -179,18 +202,26 @@ if ($resql)
|
||||
print '<td>';
|
||||
print $thirdpartystatic->getNomUrl(1,'supplier');
|
||||
print "</td>\n";
|
||||
print "<td>".$obj->ville."</td>\n";
|
||||
print '<td>'.$obj->zip.'</td>'."\n";
|
||||
print '<td>'.$obj->ville.'</td>'."\n";
|
||||
print '<td align="left">'.$obj->code_fournisseur.' </td>';
|
||||
print '<td align="left">'.$obj->code_compta_fournisseur.' </td>';
|
||||
print '<td align="right">';
|
||||
print dol_print_date($db->jdate($obj->datec),'day').'</td>';
|
||||
print '<td align="right">'.$thirdpartystatic->getLibStatut(3).'</td>';
|
||||
|
||||
$parameters=array('obj' => $obj);
|
||||
$formconfirm=$hookmanager->executeHooks('printFieldListValue',$parameters); // Note that $action and $object may have been modified by hook
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
print "</table>\n";
|
||||
print "</form>\n";
|
||||
$db->free($resql);
|
||||
|
||||
$parameters=array('sql' => $sql);
|
||||
$formconfirm=$hookmanager->executeHooks('printFieldListFooter',$parameters); // Note that $action and $object may have been modified by hook
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user