Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.8
This commit is contained in:
commit
9a1a976e5c
23
ChangeLog
23
ChangeLog
@ -70,19 +70,14 @@ FIX: No check warehouse is provided if module stock is not enabled.
|
||||
FIX: Payed invoices are showed as canceled FIX: Bad date filter on customer order
|
||||
FIX: Ref/label of product on contract line was not visible, nor into page, nor into PDF.
|
||||
FIX: Removed concatenation on undeclared variable
|
||||
FIX: remove deprecated property 'libelle' on product object
|
||||
FIX: Removed HTML file preventing PHP service
|
||||
FIX: Removed undeclared variable
|
||||
FIX: Removed undeclared variables
|
||||
FIX: Removed unused variable
|
||||
FIX: Replaced deprecated call
|
||||
FIX: Replaced deprecated property
|
||||
FIX: Remove deprecated property 'libelle' on product object
|
||||
FIX: Replaced some deprecated call
|
||||
FIX: Replaced some deprecated property
|
||||
FIX: Save of filters into export profiles failed.
|
||||
FIX: "script" balise with wrong syntax
|
||||
FIX: send mail, copy sendto don't read the list of contact
|
||||
FIX: top links menu have target attribute with wrong value
|
||||
FIX: total amount in tpl linked object are not reset
|
||||
FIX: Typo
|
||||
FIX; Unknown field 'sc.fk_soc' in field list
|
||||
FIX: update usergroup name
|
||||
FIX: Variable declared boolean
|
||||
@ -100,7 +95,6 @@ FIX: Missing visibility of static property
|
||||
NEW: Add a button to purge criteria in user list
|
||||
NEW: add all assigned users and all extrafields data in new event when we createFromClone
|
||||
NEW: Add a new component to select categories/tags from the main edit page of product. The dedicated tab is also removed.
|
||||
NEW: add an explorer for REST API consultation & documentation
|
||||
NEW: Add a search field and report on hrm area
|
||||
NEW: Add a tab document in donation card
|
||||
NEW: Add bank account owner in invoice/proposal/orders footer
|
||||
@ -113,7 +107,6 @@ NEW: Add exemple of setup for multitail to render dolibarr log files
|
||||
NEW: Add filter on status on invoice list
|
||||
NEW: Add filter on task ref and task label into list of tasks
|
||||
NEW: Add filter on user contact or user task into task list
|
||||
NEW: Add function dolCopyDir to copy directory with recursive content.
|
||||
NEW: Add gender property managed on user card FIX: Better error messages when uploading photo of user when permission to write are not granted
|
||||
NEW: Add help tooltips on fields of dictionary edit pages. Fix: visible list of tasks are for opened project only.
|
||||
NEW: Add hidden option MAIN_MAILFORM_DISABLE_ENTERKEY to disable the key enter into the form to send email.
|
||||
@ -125,7 +118,6 @@ NEW: Add option THEME_ELDY_DISABLE_IMAGE to disable images into menu eldy.
|
||||
NEW: add PDF icon on linked element into project
|
||||
NEW: add "productpricecard" hook and uniformize code
|
||||
NEW: Add ref and label of project into export
|
||||
NEW: add restler framework First step to build REST API into Dolibarr
|
||||
NEW: Add search box for supplier order search.
|
||||
NEW: Add status into filters of graph
|
||||
NEW: Add tab document on salaries payment
|
||||
@ -165,7 +157,6 @@ NEW: Hidden option THEME_ELDY_USE_HOVER is stable enough to become officialy vis
|
||||
NEW: If module salaries is on, you can set a hourly value for tome consumed by users. Each time a user enter its time consumed on a project, a calculation is done to provide the cost for human services. This value appears into the "Transversal view" of project.
|
||||
NEW: Implement option SUPPLIER_ORDER_USE_DISPATCH_STATUS to add a status into each dispathing line of supplier order to "verify" a reception is ok. Status of order can be set to "total/done" only if line is verified.
|
||||
NEW: Into the overview of projects, the name of thirdparty appears into combo lists of elements to link to project.
|
||||
NEW: Introduce function dolGetFirstLineOfText
|
||||
NEW: Introduce option SUPPLIER_ORDER_DOUBLE_APPROVAL to allow 2 approvals to make a supplier order approved. Activating this option introduce a new permission to the second level approval.
|
||||
NEW: Introduce TCPDI as replacement of FPDI.
|
||||
NEW: List of recent modified supplier product prices in Supplier card
|
||||
@ -175,7 +166,6 @@ NEW: Product stock and subproduct stock are independant
|
||||
NEW: Propal merge product card PDF into azur
|
||||
NEW: Rename install etape to step
|
||||
NEW: Replace category edition page on members with new select2 component.
|
||||
NEW: script to build API class from existing class
|
||||
NEW: Show difference between timespent by everybody and time spent by user making timesheet into timesheet pages. NEW: Can enter start hours of task when creating timesheet
|
||||
NEW: Show last official stable version into system - update page.
|
||||
NEW: Show photo of logged user into login top right block. NEW: If no photo is available for user, we show a generic photo depending on gender
|
||||
@ -208,12 +198,19 @@ NEW: Add module batch management.
|
||||
For translators:
|
||||
NEW: Update language files.
|
||||
NEW: When a translation is not available we always jump to en_US and only en_US.
|
||||
NEW: All language tranlsations (except source en_US) is now managed on https://www.transifex.com/projects/p/dolibarr/.
|
||||
FIX: Typo errors in translation
|
||||
|
||||
For developers:
|
||||
NEW: Function yn can show a visual checkbox.
|
||||
NEW: Introduced select2 jquery plugin.
|
||||
NEW: Possibility to add javascript in main login page with "getLoginPageOptions" hook
|
||||
NEW: possibility to defined a tab for all entities in module descriptor
|
||||
NEW: add restler framework First step to build REST API into Dolibarr
|
||||
NEW: add an explorer for REST API consultation & documentation
|
||||
NEW: script to build API class from existing class
|
||||
NEW: Add function dolCopyDir to copy directory with recursive content.
|
||||
NEW: Introduce function dolGetFirstLineOfText
|
||||
|
||||
WARNING: Following changes may create regression for some external modules, but was necessary to make
|
||||
Dolibarr better:
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
dolibarr (3.8.0-3) UNRELEASED; urgency=low
|
||||
dolibarr (__VERSION__) UNRELEASED; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
|
||||
@ -64,6 +64,13 @@ $DIR||='.'; $DIR =~ s/([^\/\\])[\\\/]+$/$1/;
|
||||
|
||||
$SOURCE="$DIR/..";
|
||||
$DESTI="$SOURCE/build";
|
||||
if ($SOURCE !~ /^\//)
|
||||
{
|
||||
print "Error: Launch the script $PROG.$Extension with its full path from /.\n";
|
||||
print "$PROG.$Extension aborted.\n";
|
||||
sleep 2;
|
||||
exit 1;
|
||||
}
|
||||
if (! $ENV{"DESTIBETARC"} || ! $ENV{"DESTISTABLE"})
|
||||
{
|
||||
print "Error: Missing environment variables.\n";
|
||||
@ -337,8 +344,8 @@ foreach my $target (sort keys %CHOOSEDPUBLISH) {
|
||||
|
||||
if ($nboftargetok) {
|
||||
|
||||
# Update CVS if required
|
||||
#-----------------------
|
||||
# Update GIT tag if required
|
||||
#---------------------------
|
||||
if ($nbofpublishneedtag)
|
||||
{
|
||||
print "Go to directory $SOURCE\n";
|
||||
@ -420,6 +427,7 @@ if ($nboftargetok) {
|
||||
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/install/mssql`;
|
||||
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/ansible`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/codesniffer`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/codetemplates`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/dbmodel`;
|
||||
@ -428,6 +436,7 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/ldap`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/licence`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/mail`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/multitail`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/phpcheckstyle`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/phpunit`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/dev/security`;
|
||||
@ -469,12 +478,12 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/nltechno*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/oscim*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/pos*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/teclib*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/timesheet*`;
|
||||
# Removed other test files
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/oblyon*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/eldy/*.new`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/api/explorer`; # This is a dev tool
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/Thumbs.db $BUILDROOT/$PROJECT/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/*/Thumbs.db`;
|
||||
@ -683,7 +692,7 @@ if ($nboftargetok) {
|
||||
use Date::Language;
|
||||
$lang=Date::Language->new('English');
|
||||
$datestring = $lang->time2str("%a %b %e %Y", time);
|
||||
$changelogstring="* ".$datestring." Laurent Destailleur $MAJOR.$MINOR.$REL1-$RPMSUBVERSION\n- Upstream release\n";
|
||||
$changelogstring="* ".$datestring." Laurent Destailleur (eldy) $MAJOR.$MINOR.$REL1-$RPMSUBVERSION\n- Upstream release\n";
|
||||
|
||||
print "Generate file $BUILDROOT/$BUILDFIC from $SOURCE/build/rpm/${BUILDFICSRC}\n";
|
||||
open (SPECFROM,"<$SOURCE/build/rpm/${BUILDFICSRC}") || die "Error";
|
||||
@ -715,7 +724,7 @@ if ($nboftargetok) {
|
||||
$ret=`$cmd`;
|
||||
print "Move $RPMDIR/SOURCES/".$FILENAMETGZ2.".tgz into $NEWDESTI/".$FILENAMETGZ2.".tgz\n";
|
||||
$cmd="mv \"$RPMDIR/SOURCES/".$FILENAMETGZ2.".tgz\" \"$NEWDESTI/".$FILENAMETGZ2.".tgz\"";
|
||||
$ret=`$cmd`;
|
||||
#$ret=`$cmd`;
|
||||
next;
|
||||
}
|
||||
|
||||
@ -805,8 +814,17 @@ if ($nboftargetok) {
|
||||
print "Create directory $BUILDROOT/$PROJECT.tmp/debian\n";
|
||||
$ret=`mkdir "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
print "Copy $SOURCE/build/debian/xxx to $BUILDROOT/$PROJECT.tmp/debian\n";
|
||||
# Add files for dpkg-source (changelog)
|
||||
#$ret=`cp -f "$SOURCE/build/debian/changelog" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
open (SPECFROM,"<$SOURCE/build/debian/changelog") || die "Error";
|
||||
open (SPECTO,">$BUILDROOT/$PROJECT.tmp/debian/changelog") || die "Error";
|
||||
while (<SPECFROM>) {
|
||||
$_ =~ s/__VERSION__/$MAJOR.$MINOR.$newbuild/;
|
||||
print SPECTO $_;
|
||||
}
|
||||
close SPECFROM;
|
||||
close SPECTO;
|
||||
# Add files for dpkg-source
|
||||
$ret=`cp -f "$SOURCE/build/debian/changelog" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/compat" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/control" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
$ret=`cp -f "$SOURCE/build/debian/copyright" "$BUILDROOT/$PROJECT.tmp/debian"`;
|
||||
|
||||
@ -12,7 +12,7 @@ beta version of Dolibarr, step by step.
|
||||
- Update version number with x.y.z-w in htdocs/filefunc.inc.php
|
||||
- Update version number with x.y.z-w in build/debian/changelog
|
||||
- Commit all changes.
|
||||
- Add a Tag (x.y.betaz_YYYYMMDD) and push it: git push --tags
|
||||
- Add a Tag (x.y.z-beta) and push it: git push --tags
|
||||
- Create a branch (x.y).
|
||||
|
||||
- Run makepack-dolibarr.pl to generate all packages.
|
||||
|
||||
@ -159,6 +159,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/accountancy
|
||||
%_datadir/dolibarr/htdocs/adherents
|
||||
%_datadir/dolibarr/htdocs/admin
|
||||
%_datadir/dolibarr/htdocs/api
|
||||
%_datadir/dolibarr/htdocs/asterisk
|
||||
%_datadir/dolibarr/htdocs/barcode
|
||||
%_datadir/dolibarr/htdocs/bookmarks
|
||||
|
||||
@ -239,6 +239,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/accountancy
|
||||
%_datadir/dolibarr/htdocs/adherents
|
||||
%_datadir/dolibarr/htdocs/admin
|
||||
%_datadir/dolibarr/htdocs/api
|
||||
%_datadir/dolibarr/htdocs/asterisk
|
||||
%_datadir/dolibarr/htdocs/barcode
|
||||
%_datadir/dolibarr/htdocs/bookmarks
|
||||
|
||||
@ -156,6 +156,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/accountancy
|
||||
%_datadir/dolibarr/htdocs/adherents
|
||||
%_datadir/dolibarr/htdocs/admin
|
||||
%_datadir/dolibarr/htdocs/api
|
||||
%_datadir/dolibarr/htdocs/asterisk
|
||||
%_datadir/dolibarr/htdocs/barcode
|
||||
%_datadir/dolibarr/htdocs/bookmarks
|
||||
|
||||
@ -167,6 +167,7 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/accountancy
|
||||
%_datadir/dolibarr/htdocs/adherents
|
||||
%_datadir/dolibarr/htdocs/admin
|
||||
%_datadir/dolibarr/htdocs/api
|
||||
%_datadir/dolibarr/htdocs/asterisk
|
||||
%_datadir/dolibarr/htdocs/barcode
|
||||
%_datadir/dolibarr/htdocs/bookmarks
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
@ -227,8 +227,8 @@ if ($id > 0)
|
||||
print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom','','');
|
||||
print '</td></tr>';
|
||||
|
||||
// Alias names (commercial, trademark or alias names)
|
||||
print '<tr><td>'.$langs->trans('AliasNames').'</td><td colspan="3">';
|
||||
// Alias name (commercial, trademark or alias name)
|
||||
print '<tr><td>'.$langs->trans('AliasNameShort').'</td><td colspan="3">';
|
||||
print $object->name_alias;
|
||||
print "</td></tr>";
|
||||
|
||||
|
||||
@ -1950,7 +1950,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('AvailabilityPeriod');
|
||||
print '</td>';
|
||||
if ($action != 'editavailability' && $object->brouillon)
|
||||
if ($action != 'editavailability')
|
||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editavailability&id=' . $object->id . '">' . img_edit($langs->trans('SetAvailability'), 1) . '</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
@ -1966,7 +1966,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('Source');
|
||||
print '</td>';
|
||||
if ($action != 'editdemandreason' && ! empty($object->brouillon))
|
||||
if ($action != 'editdemandreason')
|
||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editdemandreason&id=' . $object->id . '">' . img_edit($langs->trans('SetDemandReason'), 1) . '</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
@ -1975,14 +1975,15 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
} else {
|
||||
$form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->demand_reason_id, 'none');
|
||||
}
|
||||
// Removed because using dictionary is an admin feature, not a user feature. Ther is already the "star" to show info to admin users.
|
||||
// Removed because using dictionary is an admin feature, not a user feature. There is already the "star" to show info to admin users.
|
||||
// This is to avoid too heavy screens and have an uniform look and feel for all screens.
|
||||
// print '</td><td>';
|
||||
// print '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=22&origin=order&originid='.$object->id.'">'.$langs->trans("DictionarySource").'</a>';
|
||||
print '</td></tr>';
|
||||
|
||||
// Project
|
||||
if (! empty($conf->projet->enabled)) {
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
$langs->load('projects');
|
||||
print '<tr><td height="10">';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
@ -2001,7 +2002,8 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
if ($soc->outstanding_limit) {
|
||||
if ($soc->outstanding_limit)
|
||||
{
|
||||
// Outstanding Bill
|
||||
print '<tr><td>';
|
||||
print $langs->trans('OutstandingBill');
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||
*
|
||||
@ -62,7 +62,7 @@ class box_contacts extends ModeleBoxes
|
||||
|
||||
if ($user->rights->societe->lire)
|
||||
{
|
||||
$sql = "SELECT sp.rowid as id, sp.lastname, sp.firstname, sp.civility as civility_id, sp.datec, sp.tms, sp.fk_soc";
|
||||
$sql = "SELECT sp.rowid as id, sp.lastname, sp.firstname, sp.civility as civility_id, sp.datec, sp.tms, sp.fk_soc, sp.statut as status";
|
||||
$sql.= ", s.nom as socname";
|
||||
$sql.= ", s.code_client";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as sp";
|
||||
@ -91,7 +91,8 @@ class box_contacts extends ModeleBoxes
|
||||
$contactstatic->lastname=$objp->lastname;
|
||||
$contactstatic->firstname=$objp->firstname;
|
||||
$contactstatic->civility_id=$objp->civility_id;
|
||||
|
||||
$contactstatic->statut=$objp->status;
|
||||
|
||||
$societestatic->id = $objp->fk_soc;
|
||||
$societestatic->code_client = $objp->code_client;
|
||||
$societestatic->name = $objp->socname;
|
||||
@ -113,6 +114,12 @@ class box_contacts extends ModeleBoxes
|
||||
'text' => dol_print_date($datem, "day"),
|
||||
);
|
||||
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'align="right" class="nowrap" width="18"',
|
||||
'text' => $contactstatic->getLibStatut(3),
|
||||
'asis'=>1,
|
||||
);
|
||||
|
||||
$line++;
|
||||
}
|
||||
|
||||
|
||||
@ -353,9 +353,9 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target
|
||||
if (empty($conf->global->MAIN_PDF_DISABLESOURCEDETAILS))
|
||||
{
|
||||
// Phone
|
||||
if ($sourcecompany->phone) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($sourcecompany->phone);
|
||||
if ($sourcecompany->phone) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("PhoneShort").": ".$outputlangs->convToOutputCharset($sourcecompany->phone);
|
||||
// Fax
|
||||
if ($sourcecompany->fax) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($sourcecompany->fax);
|
||||
if ($sourcecompany->fax) $stringaddress .= ($stringaddress ? ($sourcecompany->phone ? " - " : "\n") : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($sourcecompany->fax);
|
||||
// EMail
|
||||
if ($sourcecompany->email) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Email").": ".$outputlangs->convToOutputCharset($sourcecompany->email);
|
||||
// Web
|
||||
|
||||
@ -1004,8 +1004,11 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks=
|
||||
}
|
||||
|
||||
print '<tr><td>'.$langs->trans("Total")."</td>";
|
||||
print '<td align="right">'.price($total_opp_amount, 0, '', 1, -1, -1, $conf->currency).'</td>';
|
||||
print '<td align="right">'.$form->textwithpicto(price($ponderated_opp_amount, 0, '', 1, -1, -1, $conf->currency), $langs->trans("OpportunityPonderatedAmount"), 1).'</td>';
|
||||
if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
{
|
||||
print '<td align="right">'.price($total_opp_amount, 0, '', 1, -1, -1, $conf->currency).'</td>';
|
||||
print '<td align="right">'.$form->textwithpicto(price($ponderated_opp_amount, 0, '', 1, -1, -1, $conf->currency), $langs->trans("OpportunityPonderatedAmount"), 1).'</td>';
|
||||
}
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS)) print '<td align="right">'.$total_task.'</td>';
|
||||
|
||||
$db->free($resql);
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
*
|
||||
* 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
|
||||
|
||||
@ -507,6 +507,8 @@ if ($action == 'create')
|
||||
print '<input type="hidden" name="entrepot_id" value="'.GETPOST('entrepot_id','int').'">';
|
||||
}
|
||||
|
||||
dol_fiche_head('');
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Ref
|
||||
@ -618,6 +620,8 @@ if ($action == 'create')
|
||||
|
||||
print "</table>";
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
/*
|
||||
* Lignes de commandes
|
||||
*/
|
||||
@ -838,7 +842,7 @@ if ($action == 'create')
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td></td><td></td></tr>';
|
||||
print '<td></td><td></td></tr>'; // end line and start a new one for lot/serial
|
||||
$subj=0;
|
||||
print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">';
|
||||
foreach ($product->stock_warehouse[$warehouse_id]->detail_batch as $dbatch)
|
||||
@ -855,6 +859,7 @@ if ($action == 'create')
|
||||
$staticwarehouse->fetch($warehouse_id);
|
||||
print $staticwarehouse->getNomUrl(0).' / ';
|
||||
|
||||
print '<!-- Show details of lot -->';
|
||||
print '<input name="batchl'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$dbatch->id.'">';
|
||||
print $langs->trans("DetailBatchFormat", $dbatch->batch, dol_print_date($dbatch->eatby,"day"), dol_print_date($dbatch->sellby,"day"), $dbatch->qty);
|
||||
if ($defaultqty<=0) {
|
||||
@ -1073,8 +1078,8 @@ else if ($id || $ref)
|
||||
// Weight
|
||||
print '<tr><td>'.$form->editfieldkey("Weight",'trueWeight',$object->trueWeight,$object,$user->rights->expedition->creer).'</td><td colspan="3">';
|
||||
|
||||
if($action=='edittrueWeight') {
|
||||
|
||||
if ($action=='edittrueWeight')
|
||||
{
|
||||
print '<form name="settrueweight" action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input name="action" value="settrueWeight" type="hidden">';
|
||||
print '<input name="id" value="'.$object->id.'" type="hidden">';
|
||||
@ -1086,7 +1091,8 @@ else if ($id || $ref)
|
||||
print '</form>';
|
||||
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
print $object->trueWeight;
|
||||
print ($object->trueWeight && $object->weight_units!='')?' '.measuring_units_string($object->weight_units,"weight"):'';
|
||||
}
|
||||
@ -1107,8 +1113,8 @@ else if ($id || $ref)
|
||||
|
||||
// Height
|
||||
print '<tr><td>'.$form->editfieldkey("Height",'trueHeight',$object->trueHeight,$object,$user->rights->expedition->creer).'</td><td colspan="3">';
|
||||
if($action=='edittrueHeight') {
|
||||
|
||||
if($action=='edittrueHeight')
|
||||
{
|
||||
print '<form name="settrueHeight" action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input name="action" value="settrueHeight" type="hidden">';
|
||||
print '<input name="id" value="'.$object->id.'" type="hidden">';
|
||||
@ -1120,7 +1126,8 @@ else if ($id || $ref)
|
||||
print '</form>';
|
||||
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
print $object->trueHeight;
|
||||
print ($object->trueHeight && $object->height_units!='')?' '.measuring_units_string($object->height_units,"size"):'';
|
||||
|
||||
@ -1370,8 +1377,10 @@ else if ($id || $ref)
|
||||
else if (count($lines[$i]->details_entrepot) > 1)
|
||||
{
|
||||
$detail = '';
|
||||
foreach ($lines[$i]->details_entrepot as $detail_entrepot) {
|
||||
if ($detail_entrepot->entrepot_id > 0) {
|
||||
foreach ($lines[$i]->details_entrepot as $detail_entrepot)
|
||||
{
|
||||
if ($detail_entrepot->entrepot_id > 0)
|
||||
{
|
||||
$entrepot = new Entrepot($db);
|
||||
$entrepot->fetch($detail_entrepot->entrepot_id);
|
||||
$detail.= $langs->trans("DetailWarehouseFormat",$entrepot->libelle,$detail_entrepot->qty_shipped).'<br/>';
|
||||
@ -1389,7 +1398,8 @@ else if ($id || $ref)
|
||||
{
|
||||
print '<td>';
|
||||
$detail = '';
|
||||
foreach ($lines[$i]->detail_batch as $dbatch) {
|
||||
foreach ($lines[$i]->detail_batch as $dbatch)
|
||||
{
|
||||
$detail.= $langs->trans("DetailBatchFormat",$dbatch->batch,dol_print_date($dbatch->eatby,"day"),dol_print_date($dbatch->sellby,"day"),$dbatch->dluo_qty).'<br/>';
|
||||
}
|
||||
print $form->textwithtooltip($langs->trans("DetailBatchNumber"),$detail);
|
||||
@ -1413,7 +1423,7 @@ else if ($id || $ref)
|
||||
|
||||
/*
|
||||
* Boutons actions
|
||||
*/
|
||||
*/
|
||||
|
||||
if (($user->societe_id == 0) && ($action!='presend'))
|
||||
{
|
||||
@ -1487,7 +1497,7 @@ else if ($id || $ref)
|
||||
|
||||
/*
|
||||
* Documents generated
|
||||
*/
|
||||
*/
|
||||
if ($action != 'presend')
|
||||
{
|
||||
print '<table width="100%"><tr><td width="50%" valign="top">';
|
||||
@ -1521,7 +1531,7 @@ else if ($id || $ref)
|
||||
|
||||
/*
|
||||
* Action presend
|
||||
*/
|
||||
*/
|
||||
//Select mail models is same action as presend
|
||||
if (GETPOST('modelselected')) {
|
||||
$action = 'presend';
|
||||
|
||||
@ -1234,23 +1234,34 @@ class Expedition extends CommonObject
|
||||
$this->total_localtax1+= $tabprice[9];
|
||||
$this->total_localtax2+= $tabprice[10];
|
||||
|
||||
$line->detail_batch = array();
|
||||
|
||||
// Eat-by date
|
||||
if (! empty($conf->productbatch->enabled)) {
|
||||
/* test on conf at begining of file sometimes doesn't include expeditionbatch
|
||||
* May be conf is not well initialized for dark reason
|
||||
*/
|
||||
if (! empty($conf->productbatch->enabled) && $obj->line_id > 0)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/expedition/class/expeditionbatch.class.php';
|
||||
if ($originline != $obj->fk_origin_line)
|
||||
|
||||
$newdetailbatch = ExpeditionLineBatch::fetchAll($this->db,$obj->line_id);
|
||||
if (is_array($newdetailbatch))
|
||||
{
|
||||
$line->detail_batch = ExpeditionLineBatch::fetchAll($this->db,$obj->line_id);
|
||||
} else {
|
||||
$line->detail_batch = array_merge($line->detail_batch,ExpeditionLineBatch::fetchAll($this->db,$obj->line_id));
|
||||
if ($originline != $obj->fk_origin_line)
|
||||
{
|
||||
$line->detail_batch = $newdetailbatch;
|
||||
}
|
||||
else
|
||||
{
|
||||
$line->detail_batch = array_merge($line->detail_batch, $newdetailbatch);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($originline != $obj->fk_origin_line) {
|
||||
|
||||
if ($originline != $obj->fk_origin_line)
|
||||
{
|
||||
$this->lines[$lineindex] = $line;
|
||||
$lineindex++;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
$line->total_ht += $tabprice[0];
|
||||
$line->total_localtax1 += $tabprice[9];
|
||||
$line->total_localtax2 += $tabprice[10];
|
||||
|
||||
@ -238,7 +238,6 @@ if ($id > 0 || ! empty($ref))
|
||||
// Date
|
||||
print '<tr><td>'.$langs->trans('Date').'</td>';
|
||||
print '<td colspan="2">'.dol_print_date($commande->date,'daytext').'</td>';
|
||||
print '<td width="50%">'.$langs->trans('Source').' : '.$commande->getLabelSource().'</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Delivery date planned
|
||||
@ -265,9 +264,9 @@ if ($id > 0 || ! empty($ref))
|
||||
}
|
||||
print '</td>';
|
||||
// Note on several rows
|
||||
print '<td rowspan="'.$nbrow.'" valign="top">'.$langs->trans('NotePublic').' :<br>';
|
||||
print nl2br($commande->note_public);
|
||||
print '</td>';
|
||||
//print '<td rowspan="'.$nbrow.'" valign="top">'.$langs->trans('NotePublic').' :<br>';
|
||||
//print nl2br($commande->note_public);
|
||||
//print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Shipping Method
|
||||
@ -307,7 +306,7 @@ if ($id > 0 || ! empty($ref))
|
||||
print '</td></tr>';
|
||||
|
||||
// Mode of payment
|
||||
print '<tr><td height="10">';
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('PaymentMode');
|
||||
print '</td>';
|
||||
@ -324,11 +323,42 @@ if ($id > 0 || ! empty($ref))
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Availability
|
||||
print '<tr><td height="10">';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('AvailabilityPeriod');
|
||||
print '</td>';
|
||||
if ($action != 'editavailability')
|
||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editavailability&id=' . $object->id . '">' . img_edit($langs->trans('SetAvailability'), 1) . '</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
if ($action == 'editavailability') {
|
||||
$form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $commande->id, $commande->availability_id, 'availability_id', 1);
|
||||
} else {
|
||||
$form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $commande->id, $commande->availability_id, 'none', 1);
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Source
|
||||
print '<tr><td height="10">';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('Source');
|
||||
print '</td>';
|
||||
if ($action != 'editdemandreason')
|
||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editdemandreason&id=' . $object->id . '">' . img_edit($langs->trans('SetDemandReason'), 1) . '</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
if ($action == 'editdemandreason') {
|
||||
$form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $commande->id, $commande->demand_reason_id, 'demand_reason_id', 1);
|
||||
} else {
|
||||
$form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $commande->id, $commande->demand_reason_id, 'none');
|
||||
}
|
||||
|
||||
// Project
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
$langs->load('projects');
|
||||
print '<tr><td height="10">';
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('Project');
|
||||
print '</td>';
|
||||
@ -373,15 +403,14 @@ if ($id > 0 || ! empty($ref))
|
||||
* Lignes de commandes avec quantite livrees et reste a livrer
|
||||
* Les quantites livrees sont stockees dans $commande->expeditions[fk_product]
|
||||
*/
|
||||
print '<table class="liste" width="100%">';
|
||||
print '<table class="noborder noshadow" width="100%">';
|
||||
|
||||
$sql = "SELECT cd.rowid, cd.fk_product, cd.product_type, cd.label, cd.description,";
|
||||
$sql = "SELECT cd.rowid, cd.fk_product, cd.product_type as type, cd.label, cd.description,";
|
||||
$sql.= " cd.price, cd.tva_tx, cd.subprice,";
|
||||
$sql.= " cd.qty,";
|
||||
$sql.= ' cd.date_start,';
|
||||
$sql.= ' cd.date_end,';
|
||||
$sql.= ' p.label as product_label, p.entity, p.ref, p.fk_product_type, p.rowid as prodid,';
|
||||
$sql.= ' p.description as product_desc, p.fk_product_type as product_type';
|
||||
$sql.= ' p.rowid as prodid, p.label as product_label, p.entity, p.ref, p.fk_product_type as product_type, p.description as product_desc';
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."commandedet as cd";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON cd.fk_product = p.rowid";
|
||||
$sql.= " WHERE cd.fk_commande = ".$commande->id;
|
||||
@ -419,7 +448,8 @@ if ($id > 0 || ! empty($ref))
|
||||
$var=!$var;
|
||||
|
||||
// Show product and description
|
||||
$type=$objp->product_type?$objp->product_type:$objp->fk_product_type;
|
||||
$type=isset($objp->type)?$objp->type:$objp->product_type;
|
||||
|
||||
// Try to enhance type detection using date_start and date_end for free lines where type
|
||||
// was not saved.
|
||||
if (! empty($objp->date_start)) $type=1;
|
||||
@ -459,7 +489,7 @@ if ($id > 0 || ! empty($ref))
|
||||
print '<a name="'.$objp->rowid.'"></a>'; // ancre pour retourner sur la ligne
|
||||
|
||||
// Show product and description
|
||||
$product_static->type=$objp->fk_product_type;
|
||||
$product_static->type=$type;
|
||||
$product_static->id=$objp->fk_product;
|
||||
$product_static->ref=$objp->ref;
|
||||
$product_static->entity = $objp->entity;
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
* \brief File that include conf.php file and commons lib like functions.lib.php
|
||||
*/
|
||||
|
||||
if (! defined('DOL_VERSION')) define('DOL_VERSION','3.8.0-alpha');
|
||||
if (! defined('DOL_VERSION')) define('DOL_VERSION','3.8.0-beta');
|
||||
|
||||
if (! defined('EURO')) define('EURO',chr(128));
|
||||
|
||||
@ -57,12 +57,16 @@ if (defined('DOL_INC_FOR_VERSION_ERROR')) return;
|
||||
// Define vars
|
||||
$conffiletoshowshort = "conf.php";
|
||||
// Define localization of conf file
|
||||
// --- Start of part replaced by Dolibarr packager makepack-dolibarr
|
||||
$conffile = "conf/conf.php";
|
||||
$conffiletoshow = "htdocs/conf/conf.php";
|
||||
// For debian/redhat like systems
|
||||
//$conffile = "/etc/dolibarr/conf.php";
|
||||
//$conffiletoshow = "/etc/dolibarr/conf.php";
|
||||
|
||||
|
||||
// Include configuration
|
||||
// --- End of part replaced by Dolibarr packager makepack-dolibarr
|
||||
// Replace conf filename with "conf" parameter on url by GET
|
||||
if (! empty($_GET['conf']))
|
||||
{
|
||||
|
||||
@ -139,7 +139,7 @@ if ($object->id > 0)
|
||||
print '</td></tr>';
|
||||
|
||||
// Alias names (commercial, trademark or alias names)
|
||||
print '<tr><td valign="top">'.$langs->trans('AliasNames').'</td><td colspan="3">';
|
||||
print '<tr><td>'.$langs->trans('AliasNameShort').'</td><td colspan="3">';
|
||||
print $object->name_alias;
|
||||
print "</td></tr>";
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -54,6 +54,7 @@ delete from llx_adherent_extrafields where fk_object not in (select rowid from l
|
||||
delete from llx_product_extrafields where fk_object not in (select rowid from llx_product);
|
||||
--delete from llx_societe_commerciaux where fk_soc not in (select rowid from llx_societe);
|
||||
|
||||
update llx_product_batch set batch = '' where batch = 'Non défini';
|
||||
|
||||
-- Fix: delete category child with no category parent.
|
||||
drop table tmp_categorie;
|
||||
|
||||
@ -30,7 +30,8 @@ ThirdPartyContact=Third party contact/address
|
||||
StatusContactValidated=Status of contact/address
|
||||
Company=Company
|
||||
CompanyName=Company name
|
||||
AliasNames=Alias names (commercial, trademark, ...)
|
||||
AliasNames=Alias name (commercial, trademark, ...)
|
||||
AliasNameShort=Alias name
|
||||
Companies=Companies
|
||||
CountryIsInEEC=Country is inside European Economic Community
|
||||
ThirdPartyName=Third party name
|
||||
@ -68,6 +69,7 @@ Country=Country
|
||||
CountryCode=Country code
|
||||
CountryId=Country id
|
||||
Phone=Phone
|
||||
PhoneShort=Phone
|
||||
Skype=Skype
|
||||
Call=Call
|
||||
Chat=Chat
|
||||
@ -417,4 +419,4 @@ MergeOriginThirdparty=Duplicate third party (third party you want to delete)
|
||||
MergeThirdparties=Merge third parties
|
||||
ConfirmMergeThirdparties=Are you sure you want to merge this third party into the current one ? All linked objects (invoices, orders, ...) will be moved to current third party so you will be able to delete the duplicate one.
|
||||
ThirdpartiesMergeSuccess=Thirdparties have been merged
|
||||
ErrorThirdpartiesMerge=There was an error when deleting the thirdparties. Please check the log. Changes have been reverted.
|
||||
ErrorThirdpartiesMerge=There was an error when deleting the thirdparties. Please check the log. Changes have been reverted.
|
||||
|
||||
@ -171,6 +171,7 @@ ErrorGlobalVariableUpdater5=No global variable selected
|
||||
ErrorFieldMustBeANumeric=Field <b>%s</b> must be a numeric value
|
||||
ErrorFieldMustBeAnInteger=Field <b>%s</b> must be an integer
|
||||
ErrorMandatoryParametersNotProvided=Mandatory parameter(s) not provided
|
||||
ErrorOppStatusRequiredIfAmount=Vous avez renseigné un montant estimé de l'opportunité. Dans ce cas, il faut aussi renseigner le statut d'opportunité
|
||||
|
||||
# Warnings
|
||||
WarningMandatorySetupNotComplete=Mandatory setup parameters are not yet defined
|
||||
|
||||
@ -127,7 +127,9 @@ TaskCreatedInDolibarr=Task %s created
|
||||
TaskModifiedInDolibarr=Task %s modified
|
||||
TaskDeletedInDolibarr=Task %s deleted
|
||||
OpportunityStatus=Opportunity status
|
||||
OpportunityStatusShort=Opp. status
|
||||
OpportunityAmount=Opportunity amount
|
||||
OpportunityAmountShort=Opp. amount
|
||||
##### Types de contacts #####
|
||||
TypeContact_project_internal_PROJECTLEADER=Project leader
|
||||
TypeContact_project_external_PROJECTLEADER=Project leader
|
||||
|
||||
@ -134,7 +134,7 @@ IsInPackage=Contained into package
|
||||
ShowWarehouse=Show warehouse
|
||||
MovementCorrectStock=Stock correction for product %s
|
||||
MovementTransferStock=Stock transfer of product %s into another warehouse
|
||||
WarehouseMustBeSelectedAtFirstStepWhenProductBatchModuleOn=Source warehouse must be defined here when "Product lot" module is on. It will be used to list wich lot/serial is available for product that required lot/serial data for movement. If you want to send products from different warehouses, just make the shipment into several steps.
|
||||
WarehouseMustBeSelectedAtFirstStepWhenProductBatchModuleOn=Source warehouse must be defined here when "Product lot" module is on. It will be used to list which lot/serial are available for products requiring lot/serial data for movement. If you want to send products from different warehouses, just make the shipment into several steps.
|
||||
InventoryCodeShort=Inv./Mov. code
|
||||
NoPendingReceptionOnSupplierOrder=No pending reception due to open supplier order
|
||||
ThisSerialAlreadyExistWithDifferentDate=This lot/serial number (<strong>%s</strong>) already exists but with different eatby or sellby date (found <strong>%s</strong> but you enter <strong>%s</strong>).
|
||||
|
||||
@ -462,16 +462,17 @@ class Productbatch extends CommonObject
|
||||
/**
|
||||
* Return all batch detail records for given product and warehouse
|
||||
*
|
||||
* @param DoliDB $db database object
|
||||
* @param int $fk_product_stock id product_stock for objet
|
||||
* @param int $with_qty doesn't return line with 0 quantity
|
||||
* @return int <0 if KO, >0 if OK
|
||||
* @param DoliDB $db database object
|
||||
* @param int $fk_product_stock id product_stock for objet
|
||||
* @param int $with_qty doesn't return line with 0 quantity
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public static function findAll($db,$fk_product_stock,$with_qty=0)
|
||||
{
|
||||
global $langs;
|
||||
$ret = array();
|
||||
$sql = "SELECT";
|
||||
|
||||
$sql = "SELECT";
|
||||
$sql.= " t.rowid,";
|
||||
$sql.= " t.tms,";
|
||||
$sql.= " t.fk_product_stock,";
|
||||
@ -480,12 +481,10 @@ class Productbatch extends CommonObject
|
||||
$sql.= " t.batch,";
|
||||
$sql.= " t.qty,";
|
||||
$sql.= " t.import_key";
|
||||
|
||||
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX.self::$_table_element." as t";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."product_batch as t";
|
||||
$sql.= " WHERE fk_product_stock=".$fk_product_stock;
|
||||
|
||||
if ($with_qty) $sql.= " AND qty<>0";
|
||||
|
||||
dol_syslog("productbatch::findAll", LOG_DEBUG);
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
|
||||
@ -238,6 +238,12 @@ if (empty($reshook))
|
||||
if ($ret < 0) $error++;
|
||||
}
|
||||
|
||||
if ($object->opp_amount && ($object->opp_status <= 0))
|
||||
{
|
||||
$error++;
|
||||
setEventMessage($langs->trans("ErrorOppStatusRequiredIfAmount"),'errors');
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$result=$object->update($user);
|
||||
@ -411,7 +417,7 @@ if ($action == 'create' && $user->rights->projet->creer)
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
|
||||
|
||||
print dol_fiche_head();
|
||||
dol_fiche_head();
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
@ -658,7 +664,7 @@ else
|
||||
|
||||
// Opportunity amount
|
||||
print '<tr><td>'.$langs->trans("OpportunityAmount").'</td>';
|
||||
print '<td><input size="4" type="text" name="opp_amount" value="'.(isset($_POST['opp_amount'])?GETPOST('opp_amount'):(strcmp($object->opp_amount,'')?price($object->opp_amount):'')).'"></td>';
|
||||
print '<td><input size="6" type="text" name="opp_amount" value="'.(isset($_POST['opp_amount'])?GETPOST('opp_amount'):(strcmp($object->opp_amount,'')?price($object->opp_amount):'')).'"></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@ -899,7 +905,6 @@ else
|
||||
// Hook to add more things on page
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('mainCardTabAddMore',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
|
||||
}
|
||||
|
||||
llxFooter();
|
||||
|
||||
@ -19,6 +19,9 @@ include_once DOL_DOCUMENT_ROOT . '/core/class/stats.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||
|
||||
|
||||
/**
|
||||
* Class to manage statistics on projects
|
||||
*/
|
||||
class ProjectStats extends Stats
|
||||
{
|
||||
protected $db;
|
||||
@ -26,13 +29,14 @@ class ProjectStats extends Stats
|
||||
public $userid;
|
||||
public $socid;
|
||||
public $year;
|
||||
function __construct($db) {
|
||||
|
||||
function __construct($db)
|
||||
{
|
||||
global $conf, $user;
|
||||
|
||||
$this->db = $db;
|
||||
|
||||
require_once 'project.class.php';
|
||||
|
||||
$this->project = new Project($this->db);
|
||||
}
|
||||
|
||||
@ -113,11 +117,15 @@ class ProjectStats extends Stats
|
||||
|
||||
return $this->_getAllByYear($sql);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Build the where part
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function buildWhere() {
|
||||
public function buildWhere()
|
||||
{
|
||||
$sqlwhere_str = '';
|
||||
$sqlwhere = array();
|
||||
|
||||
@ -148,7 +156,8 @@ class ProjectStats extends Stats
|
||||
* @param int $year scan
|
||||
* @return array of values
|
||||
*/
|
||||
function getNbByMonth($year) {
|
||||
function getNbByMonth($year)
|
||||
{
|
||||
global $user;
|
||||
|
||||
$this->yearmonth = $year;
|
||||
@ -174,7 +183,8 @@ class ProjectStats extends Stats
|
||||
* @param int $year scan
|
||||
* @return array with amount by month
|
||||
*/
|
||||
function getAmountByMonth($year) {
|
||||
function getAmountByMonth($year)
|
||||
{
|
||||
global $user;
|
||||
|
||||
$this->yearmonth = $year;
|
||||
@ -289,18 +299,19 @@ class ProjectStats extends Stats
|
||||
|
||||
|
||||
/**
|
||||
* Return the Project amount by month for a year
|
||||
* Return the Project weighted opp amount by month for a year
|
||||
*
|
||||
* @param int $year scan
|
||||
* @return array with amount by month
|
||||
*/
|
||||
function getWeightedAmountByMonth($year) {
|
||||
function getWeightedAmountByMonth($year)
|
||||
{
|
||||
global $user;
|
||||
|
||||
$this->yearmonth = $year;
|
||||
|
||||
$sql = "SELECT date_format(t.datec,'%m') as dm, SUM(t.opp_amount)";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "projet as t";
|
||||
$sql = "SELECT date_format(t.datec,'%m') as dm, SUM(t.opp_amount * ".$this->db->ifsql('cls.percent IS NULL', '0', 'cls.percent')." / 100)";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "projet as t LEFT JOIN ".MAIN_DB_PREFIX.'c_lead_status as cls ON t.fk_opp_status = cls.rowid';
|
||||
if (! $user->rights->societe->client->voir && ! $user->societe_id)
|
||||
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "societe_commerciaux as sc ON sc.fk_soc=t.fk_soc AND sc.fk_user=" . $user->id;
|
||||
$sql .= $this->buildWhere();
|
||||
@ -401,7 +412,8 @@ class ProjectStats extends Stats
|
||||
* @param int $year scan
|
||||
* @return array with amount by month
|
||||
*/
|
||||
function getTransformRateByMonth($year) {
|
||||
function getTransformRateByMonth($year)
|
||||
{
|
||||
global $user;
|
||||
|
||||
$this->yearmonth = $year;
|
||||
|
||||
@ -274,13 +274,17 @@ if ($resql)
|
||||
print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"p.title","",$param,"",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("SalesRepresentative"),$_SERVER["PHP_SELF"],"","",$param,"",$sortfield,$sortorder);
|
||||
if (! empty($conf->global->PROJECT_LIST_SHOW_STARTDATE)) print_liste_field_titre($langs->trans("DateStart"),$_SERVER["PHP_SELF"],"p.dateo","",$param,'align="center"',$sortfield,$sortorder);
|
||||
if (empty($conf->global->PROJECT_LIST_HIDE_STARTDATE)) print_liste_field_titre($langs->trans("DateStart"),$_SERVER["PHP_SELF"],"p.dateo","",$param,'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("DateEnd"),$_SERVER["PHP_SELF"],"p.datee","",$param,'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Visibility"),$_SERVER["PHP_SELF"],"p.public","",$param,"",$sortfield,$sortorder);
|
||||
if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
{
|
||||
print_liste_field_titre($langs->trans("OpportunityAmountShort"),$_SERVER["PHP_SELF"],'p.opp_amount',"",$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("OpportunityStatusShort"),$_SERVER["PHP_SELF"],'p.fk_opp_status',"",$param,'',$sortfield,$sortorder);
|
||||
}
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES)) print_liste_field_titre($langs->trans("OpportunityStatus"),$_SERVER["PHP_SELF"],'p.fk_opp_status',"",$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],'p.fk_statut',"",$param,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','',$sortfield,$sortorder,'maxwidthsearch ');
|
||||
print "</tr>\n";
|
||||
@ -298,7 +302,7 @@ if ($resql)
|
||||
// Sale representative
|
||||
print '<td class="liste_titre"> </td>';
|
||||
// Start date
|
||||
if (! empty($conf->global->PROJECT_LIST_SHOW_STARTDATE))
|
||||
if (empty($conf->global->PROJECT_LIST_HIDE_STARTDATE))
|
||||
{
|
||||
print '<td class="liste_titre center">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="sday" value="'.$sday.'">';
|
||||
@ -325,6 +329,8 @@ if ($resql)
|
||||
if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
{
|
||||
print '<td class="liste_titre nowrap">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre nowrap">';
|
||||
print $formproject->selectOpportunityStatus('search_opp_status',$search_opp_status,1,1);
|
||||
print '</td>';
|
||||
}
|
||||
@ -417,10 +423,13 @@ if ($resql)
|
||||
print '</td>';
|
||||
|
||||
// Date start
|
||||
print '<td class="center">';
|
||||
print dol_print_date($db->jdate($objp->date_start),'day');
|
||||
print '</td>';
|
||||
|
||||
if (empty($conf->global->PROJECT_LIST_HIDE_STARTDATE))
|
||||
{
|
||||
print '<td class="center">';
|
||||
print dol_print_date($db->jdate($objp->date_start),'day');
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Date end
|
||||
print '<td class="center">';
|
||||
print dol_print_date($db->jdate($objp->date_end),'day');
|
||||
@ -438,6 +447,10 @@ if ($resql)
|
||||
|
||||
if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
{
|
||||
print '<td>';
|
||||
if ($objp->opp_status_code) print $langs->trans("OppAmount".$objp->opp_amount);
|
||||
print '</td>';
|
||||
|
||||
print '<td>';
|
||||
if ($objp->opp_status_code) print $langs->trans("OppStatusShort".$objp->opp_status_code);
|
||||
print '</td>';
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Lead
|
||||
* Copyright (C) 2014-2015 Florian HENRY <florian.henry@open-concept.pro>
|
||||
/* Copyright (C) 2014-2015 Florian HENRY <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2015 Laurent Destailleur <ldestailleur@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
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
|
||||
global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet;
|
||||
$theme_bordercolor = array(235,235,224);
|
||||
$theme_datacolor = array(array(190,190,220), array(200,160,180), array(125,135,150), array(170,140,190), array(190,190,170), array(190,170,190), array(170,190,190), array(150,135,125), array(85,135,150), array(150,135,80), array(150,80,150));
|
||||
$theme_datacolor = array(array(140,140,220), array(190,120,120), array(0,160,140), array(190,190,100), array(115,125,150), array(100,170,20), array(250,190,30), array(150,135,125), array(85,135,150), array(150,135,80), array(150,80,150));
|
||||
$theme_bgcolor = array(hexdec('F4'),hexdec('F4'),hexdec('F4'));
|
||||
$theme_bgcoloronglet = array(hexdec('DE'),hexdec('E7'),hexdec('EC'));
|
||||
|
||||
|
||||
@ -258,7 +258,7 @@ textarea.cke_source:focus
|
||||
input, input.flat, textarea, textarea.flat, form.flat select, select, select.flat, .dataTables_length label select {
|
||||
font-size: <?php print $fontsize ?>px;
|
||||
font-family: <?php print $fontlist ?>;
|
||||
background: #FDFDFD;
|
||||
background: #FFF;
|
||||
color: #111;
|
||||
border: 1px solid #C0C0C0;
|
||||
margin: 0px 0px 0px 0px;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user