Compare commits

...

38 Commits
3.8.2 ... 3.7.2

Author SHA1 Message Date
Laurent Destailleur
c639e82062 FIX Add a protection to not make release if ChangeLog was not generated.
Conflicts:
	ChangeLog
2015-11-08 14:45:56 +01:00
Laurent Destailleur
e6ab6bdb8e Merge branch '3.7' of git@github.com:Dolibarr/dolibarr.git into 3.7 2015-11-08 14:38:01 +01:00
Laurent Destailleur
7a0206adce FIX Missing to set context into workflow actions, so triggers can't know
we are creating an invoice from order or an order from a proposal.
2015-11-08 14:37:50 +01:00
Juanjo Menent
0ce7cad48c Merge pull request #3946 from aspangaro/3.7-1
Fix: Accountancy compatibility with subtotal & jalon module
2015-11-08 11:26:06 +01:00
Juanjo Menent
7673a73a65 Merge pull request #3939 from marcosgdf/bug-3836
FIX #3836 Unable to upload a document to an invoice under some circunstances
2015-11-08 11:21:16 +01:00
Juanjo Menent
8377d6967a Merge pull request #3934 from marcosgdf/bug-3679
FIX #3679 Error when deleting a Localtax2 special payment
2015-11-08 11:16:07 +01:00
Juanjo Menent
0cab08b2f3 Merge pull request #3932 from marcosgdf/bug-3707
FIX #3707 Thirdparty bank account page table has a glitch
2015-11-08 11:14:39 +01:00
aspangaro
f0a3bca4c2 Fix: Accountancy compatibility with subtotal & jalon module 2015-11-08 04:22:49 +01:00
Marcos García de La Fuente
4a52d3c1b1 Removed unwanted change 2015-11-07 15:35:00 +01:00
Marcos García de La Fuente
84a152dc2e FIX #3836 Unable to upload a document to an invoice under some circunstances 2015-11-07 15:33:48 +01:00
Marcos García de La Fuente
01854b3259 FIX #3679 Error when deleting a Localtax2 special payment 2015-11-07 13:51:09 +01:00
Marcos García de La Fuente
3bbedf1795 FIX #3707 Thirdparty bank account page table has a glitch 2015-11-07 13:39:34 +01:00
Juanjo Menent
87a102f5c8 Merge pull request #3910 from FHenry/3.7
FIX : only active customer should be available into select list thirdparty on invoice creation
2015-11-06 10:14:44 +01:00
Florian HENRY
600dbced7e Merge branch '3.7' of git@github.com:Dolibarr/dolibarr.git into 3.7 2015-11-06 09:49:48 +01:00
Florian HENRY
8d829dca32 FIX : only active customer should be return into new invoice creation
select list
2015-11-06 09:49:02 +01:00
Laurent Destailleur
fe78996026 Merge remote-tracking branch 'origin/3.6' into 3.7
Conflicts:
	htdocs/commande/class/commande.class.php
	htdocs/product/stock/fiche.php
	htdocs/product/stock/valo.php
2015-11-05 22:04:18 +01:00
Laurent Destailleur
375e61de2e Merge 3.5 2015-11-05 22:01:05 +01:00
Laurent Destailleur
5777c16b72 Merge pull request #3902 from altatof/clonedorderdate
FIX: change order date on clone (as everywhere else)
2015-11-05 21:49:50 +01:00
Laurent Destailleur
fdf9617e42 Merge pull request #3900 from GPCsolutions/dolibarr-3864
Fix #3864 Really fixed invalid jQuery code
2015-11-05 21:47:40 +01:00
Laurent Destailleur
d499fafdb9 Merge pull request #3901 from altatof/3.6
FIX bad calculation for stock value
2015-11-05 21:44:21 +01:00
Laurent Destailleur
60debe31c4 Merge pull request #3894 from altatof/stockvalue
FIX bad calculation for stock value
2015-11-05 21:44:15 +01:00
Laurent Destailleur
cbff03ca08 Merge pull request #3892 from atm-alexis/3.7_FIX_data_lose_event_userassigned
FIX event's data lost on user assign update
2015-11-05 21:36:34 +01:00
Christophe Battarel
316b7453e4 FIX bad stock valo 2015-11-05 17:04:08 +01:00
Christophe Battarel
80d2445540 FIX: bad stock valorisation 2015-11-05 17:00:22 +01:00
Christophe Battarel
ad82135879 FIX: change order date on clone (as everywhere else) 2015-11-05 15:36:13 +01:00
Christophe Battarel
75bcb7e53f fix pmp 2015-11-05 15:32:56 +01:00
Christophe Battarel
f566b38296 FIX pmp 2015-11-05 15:29:51 +01:00
Christophe Battarel
fa088eb6cc FIX bad calculation for stock value 2015-11-05 14:57:58 +01:00
Raphaël Doursenaud
b0cf9bd0be Fix #3864 Really fixed invalid jQuery code 2015-11-05 14:38:11 +01:00
Christophe Battarel
9b797c1831 FIX bad calculation for stock value 2015-11-05 12:49:43 +01:00
Alexis Algoud
e1ea2215a3 FIX loss data also if update was cancel by error of ended state with no end date, try a generic patch 2015-11-05 11:25:04 +01:00
Alexis Algoud
0543a31920 FIX event's data lost on user assign update 2015-11-05 11:11:03 +01:00
Laurent Destailleur
fb34f25701 Merge pull request #3887 from GPCsolutions/dolibarr-3864
Fix #3864 Fixed invalid jQuery code
2015-11-05 02:34:24 +01:00
Raphaël Doursenaud
69ac75bef8 Fix #3864 Fixed invalid jQuery code 2015-11-04 22:55:14 +01:00
Laurent Destailleur
384c89dcef Merge pull request #3701 from altatof/fix_orderdateonclone
FIX: change order date on clone (as everywhere else)
2015-10-09 20:44:03 +02:00
Laurent Destailleur
e886c89e06 Merge pull request #3668 from altatof/fix_stock_entity
fix entities warehouse share
2015-10-09 20:16:32 +02:00
Christophe Battarel
00f0aff6f0 FIX: change order date on clone (as everywhere else) 2015-10-08 15:58:19 +02:00
Christophe Battarel
f3ef9b868f fix entities warehouse share 2015-10-05 16:19:54 +02:00
17 changed files with 87 additions and 29 deletions

View File

@@ -8,6 +8,7 @@ You may also experience troubles with Mysql 5.5.41 with error "Lost connection"
Upgrading to any other version or database system is abolutely required BEFORE trying to
make a Dolibarr upgrade.
***** ChangeLog for 3.7.2 compared to 3.7.1 *****
FIX [ bug #2855 ] Wrong translation key in localtax report page
FIX [ bug #1852 ] JS error when editing a customer order line

View File

@@ -1,7 +1,7 @@
<?PHP
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
* Copyright (C) 2013-2015 Alexandre Spangaro <alexandre.spangaro@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
@@ -19,7 +19,7 @@
/**
* \file htdocs/accountancy/customer/card.php
* \ingroup Accounting Expert
* \ingroup Accountancy
* \brief Card customer ventilation
*/
@@ -84,7 +84,11 @@ if (! empty($id)) {
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accountingaccount as aa ON l.fk_code_ventilation = aa.rowid";
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = l.fk_facture";
$sql .= " WHERE f.fk_statut > 0 AND l.rowid = " . $id;
$sql .= " WHERE f.fk_statut > 0";
$sql .= " AND l.rowid = " . $id;
if (! empty($conf->multicompany->enabled)) {
$sql .= " AND f.entity = '" . $conf->entity . "'";
}
if (! empty($conf->multicompany->enabled)) {
$sql .= " AND f.entity = '" . $conf->entity . "'";

View File

@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
* Copyright (C) 2013-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
* Copyright (C) 2014 Ari Elbaz (elarifr) <github@accedinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
@@ -21,7 +21,7 @@
/**
* \file htdocs/accountancy/customer/list.php
* \ingroup Accounting Expert
* \ingroup Accountancy
* \brief Ventilation page from customers invoices
*/
@@ -121,7 +121,7 @@ if (! empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)) {
$offset = $limit * $page;
$sql = "SELECT f.facnumber, f.rowid as facid, l.fk_product, l.description, l.total_ht, l.rowid, l.fk_code_ventilation,";
$sql = "SELECT f.facnumber, f.rowid as facid, l.fk_product, l.description, l.total_ht, l.rowid, l.fk_code_ventilation, l.product_type,";
$sql .= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_sell as code_sell";
$sql .= " , aa.rowid as aarowid";
$sql .= " FROM " . MAIN_DB_PREFIX . "facture as f";
@@ -129,7 +129,9 @@ $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facturedet as l ON f.rowid = l.fk_fac
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accountingaccount as aa ON p.accountancy_code_sell = aa.account_number";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_system as accsys ON accsys.pcg_version = aa.fk_pcg_version";
$sql .= " WHERE f.fk_statut > 0 AND fk_code_ventilation <= 0";
$sql .= " WHERE f.fk_statut > 0";
$sql. = " AND fk_code_ventilation <= 0";
$sql. = " AND product_type <= 2";
$sql .= " AND (accsys.rowid='" . $conf->global->CHARTOFACCOUNTS . "' OR p.accountancy_code_sell IS NULL OR p.accountancy_code_sell ='')";
if (! empty($conf->multicompany->enabled)) {
$sql .= " AND f.entity = '" . $conf->entity . "'";

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
* Copyright (C) 2013-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
@@ -22,7 +22,7 @@
*/
/**
* \file htdocs/accountancy/supplier/card.php
* \ingroup Accounting Expert
* \ingroup Accountancy
* \brief Card supplier ventilation
*/
@@ -85,7 +85,8 @@ if ($_GET["id"]) {
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accountingaccount as aa ON l.fk_code_ventilation = aa.rowid";
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facture_fourn as f ON f.rowid = l.fk_facture_fourn ";
$sql .= " WHERE f.fk_statut > 0 AND l.rowid = " . $id;
$sql .= " WHERE f.fk_statut > 0";
$sql .= " AND l.rowid = " . $id;
if (! empty($conf->multicompany->enabled)) {
$sql .= " AND f.entity = '" . $conf->entity . "'";
}

View File

@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
* Copyright (C) 2013-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
* Copyright (C) 2014 Ari Elbaz (elarifr) <github@accedinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>s
@@ -21,7 +21,7 @@
/**
* \file htdocs/accountancy/supplier/list.php
* \ingroup Accounting Expert
* \ingroup Accountancy
* \brief Ventilation page from suppliers invoices
*/
@@ -124,16 +124,17 @@ if (! empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)) {
$offset = $limit * $page;
$sql = "SELECT f.ref, f.rowid as facid, f.ref_supplier, l.fk_product, l.description, l.total_ht as price, l.rowid, l.fk_code_ventilation, ";
$sql = "SELECT f.ref, f.rowid as facid, f.ref_supplier, l.fk_product, l.description, l.total_ht as price, l.rowid, l.fk_code_ventilation, l.product_type,";
$sql .= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_buy as code_buy";
$sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn as f";
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facture_fourn_det as l ON f.rowid = l.fk_facture_fourn";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accountingaccount as aa ON p.accountancy_code_buy = aa.account_number";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_system as accsys ON accsys.pcg_version = aa.fk_pcg_version";
$sql .= " WHERE f.fk_statut > 0 AND fk_code_ventilation <= 0";
$sql .= " WHERE f.fk_statut > 0";
$sql .= " AND fk_code_ventilation <= 0";
$sql. = " AND product_type <= 2";
$sql .= " AND (accsys.rowid='".$conf->global->CHARTOFACCOUNTS."' OR p.accountancy_code_sell IS NULL OR p.accountancy_code_buy ='')";
if (! empty($conf->multicompany->enabled)) {
$sql .= " AND f.entity = '" . $conf->entity . "'";
}

View File

@@ -88,7 +88,7 @@ $hookmanager->initHooks(array('actioncard','globalcard'));
/*
* Actions
*/
$listUserAssignedUpdated = false;
// Remove user to assigned list
if (GETPOST('removedassigned') || GETPOST('removedassigned') == '0')
{
@@ -106,6 +106,8 @@ if (GETPOST('removedassigned') || GETPOST('removedassigned') == '0')
$donotclearsession=1;
if ($action == 'add') $action = 'create';
if ($action == 'update') $action = 'edit';
$listUserAssignedUpdated = true;
}
// Add user to assigned list
@@ -125,6 +127,8 @@ if (GETPOST('addassignedtouser') || GETPOST('updateassignedtouser'))
$donotclearsession=1;
if ($action == 'add') $action = 'create';
if ($action == 'update') $action = 'edit';
$listUserAssignedUpdated = true;
}
// Add event
@@ -803,6 +807,28 @@ if ($id > 0)
$result4=$object->fetch_userassigned();
$result5=$object->fetch_optionals($id,$extralabels);
if($listUserAssignedUpdated || $donotclearsession) {
$datep=dol_mktime($fulldayevent?'00':$aphour, $fulldayevent?'00':$apmin, 0, $_POST["apmonth"], $_POST["apday"], $_POST["apyear"]);
$datef=dol_mktime($fulldayevent?'23':$p2hour, $fulldayevent?'59':$p2min, $fulldayevent?'59':'0', $_POST["p2month"], $_POST["p2day"], $_POST["p2year"]);
$object->fk_action = dol_getIdFromCode($db, GETPOST("actioncode"), 'c_actioncomm');
$object->label = GETPOST("label");
$object->datep = $datep;
$object->datef = $datef;
$object->percentage = $percentage;
$object->priority = GETPOST("priority");
$object->fulldayevent= GETPOST("fullday")?1:0;
$object->location = GETPOST('location');
$object->socid = GETPOST("socid");
$object->contactid = GETPOST("contactid",'int');
//$object->societe->id = $_POST["socid"]; // deprecated
//$object->contact->id = $_POST["contactid"]; // deprecated
$object->fk_project = GETPOST("projectid",'int');
$object->note = GETPOST("note");
}
if ($result1 < 0 || $result2 < 0 || $result3 < 0 || $result4 < 0 || $result5 < 0)
{
dol_print_error($db,$object->error);

View File

@@ -393,7 +393,7 @@ class Commande extends CommonOrder
{
$mouvP = new MouvementStock($this->db);
// We increment stock of product (and sub-products)
$result=$mouvP->reception($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, $this->lines[$i]->subprice, $langs->trans("OrderBackToDraftInDolibarr",$this->ref));
$result=$mouvP->reception($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, 0, $langs->trans("OrderBackToDraftInDolibarr",$this->ref));
if ($result < 0) { $error++; }
}
}
@@ -576,7 +576,7 @@ class Commande extends CommonOrder
{
$mouvP = new MouvementStock($this->db);
// We increment stock of product (and sub-products)
$result=$mouvP->reception($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, $this->lines[$i]->subprice, $langs->trans("OrderCanceledInDolibarr",$this->ref));
$result=$mouvP->reception($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, 0, $langs->trans("OrderCanceledInDolibarr",$this->ref)); // price is 0, we don't want WAP to be changed
if ($result < 0)
{
$error++;
@@ -920,6 +920,7 @@ class Commande extends CommonOrder
// Clear fields
$this->user_author_id = $user->id;
$this->user_valid = '';
$this->date = dol_now();
$this->date_creation = '';
$this->date_validation = '';
$this->ref_client = '';
@@ -1042,7 +1043,7 @@ class Commande extends CommonOrder
$this->ref_client = $object->ref_client;
$this->note_private = $object->note_private;
$this->note_public = $object->note_public;
$this->origin = $object->element;
$this->origin_id = $object->id;
@@ -1132,7 +1133,7 @@ class Commande extends CommonOrder
{
global $mysoc, $conf, $langs;
dol_syslog(get_class($this)."::addline commandeid=$this->id, desc=$desc, pu_ht=$pu_ht, qty=$qty, txtva=$txtva, fk_product=$fk_product, remise_percent=$remise_percent, info_bits=$info_bits, fk_remise_except=$fk_remise_except, price_base_type=$price_base_type, pu_ttc=$pu_ttc, date_start=$date_start, date_end=$date_end, type=$type", LOG_DEBUG);
dol_syslog(get_class($this)."::addline commandeid=$this->id, desc=$desc, pu_ht=$pu_ht, qty=$qty, txtva=$txtva, fk_product=$fk_product, remise_percent=$remise_percent, info_bits=$info_bits, fk_remise_except=$fk_remise_except, price_base_type=$price_base_type, pu_ttc=$pu_ttc, date_start=$date_start, date_end=$date_end, type=$type special_code=$special_code", LOG_DEBUG);
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';

View File

@@ -1855,7 +1855,7 @@ if ($action == 'create')
else
{
print '<td colspan="2">';
print $form->select_company('', 'socid', 's.client = 1 OR s.client = 3', 1);
print $form->select_company('', 'socid', '(s.client = 1 OR s.client = 3) AND status=1', 1);
print '</td>';
}
print '</tr>' . "\n";

View File

@@ -1761,7 +1761,7 @@ class Facture extends CommonInvoice
$mouvP = new MouvementStock($this->db);
$mouvP->origin = &$this;
// We decrease stock for product
if ($this->type == self::TYPE_CREDIT_NOTE) $result=$mouvP->reception($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, $this->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarr",$num));
if ($this->type == self::TYPE_CREDIT_NOTE) $result=$mouvP->reception($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, 0, $langs->trans("InvoiceValidatedInDolibarr",$num));
else $result=$mouvP->livraison($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, $this->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarr",$num));
if ($result < 0) {
$error++;

View File

@@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2011-2014 Juanjo Menent <jmenent@2byte.es>
* 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
@@ -104,7 +105,7 @@ if ($_GET["action"] == 'delete')
if ($result > 0)
{
$db->commit();
header("Location: ".DOL_URL_ROOT.'/compta/localtax/reglement.php');
header("Location: ".DOL_URL_ROOT.'/compta/localtax/reglement.php?localTaxType='.$localtax->ltt);
exit;
}
else

View File

@@ -2,6 +2,7 @@
/* Copyright (C) 2008-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012-2013 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
* 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
@@ -1041,6 +1042,9 @@ function dol_add_file_process($upload_dir, $allowoverwrite=0, $donotupdatesessio
// Define $destpath (path to file including filename) and $destfile (only filename)
$destpath=$upload_dir . "/" . $_FILES[$varfiles]['name'];
$destfile=$_FILES[$varfiles]['name'];
$savingdocmask = dol_sanitizeFileName($savingdocmask);
if ($savingdocmask)
{
$destpath=$upload_dir . "/" . preg_replace('/__file__/',$_FILES[$varfiles]['name'],$savingdocmask);

View File

@@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2013-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* 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
@@ -48,7 +49,7 @@ if (empty($conf->global->MAIN_DISABLE_SUGGEST_REF_AS_PREFIX))
//var_dump($modulepart);
if (in_array($modulepart,array('facture_fournisseur','commande_fournisseur','facture','commande','propal','ficheinter','contract','project','project_task')))
{
$savingdocmask=$object->ref.'-__file__';
$savingdocmask=dol_sanitizeFileName($object->ref).'-__file__';
}
/*if (in_array($modulepart,array('member')))
{

View File

@@ -451,7 +451,7 @@ jQuery(document).ready(function() {
<?php if (! empty($usemargins) && $user->rights->margins->creer) { ?>
/* Code for margin */
$("#fournprice_predef options").remove();
$("#fournprice_predef").find("option").remove();
$("#fournprice_predef").hide();
$("#buying_price").val("").show();
$.post('<?php echo DOL_URL_ROOT; ?>/fourn/ajax/getSupplierPrices.php', { 'idprod': $(this).val() }, function(data) {

View File

@@ -61,6 +61,10 @@ class InterfaceWorkflowManager extends DolibarrTriggers
include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
$newobject = new Commande($this->db);
$newobject->context['createfrompropal'] = 'createfrompropal';
$newobject->context['origin'] = $object->element;
$newobject->context['origin_id'] = $object->id;
$ret=$newobject->createFromProposal($object);
if ($ret < 0) { $this->error=$newobject->error; $this->errors[]=$newobject->error; }
return $ret;
@@ -76,6 +80,10 @@ class InterfaceWorkflowManager extends DolibarrTriggers
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
$newobject = new Facture($this->db);
$newobject->context['createfromorder'] = 'createfromorder';
$newobject->context['origin'] = $object->element;
$newobject->context['origin_id'] = $object->id;
$ret=$newobject->createFromOrder($object);
if ($ret < 0) { $this->error=$newobject->error; $this->errors[]=$newobject->error; }
return $ret;

View File

@@ -980,7 +980,7 @@ class Expedition extends CommonObject
$mouvS->origin = &$this;
// We decrement stock of product (and sub-products)
// We use warehouse selected for each line
$result=$mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $obj->qty, $obj->subprice, $langs->trans("ShipmentDeletedInDolibarr",$this->ref));
$result=$mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $obj->qty, 0, $langs->trans("ShipmentDeletedInDolibarr",$this->ref));
if ($result < 0)
{
$error++;

View File

@@ -682,9 +682,10 @@ if ( (! empty($conf->productbatch->enabled)) && $product->hasbatch()) {
print '</tr>';
}
$sql = "SELECT e.rowid, e.label, ps.reel, ps.pmp, ps.rowid as product_stock_id";
$sql = "SELECT e.rowid, e.label, ps.reel, p.pmp, ps.rowid as product_stock_id";
$sql.= " FROM ".MAIN_DB_PREFIX."entrepot as e,";
$sql.= " ".MAIN_DB_PREFIX."product_stock as ps";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = ps.fk_product";
$sql.= " WHERE ps.reel != 0";
$sql.= " AND ps.fk_entrepot = e.rowid";
$sql.= " AND e.entity IN (".getEntity('stock',1).')';

View File

@@ -401,7 +401,14 @@ if ($socid && $action != 'edit' && $action != "create")
}
if (count($rib_list) == 0) {
print '<tr '.$bc[0].'><td colspan="7" align="center">'.$langs->trans("NoBANRecord").'</td></tr>';
if (! empty($conf->prelevement->enabled)) {
$colspan = 8;
} else {
$colspan = 7;
}
print '<tr '.$bc[0].'><td colspan="'.$colspan.'" align="center">'.$langs->trans("NoBANRecord").'</td></tr>';
}
print '</table>';