New: Le lien entre le contrat et la ligne de facture qui l'a généré est fait.

New: Lors de la mise en service, les date de début et fin proposée sont mises par défaut aux valeurs saisies dans la ligne de facture.
Si pas de date ont été saisies, les valeurs par défaut sont positionnées à la date courante pour le début et la date de fin=date courante+durée du service.
This commit is contained in:
Laurent Destailleur 2004-05-17 19:59:22 +00:00
parent b3c3e451d0
commit 4a7d66527a
2 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,6 @@
<?PHP <?PHP
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -189,7 +190,7 @@ class FactureRec
while ($i < $num) while ($i < $num)
{ {
$objp = $this->db->fetch_object($i); $objp = $this->db->fetch_object($i);
$faclig = new FactureLigne(); $faclig = new FactureLigne($this->db);
$faclig->produit_id = $objp->fk_product; $faclig->produit_id = $objp->fk_product;
$faclig->desc = stripslashes($objp->description); $faclig->desc = stripslashes($objp->description);
$faclig->qty = $objp->qty; $faclig->qty = $objp->qty;

View File

@ -317,7 +317,7 @@ class Facture
while ($i < $num) while ($i < $num)
{ {
$objp = $this->db->fetch_object($i); $objp = $this->db->fetch_object($i);
$faclig = new FactureLigne(); $faclig = new FactureLigne($this->db);
$faclig->desc = stripslashes($objp->description); $faclig->desc = stripslashes($objp->description);
$faclig->qty = $objp->qty; $faclig->qty = $objp->qty;
$faclig->price = $objp->price; $faclig->price = $objp->price;