Skip to content
Snippets Groups Projects
Commit e934614f authored by Juanjo Menent's avatar Juanjo Menent
Browse files

Merge pull request #830 from marcosgdf/bug-807

Fixed bug #807: Margins modules with orders2invoice does not respect cost price
parents cb8cbecb 0e34df43
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,7 @@ English Dolibarr ChangeLog
- Fix: [ bug #774 ] Bug on creating event with box "all day" crossed
- Fix: [ bug #817 ] Purchases journal does not reflect localtaxes
- Fix: [ bug #816 ] Sales journal does not reflect localtaxes
- Fix: [ bug #806 ] Margins module with orders2invoice does not respect cost price
- Fix: Orderstoinvoice didn't act as expected when no order was checked
......
......@@ -28,9 +28,9 @@
*/
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php';
......@@ -84,17 +84,12 @@ if ($action == 'create')
if (($action == 'create' || $action == 'add') && empty($mesgs))
{
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/modules/facture/modules_facture.php';
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
if (! empty($conf->projet->enabled)) {
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
}
$langs->load('bills');
$langs->load('products');
......@@ -287,7 +282,9 @@ if (($action == 'create' || $action == 'add') && empty($mesgs))
$lines[$i]->special_code,
$object->origin,
$lines[$i]->rowid,
$fk_parent_line
$fk_parent_line,
$lines[$i]->fk_fournprice,
$lines[$i]->pa_ht
);
if ($result > 0)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment