Merge remote-tracking branch 'origin/3.9' into develop
Conflicts: dev/initdata/initdemo.sh htdocs/accountancy/journal/bankjournal.php htdocs/accountancy/journal/purchasesjournal.php htdocs/commande/card.php htdocs/compta/facture.php
This commit is contained in:
commit
543f5cef63
103
ChangeLog
103
ChangeLog
@ -187,6 +187,109 @@ This is list of hooks modified:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
***** ChangeLog for 3.8.4 compared to 3.8.3 *****
|
||||||
|
FIX: #3694
|
||||||
|
FIX: #3798 #2519 Cron jobs would never be executed
|
||||||
|
FIX: #4155 Search Categories error
|
||||||
|
FIX: #4239
|
||||||
|
FIX: #4272 Error when trying to print the page "Linked objects" of a Thirdparty
|
||||||
|
FIX: #4291 Correctly filter bank card GETPOSTs
|
||||||
|
FIX: #4291 Correctly filter external calendar GETPOSTs
|
||||||
|
FIX: #4341
|
||||||
|
FIX: #4394 Untranslated label in list of expense reports
|
||||||
|
FIX: #4414 Supplier invoices use FAC_FORCE_DATE_VALIDATION client invoices property
|
||||||
|
FIX: #4418
|
||||||
|
FIX: #4425 Missing "VAT" translation in supplier order popup
|
||||||
|
FIX: #4434 Weird behaviour when enabling multiprices
|
||||||
|
FIX: #4440 Wrong price is filled by Product::fetch into multiprices arrays
|
||||||
|
FIX: #4453 SEPA Direct Debit generated XML shows a trailing comma in RmtInf field
|
||||||
|
FIX: #4528
|
||||||
|
FIX: #4556 desiredstock and seuil_stock_alerte cleared on modify product card
|
||||||
|
FIX: #4580
|
||||||
|
FIX: #4583 Incorrect call of Categories::containing throws a DoliDB error
|
||||||
|
FIX: #4649 Wrong parameters order
|
||||||
|
FIX: #4768
|
||||||
|
FIX: #4785
|
||||||
|
FIX: Add a test to show bugged module with a bad declaration of dictionaries to avoid to see clean module to be breaked.
|
||||||
|
FIX: add Croatia into list of country in EEC
|
||||||
|
FIX: add missing global def for ttc column
|
||||||
|
FIX: ajax error with multicompany module
|
||||||
|
FIX: Avoid errors when batch stock is negative
|
||||||
|
FIX: bad field in select
|
||||||
|
FIX: bad path
|
||||||
|
FIX: bad transaction level due to code of situation invoices
|
||||||
|
FIX: best sql request
|
||||||
|
FIX: bookmark's user change after update if the user hasn't superadmin right
|
||||||
|
FIX: call trigger LINEBILL_SUPPLIER_CREATE
|
||||||
|
FIX: Can not disabled an opened service line in a contract
|
||||||
|
FIX: can't clone event
|
||||||
|
FIX: can't send mail to thirdparty contact if no mail defined on thirdparty card
|
||||||
|
FIX: Check stock of batch on shippment
|
||||||
|
FIX: code corrupting database
|
||||||
|
FIX: compatibility with multicompany transversal mode
|
||||||
|
FIX: compatibility with multicompany transversal mode and more security issue
|
||||||
|
FIX: Contrat card don't consider user permissions to show active/unactive service button
|
||||||
|
FIX: CVE CVE-2015-8685
|
||||||
|
FIX: Deadlock situation. Can't edit anymore contract. FIX: List of automatic events was not visible.
|
||||||
|
FIX: disable main.inc.php hooks
|
||||||
|
FIX: do not show warning if account defined
|
||||||
|
FIX: don't see the sales representative of anothers entities
|
||||||
|
FIX: duration format
|
||||||
|
FIX: Correct problem of rights beetween tax and salaries module
|
||||||
|
FIX: Email templates not compatible with Multicompany
|
||||||
|
FIX: $fileparams is not defined
|
||||||
|
FIX: filter by socid if from customer card
|
||||||
|
FIX: for avoid conflict with "global $m" in memory.lib.php
|
||||||
|
FIX: for avoid division by 0
|
||||||
|
FIX: hover css
|
||||||
|
FIX: If option to hide automatic ECM is on, dont show menu.
|
||||||
|
FIX: if we dont use SUPPLIER_ORDER_USE_HOUR_FOR_DELIVERY_DATE the hour is displayed on pdf
|
||||||
|
FIX: Introduce hidden option to disable feature than hangs when too much data
|
||||||
|
FIX: ISSUE #4506 : make working the PROPAL_CLONE_ON_CREATE_PAGE hidden constant
|
||||||
|
FIX: issue when bank module is disabled FIX: missing entity filter for lines of payment
|
||||||
|
FIX: list of leave request was not showing label correctly.
|
||||||
|
FIX: MAIN_THIRDPARTY_CREATION_INDIVIDUAL syntax error in name
|
||||||
|
FIX: markRate can be 100
|
||||||
|
FIX: minor css error (pixel size must have "px"). Compatibility with old behaviour.
|
||||||
|
FIX: missing field "label"
|
||||||
|
FIX: missing signature and uniformize code between card and script
|
||||||
|
FIX: missing traduction
|
||||||
|
FIX: missing translation
|
||||||
|
FIX: missing translation key
|
||||||
|
FIX: nblignes not calculated after hook and hook can't modify this value. Usefull for modules
|
||||||
|
FIX: no database structure change is allowed into minor versions
|
||||||
|
FIX: no transaction in this place
|
||||||
|
FIX: Noway to validate a leave request for some uer even if they have permission for.
|
||||||
|
FIX: Option to disable meteo was not set correctly in edit mode
|
||||||
|
FIX: $outputlangs is not defined (dolibarr 3.7, 3.8, 3.9)
|
||||||
|
FIX: path to copyrighted files
|
||||||
|
FIX: php unit to work both with old and new setup
|
||||||
|
FIX: Purge of temp files was broken
|
||||||
|
FIX: Relative discount decimals are not saved
|
||||||
|
FIX: Removed a bugged list. Fixed another one to not count data of previous year.
|
||||||
|
FIX: retrieve correct pu_ttc (set by printObjectLine function) like in 3.7
|
||||||
|
FIX: search product in customer product prices doesn't work
|
||||||
|
FIX: Some filters are lost when paging
|
||||||
|
FIX: sql injection #4341
|
||||||
|
FIX: sql injection even when code is on several lines
|
||||||
|
FIX: sql request and total for time spen for current month
|
||||||
|
FIX: Sql syntax error in doc_generic_task_odt
|
||||||
|
FIX: Status filter don't work
|
||||||
|
FIX: Strict Standards: Only variables should be passed by reference
|
||||||
|
FIX: The part added with hidden option MAIN_DOC_USE_TIMING was included with a . instead of -. This make os think it is part of extension instead of file name.
|
||||||
|
FIX: The third dashboard don't consider user permissions
|
||||||
|
FIX: the view my task must show only task you are assigned to
|
||||||
|
FIX: to allow phpunit of migration process for 3.4 to 3.5
|
||||||
|
FIX: to allow phpunit of migration process for 3.5 to 3.6
|
||||||
|
FIX: userlocaltax
|
||||||
|
FIX: view of product image when using old path
|
||||||
|
FIX: size of image uploaded on user.
|
||||||
|
FIX: We must ue the "small" size of imge to show on card pages.
|
||||||
|
FIX: When we make a direct assignement on a task to a user, we must check he is also assigned to project (and if not assign it)
|
||||||
|
FIX: wrong fk_parent_line in credit note with invoiceAvoirWithLines option
|
||||||
|
FIX: wrong modelpdf var name
|
||||||
|
FIX: wrong object name
|
||||||
|
|
||||||
***** ChangeLog for 3.8.3 compared to 3.8.2 *****
|
***** ChangeLog for 3.8.3 compared to 3.8.2 *****
|
||||||
FIX: #3805
|
FIX: #3805
|
||||||
FIX: #3231 [Members] Public subscription page displays GeoIP error
|
FIX: #3231 [Members] Public subscription page displays GeoIP error
|
||||||
|
|||||||
@ -1108,6 +1108,14 @@ if ($nboftargetok) {
|
|||||||
"$DESTI/standard/$FILENAMETGZ.tgz"=>'Dolibarr ERP-CRM',
|
"$DESTI/standard/$FILENAMETGZ.tgz"=>'Dolibarr ERP-CRM',
|
||||||
"$DESTI/standard/$FILENAMETGZ.zip"=>'Dolibarr ERP-CRM'
|
"$DESTI/standard/$FILENAMETGZ.zip"=>'Dolibarr ERP-CRM'
|
||||||
);
|
);
|
||||||
|
%filestoscanstableasso=(
|
||||||
|
"$DESTI/package_rpm_generic/$FILENAMERPM"=>'package_rpm_generic',
|
||||||
|
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'package_debian-ubuntu',
|
||||||
|
"$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'package_windows',
|
||||||
|
"$DESTI/standard/$FILENAMETGZ.tgz"=>'standard',
|
||||||
|
"$DESTI/standard/$FILENAMETGZ.zip"=>'standard'
|
||||||
|
);
|
||||||
|
|
||||||
use POSIX qw/strftime/;
|
use POSIX qw/strftime/;
|
||||||
foreach my $file (sort keys %filestoscansf)
|
foreach my $file (sort keys %filestoscansf)
|
||||||
{
|
{
|
||||||
@ -1150,8 +1158,10 @@ if ($nboftargetok) {
|
|||||||
|
|
||||||
if ($target eq 'SF') {
|
if ($target eq 'SF') {
|
||||||
$destFolder="$NEWPUBLISH/$filestoscan{$file}/".$MAJOR.'.'.$MINOR.'.'.$BUILD;
|
$destFolder="$NEWPUBLISH/$filestoscan{$file}/".$MAJOR.'.'.$MINOR.'.'.$BUILD;
|
||||||
print "Publish file ".$file." to $NEWPUBLISH/".$filestoscan{$file}."/".$MAJOR.'.'.$MINOR.'.'.$BUILD."\n";
|
|
||||||
}
|
}
|
||||||
|
elsif ($target eq 'ASSO' && $NEWPUBLISH =~ /stable/) {
|
||||||
|
$destFolder="$NEWPUBLISH/$filestoscanstableasso{$file}";
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$dirnameonly=$file;
|
$dirnameonly=$file;
|
||||||
@ -1159,8 +1169,8 @@ if ($nboftargetok) {
|
|||||||
$filenameonly=$file;
|
$filenameonly=$file;
|
||||||
$filenameonly =~ s/.*\/[^\/]+\/([^\/])+$/$1/;
|
$filenameonly =~ s/.*\/[^\/]+\/([^\/])+$/$1/;
|
||||||
$destFolder="$NEWPUBLISH/$dirnameonly";
|
$destFolder="$NEWPUBLISH/$dirnameonly";
|
||||||
print "Publish file ".$file." to $NEWPUBLISH/".$dirnameonly."\n";
|
|
||||||
}
|
}
|
||||||
|
print "Publish file ".$file." to ".$destFolder."\n";
|
||||||
|
|
||||||
# mkdir
|
# mkdir
|
||||||
#my $ssh = Net::SSH::Perl->new("frs.sourceforge.net");
|
#my $ssh = Net::SSH::Perl->new("frs.sourceforge.net");
|
||||||
|
|||||||
@ -171,6 +171,8 @@ then
|
|||||||
fi
|
fi
|
||||||
#echo "mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile"
|
#echo "mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile"
|
||||||
#mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile
|
#mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile
|
||||||
|
#echo "drop old table"
|
||||||
|
echo "drop table llx_accounting_account;" | mysql -P$port -u$admin $passwd $base
|
||||||
echo "mysql -P$port -u$admin -p***** $base < $mydir/$dumpfile"
|
echo "mysql -P$port -u$admin -p***** $base < $mydir/$dumpfile"
|
||||||
mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile
|
mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile
|
||||||
export res=$?
|
export res=$?
|
||||||
|
|||||||
@ -312,7 +312,6 @@ if ($action == 'writebookkeeping') {
|
|||||||
if ($resultmid) {
|
if ($resultmid) {
|
||||||
$objmid = $db->fetch_object($resultmid);
|
$objmid = $db->fetch_object($resultmid);
|
||||||
$bookkeeping->doc_ref = $objmid->ref_supplier . ' (' . $objmid->ref . ')';
|
$bookkeeping->doc_ref = $objmid->ref_supplier . ' (' . $objmid->ref . ')';
|
||||||
;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -414,7 +413,8 @@ if ($action == 'export_csv') {
|
|||||||
$companystatic = new Client($db);
|
$companystatic = new Client($db);
|
||||||
|
|
||||||
// Model Cegid Expert Export
|
// Model Cegid Expert Export
|
||||||
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 2) {
|
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 2)
|
||||||
|
{
|
||||||
$sep = ";";
|
$sep = ";";
|
||||||
|
|
||||||
foreach ( $tabpay as $key => $val ) {
|
foreach ( $tabpay as $key => $val ) {
|
||||||
|
|||||||
@ -141,14 +141,15 @@ if ($result) {
|
|||||||
|
|
||||||
// Situation invoices handling
|
// Situation invoices handling
|
||||||
$line = new FactureLigne($db);
|
$line = new FactureLigne($db);
|
||||||
$line->fetch($obj->rowid);
|
$line->fetch($obj->fdid); // id of line
|
||||||
$prev_progress = $line->get_prev_progress();
|
$prev_progress = 0;
|
||||||
if ($obj->type == Facture::TYPE_SITUATION) {
|
if ($obj->type == Facture::TYPE_SITUATION) {
|
||||||
// Avoid divide by 0
|
// Avoid divide by 0
|
||||||
if ($obj->situation_percent == 0) {
|
if ($obj->situation_percent == 0) {
|
||||||
$situation_ratio = 0;
|
$situation_ratio = 0;
|
||||||
} else {
|
} else {
|
||||||
$situation_ratio = ($obj->situation_percent - $prev_progress) / $obj->situation_percent;
|
$prev_progress = $line->get_prev_progress($obj->rowid); // id of invoice
|
||||||
|
$situation_ratio = ($obj->situation_percent - $prev_progress) / $obj->situation_percent;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$situation_ratio = 1;
|
$situation_ratio = 1;
|
||||||
|
|||||||
@ -1321,6 +1321,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
|
|
||||||
$projectid = 0;
|
$projectid = 0;
|
||||||
$remise_absolue = 0;
|
$remise_absolue = 0;
|
||||||
|
|
||||||
$currency_code = $conf->currency;
|
$currency_code = $conf->currency;
|
||||||
|
|
||||||
if (! empty($origin) && ! empty($originid)) {
|
if (! empty($origin) && ! empty($originid)) {
|
||||||
@ -1333,7 +1334,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
|
|
||||||
if ($element == 'project') {
|
if ($element == 'project') {
|
||||||
$projectid = $originid;
|
$projectid = $originid;
|
||||||
|
|
||||||
if (!$cond_reglement_id) {
|
if (!$cond_reglement_id) {
|
||||||
$cond_reglement_id = $soc->cond_reglement_id;
|
$cond_reglement_id = $soc->cond_reglement_id;
|
||||||
}
|
}
|
||||||
@ -1669,7 +1670,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
default:
|
default:
|
||||||
$newclassname = $classname;
|
$newclassname = $classname;
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr><td>' . $langs->trans($newclassname) . '</td><td colspan="2">' . $objectsrc->getNomUrl(1) . '</td></tr>';
|
print '<tr><td>' . $langs->trans($newclassname) . '</td><td colspan="2">' . $objectsrc->getNomUrl(1) . '</td></tr>';
|
||||||
print '<tr><td>' . $langs->trans('TotalHT') . '</td><td colspan="2">' . price($objectsrc->total_ht) . '</td></tr>';
|
print '<tr><td>' . $langs->trans('TotalHT') . '</td><td colspan="2">' . price($objectsrc->total_ht) . '</td></tr>';
|
||||||
print '<tr><td>' . $langs->trans('TotalVAT') . '</td><td colspan="2">' . price($objectsrc->total_tva) . "</td></tr>";
|
print '<tr><td>' . $langs->trans('TotalVAT') . '</td><td colspan="2">' . price($objectsrc->total_tva) . "</td></tr>";
|
||||||
@ -2605,6 +2606,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
|
|
||||||
$ref = dol_sanitizeFileName($object->ref);
|
$ref = dol_sanitizeFileName($object->ref);
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
||||||
|
$fileparams = dol_most_recent_file($conf->commande->dir_output . '/' . $ref, preg_quote($ref, '/').'[^\-]+');
|
||||||
$file = $fileparams['fullname'];
|
$file = $fileparams['fullname'];
|
||||||
|
|
||||||
// Define output language
|
// Define output language
|
||||||
|
|||||||
@ -783,10 +783,17 @@ if (empty($reshook))
|
|||||||
$facture_source = new Facture($db); // fetch origin object
|
$facture_source = new Facture($db); // fetch origin object
|
||||||
if ($facture_source->fetch($object->fk_facture_source)>0)
|
if ($facture_source->fetch($object->fk_facture_source)>0)
|
||||||
{
|
{
|
||||||
|
$fk_parent_line = 0;
|
||||||
|
|
||||||
foreach($facture_source->lines as $line)
|
foreach($facture_source->lines as $line)
|
||||||
{
|
{
|
||||||
|
// Reset fk_parent_line for no child products and special product
|
||||||
|
if (($line->product_type != 9 && empty($line->fk_parent_line)) || $line->product_type == 9) {
|
||||||
|
$fk_parent_line = 0;
|
||||||
|
}
|
||||||
|
|
||||||
$line->fk_facture = $object->id;
|
$line->fk_facture = $object->id;
|
||||||
|
$line->fk_parent_line = $fk_parent_line;
|
||||||
|
|
||||||
$line->subprice =-$line->subprice; // invert price for object
|
$line->subprice =-$line->subprice; // invert price for object
|
||||||
$line->pa_ht = -$line->pa_ht;
|
$line->pa_ht = -$line->pa_ht;
|
||||||
@ -796,9 +803,14 @@ if (empty($reshook))
|
|||||||
$line->total_localtax1=-$line->total_localtax1;
|
$line->total_localtax1=-$line->total_localtax1;
|
||||||
$line->total_localtax2=-$line->total_localtax2;
|
$line->total_localtax2=-$line->total_localtax2;
|
||||||
|
|
||||||
$line->insert();
|
$result = $line->insert();
|
||||||
|
|
||||||
$object->lines[] = $line; // insert new line in current object
|
$object->lines[] = $line; // insert new line in current object
|
||||||
|
|
||||||
|
// Defined the new fk_parent_line
|
||||||
|
if ($result > 0 && $line->product_type == 9) {
|
||||||
|
$fk_parent_line = $result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$object->update_price(1);
|
$object->update_price(1);
|
||||||
@ -1594,7 +1606,7 @@ if (empty($reshook))
|
|||||||
|
|
||||||
$line = new FactureLigne($db);
|
$line = new FactureLigne($db);
|
||||||
$line->fetch(GETPOST('lineid'));
|
$line->fetch(GETPOST('lineid'));
|
||||||
$percent = $line->get_prev_progress();
|
$percent = $line->get_prev_progress($object->id);
|
||||||
|
|
||||||
if (GETPOST('progress') < $percent)
|
if (GETPOST('progress') < $percent)
|
||||||
{
|
{
|
||||||
@ -1712,7 +1724,7 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
foreach ($object->lines as $line)
|
foreach ($object->lines as $line)
|
||||||
{
|
{
|
||||||
$percent = $line->get_prev_progress();
|
$percent = $line->get_prev_progress($object->id);
|
||||||
if (GETPOST('all_progress') < $percent) {
|
if (GETPOST('all_progress') < $percent) {
|
||||||
$mesg = '<div class="warning">' . $langs->trans("CantBeLessThanMinPercent") . '</div>';
|
$mesg = '<div class="warning">' . $langs->trans("CantBeLessThanMinPercent") . '</div>';
|
||||||
$result = -1;
|
$result = -1;
|
||||||
@ -1911,7 +1923,7 @@ if ($action == 'create')
|
|||||||
|
|
||||||
if ($element == 'project') {
|
if ($element == 'project') {
|
||||||
$projectid = $originid;
|
$projectid = $originid;
|
||||||
|
|
||||||
if (!$cond_reglement_id) {
|
if (!$cond_reglement_id) {
|
||||||
$cond_reglement_id = $soc->cond_reglement_id;
|
$cond_reglement_id = $soc->cond_reglement_id;
|
||||||
}
|
}
|
||||||
@ -1924,7 +1936,7 @@ if ($action == 'create')
|
|||||||
if (!$dateinvoice) {
|
if (!$dateinvoice) {
|
||||||
// Do not set 0 here (0 for a date is 1970)
|
// Do not set 0 here (0 for a date is 1970)
|
||||||
$dateinvoice = (empty($dateinvoice)?(empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''):$dateinvoice);
|
$dateinvoice = (empty($dateinvoice)?(empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''):$dateinvoice);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// For compatibility
|
// For compatibility
|
||||||
if ($element == 'order' || $element == 'commande') {
|
if ($element == 'order' || $element == 'commande') {
|
||||||
@ -2667,7 +2679,7 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
$qualified_for_stock_change = $object->hasProductsOrServices(1);
|
$qualified_for_stock_change = $object->hasProductsOrServices(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($object->type != Facture::TYPE_DEPOSIT && ! empty($conf->global->STOCK_CALCULATE_ON_BILL) && $qualified_for_stock_change && $object->statut >= 1)
|
if ($object->type != Facture::TYPE_DEPOSIT && ! empty($conf->global->STOCK_CALCULATE_ON_BILL) && $qualified_for_stock_change && $object->statut >= 1)
|
||||||
{
|
{
|
||||||
$langs->load("stocks");
|
$langs->load("stocks");
|
||||||
require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php';
|
||||||
@ -2858,7 +2870,7 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Clone confirmation
|
// Clone confirmation
|
||||||
if ($action == 'clone')
|
if ($action == 'clone')
|
||||||
{
|
{
|
||||||
// Create an array for form
|
// Create an array for form
|
||||||
$formquestion = array(
|
$formquestion = array(
|
||||||
@ -2869,7 +2881,7 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('CloneInvoice'), $langs->trans('ConfirmCloneInvoice', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
|
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('CloneInvoice'), $langs->trans('ConfirmCloneInvoice', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $formconfirm)
|
if (! $formconfirm)
|
||||||
{
|
{
|
||||||
$parameters = array('lineid' => $lineid);
|
$parameters = array('lineid' => $lineid);
|
||||||
$reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
@ -3818,14 +3830,14 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
// modified by hook
|
// modified by hook
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
// Editer une facture deja validee, sans paiement effectue et pas exporte en compta
|
// Editer une facture deja validee, sans paiement effectue et pas exporte en compta
|
||||||
if ($object->statut == 1)
|
if ($object->statut == 1)
|
||||||
{
|
{
|
||||||
// On verifie si les lignes de factures ont ete exportees en compta et/ou ventilees
|
// On verifie si les lignes de factures ont ete exportees en compta et/ou ventilees
|
||||||
$ventilExportCompta = $object->getVentilExportCompta();
|
$ventilExportCompta = $object->getVentilExportCompta();
|
||||||
|
|
||||||
if ($resteapayer == $object->total_ttc && empty($object->paye) && $ventilExportCompta == 0)
|
if ($resteapayer == $object->total_ttc && empty($object->paye) && $ventilExportCompta == 0)
|
||||||
{
|
{
|
||||||
if (! $objectidnext)
|
if (! $objectidnext && $object->is_last_in_cycle())
|
||||||
{
|
{
|
||||||
if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->facture->creer))
|
if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->facture->creer))
|
||||||
|| (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->facture->invoice_advance->unvalidate)))
|
|| (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->facture->invoice_advance->unvalidate)))
|
||||||
|
|||||||
@ -4533,15 +4533,22 @@ class FactureLigne extends CommonInvoiceLine
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns situation_percent of the previous line
|
* Returns situation_percent of the previous line.
|
||||||
|
* Warning: If invoice is a replacement invoice, this->fk_prev_id is id of the replaced line.
|
||||||
*
|
*
|
||||||
* @return int >= 0
|
* @param int $invoiceid Invoice id
|
||||||
|
* @return int >= 0
|
||||||
*/
|
*/
|
||||||
function get_prev_progress()
|
function get_prev_progress($invoiceid)
|
||||||
{
|
{
|
||||||
if (is_null($this->fk_prev_id) || empty($this->fk_prev_id) || $this->fk_prev_id == "") {
|
if (is_null($this->fk_prev_id) || empty($this->fk_prev_id) || $this->fk_prev_id == "") {
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
|
// If invoice is a not a situation invoice, this->fk_prev_id is used for something else
|
||||||
|
$tmpinvoice=new Facture($this->db);
|
||||||
|
$tmpinvoice->fetch($invoiceid);
|
||||||
|
if ($tmpinvoice->type != Facture::TYPE_SITUATION) return 0;
|
||||||
|
|
||||||
$sql = 'SELECT situation_percent FROM ' . MAIN_DB_PREFIX . 'facturedet WHERE rowid=' . $this->fk_prev_id;
|
$sql = 'SELECT situation_percent FROM ' . MAIN_DB_PREFIX . 'facturedet WHERE rowid=' . $this->fk_prev_id;
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql && $resql->num_rows > 0) {
|
if ($resql && $resql->num_rows > 0) {
|
||||||
|
|||||||
@ -166,14 +166,15 @@ if ($result)
|
|||||||
|
|
||||||
// Situation invoices handling
|
// Situation invoices handling
|
||||||
$line = new FactureLigne($db);
|
$line = new FactureLigne($db);
|
||||||
$line->fetch($obj->id);
|
$line->fetch($obj->id); // id of line
|
||||||
$prev_progress = $line->get_prev_progress();
|
$prev_progress = 0;
|
||||||
if ($obj->type==Facture::TYPE_SITUATION) {
|
if ($obj->type==Facture::TYPE_SITUATION) {
|
||||||
// Avoid divide by 0
|
// Avoid divide by 0
|
||||||
if ($obj->situation_percent == 0) {
|
if ($obj->situation_percent == 0) {
|
||||||
$situation_ratio = 0;
|
$situation_ratio = 0;
|
||||||
} else {
|
} else {
|
||||||
$situation_ratio = ($obj->situation_percent - $prev_progress) / $obj->situation_percent;
|
$prev_progress = $line->get_prev_progress($obj->rowid); // id on invoice
|
||||||
|
$situation_ratio = ($obj->situation_percent - $prev_progress) / $obj->situation_percent;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$situation_ratio = 1;
|
$situation_ratio = 1;
|
||||||
|
|||||||
@ -166,7 +166,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0)
|
function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0)
|
||||||
{
|
{
|
||||||
global $user,$langs,$conf,$mysoc,$db,$hookmanager;
|
global $user,$langs,$conf,$mysoc,$db,$hookmanager;
|
||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||||
@ -539,7 +539,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->postotalht, 3, $total_excl_tax, 0, 'R', 0);
|
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->postotalht, 3, $total_excl_tax, 0, 'R', 0);
|
||||||
|
|
||||||
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
|
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
|
||||||
$prev_progress = $object->lines[$i]->get_prev_progress();
|
$prev_progress = $object->lines[$i]->get_prev_progress($object->id);
|
||||||
if ($prev_progress > 0) // Compute progress from previous situation
|
if ($prev_progress > 0) // Compute progress from previous situation
|
||||||
{
|
{
|
||||||
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent;
|
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent;
|
||||||
@ -548,6 +548,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne=$object->lines[$i]->multicurrency_total_tva;
|
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne=$object->lines[$i]->multicurrency_total_tva;
|
||||||
else $tvaligne=$object->lines[$i]->total_tva;
|
else $tvaligne=$object->lines[$i]->total_tva;
|
||||||
}
|
}
|
||||||
|
|
||||||
$localtax1ligne=$object->lines[$i]->total_localtax1;
|
$localtax1ligne=$object->lines[$i]->total_localtax1;
|
||||||
$localtax2ligne=$object->lines[$i]->total_localtax2;
|
$localtax2ligne=$object->lines[$i]->total_localtax2;
|
||||||
$localtax1_rate=$object->lines[$i]->localtax1_tx;
|
$localtax1_rate=$object->lines[$i]->localtax1_tx;
|
||||||
@ -1106,7 +1107,8 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//}
|
|
||||||
|
//}
|
||||||
// VAT
|
// VAT
|
||||||
foreach($this->tva as $tvakey => $tvaval)
|
foreach($this->tva as $tvakey => $tvaval)
|
||||||
{
|
{
|
||||||
|
|||||||
0
htdocs/includes/ccampbell/chromephp/ChromePhp.php
Executable file → Normal file
0
htdocs/includes/ccampbell/chromephp/ChromePhp.php
Executable file → Normal file
0
htdocs/includes/mobiledetect/mobiledetectlib/tests/BasicsTest.php
Executable file → Normal file
0
htdocs/includes/mobiledetect/mobiledetectlib/tests/BasicsTest.php
Executable file → Normal file
0
htdocs/includes/tecnickcom/tcpdf/tools/tcpdf_addfont.php
Executable file → Normal file
0
htdocs/includes/tecnickcom/tcpdf/tools/tcpdf_addfont.php
Executable file → Normal file
@ -889,13 +889,14 @@ ul.tmenu { /* t r b l */
|
|||||||
}
|
}
|
||||||
ul.tmenu li {
|
ul.tmenu li {
|
||||||
background: rgb(<?php echo $colorbackhmenu1 ?>);
|
background: rgb(<?php echo $colorbackhmenu1 ?>);
|
||||||
|
/*
|
||||||
background-image: linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
|
background-image: linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
|
||||||
background-image: -o-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
|
background-image: -o-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
|
||||||
background-image: -moz-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
|
background-image: -moz-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
|
||||||
background-image: -webkit-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
|
background-image: -webkit-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
|
||||||
background-image: -ms-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
|
background-image: -ms-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
|
||||||
background-image: -webkit-gradient( linear, left top, left bottom, color-stop(0, rgba(255,255,255,.3)), color-stop(1, rgba(0,0,0,.3)) );
|
background-image: -webkit-gradient( linear, left top, left bottom, color-stop(0, rgba(255,255,255,.3)), color-stop(1, rgba(0,0,0,.3)) );
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
li.tmenu, li.tmenusel {
|
li.tmenu, li.tmenusel {
|
||||||
<?php print $minwidthtmenu?'min-width: '.$minwidthtmenu.'px;':''; ?>
|
<?php print $minwidthtmenu?'min-width: '.$minwidthtmenu.'px;':''; ?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user