Fix: initAsSpecimen

This commit is contained in:
Laurent Destailleur 2010-04-26 23:01:57 +00:00
parent 9cfb011286
commit 193a51f70a
2 changed files with 5 additions and 2 deletions

View File

@ -1952,7 +1952,9 @@ class Propal extends CommonObject
$this->socid = $socids[$socid]; $this->socid = $socids[$socid];
$this->date = time(); $this->date = time();
$this->fin_validite = $this->date+3600*24*30; $this->fin_validite = $this->date+3600*24*30;
$this->cond_reglement_id = 1;
$this->cond_reglement_code = 'RECEP'; $this->cond_reglement_code = 'RECEP';
$this->mode_reglement_id = 7;
$this->mode_reglement_code = 'CHQ'; $this->mode_reglement_code = 'CHQ';
$this->note_public='SPECIMEN'; $this->note_public='SPECIMEN';
$nbp = rand(1, 9); $nbp = rand(1, 9);

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr> * Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
@ -33,7 +33,7 @@ require_once(DOL_DOCUMENT_ROOT."/product/product.class.php");
/** /**
* \class Commande * \class Commande
* \brief Class to manage orders * \brief Class to manage customers orders
*/ */
class Commande extends CommonObject class Commande extends CommonObject
{ {
@ -2305,6 +2305,7 @@ class Commande extends CommonObject
$line->total_ht=100; $line->total_ht=100;
$line->total_ttc=119.6; $line->total_ttc=119.6;
$line->total_tva=19.6; $line->total_tva=19.6;
$line->remise_percent=0;
$line->fk_product=$prodids[$prodid]; $line->fk_product=$prodids[$prodid];
$this->lignes[$xnbp]=$line; // TODO: deprecated $this->lignes[$xnbp]=$line; // TODO: deprecated