Can create invoice from an intervention
This commit is contained in:
parent
d4f3e5a0df
commit
3c6cf4dd0a
@ -26,7 +26,7 @@
|
||||
* \file htdocs/compta/facture.php
|
||||
* \ingroup facture
|
||||
* \brief Page to create/see an invoice
|
||||
* \version $Id: facture.php,v 1.844 2011/07/02 16:48:32 eldy Exp $
|
||||
* \version $Id: facture.php,v 1.845 2011/07/02 17:02:00 eldy Exp $
|
||||
*/
|
||||
|
||||
require('../main.inc.php');
|
||||
@ -713,6 +713,7 @@ if ($action == 'add' && $user->rights->facture->creer)
|
||||
if ($element == 'order') { $element = $subelement = 'commande'; }
|
||||
if ($element == 'propal') { $element = 'comm/propal'; $subelement = 'propal'; }
|
||||
if ($element == 'contract') { $element = $subelement = 'contrat'; }
|
||||
if ($element == 'inter') { $element = $subelement = 'ficheinter'; }
|
||||
|
||||
$object->origin = $_POST['origin'];
|
||||
$object->origin_id = $_POST['originid'];
|
||||
@ -1441,7 +1442,7 @@ if ($action == 'create')
|
||||
|
||||
print_fiche_titre($langs->trans('NewBill'));
|
||||
|
||||
if ($mesg) print $mesg;
|
||||
dol_htmloutput_mesg($mesg);
|
||||
|
||||
$soc = new Societe($db);
|
||||
if ($socid) $res=$soc->fetch($socid);
|
||||
@ -3235,5 +3236,5 @@ else
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/07/02 16:48:32 $ - $Revision: 1.844 $');
|
||||
llxFooter('$Date: 2011/07/02 17:02:00 $ - $Revision: 1.845 $');
|
||||
?>
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
/** \file htdocs/fichinter/class/fichinter.class.php
|
||||
* \ingroup ficheinter
|
||||
* \brief Fichier de la classe des gestion des fiches interventions
|
||||
* \version $Id: fichinter.class.php,v 1.18 2011/07/02 16:48:32 eldy Exp $
|
||||
* \version $Id: fichinter.class.php,v 1.19 2011/07/02 17:02:00 eldy Exp $
|
||||
*/
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT ."/core/class/commonobject.class.php");
|
||||
@ -813,9 +813,9 @@ class Fichinter extends CommonObject
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Initialise la fiche intervention avec valeurs fictives aleatoire
|
||||
* Sert a generer une fiche intervention pour l'aperu des modeles ou demo
|
||||
* \return int <0 OK, >0 KO
|
||||
* Initialise la fiche intervention avec valeurs fictives aleatoire
|
||||
* Sert a generer une fiche intervention pour l'aperu des modeles ou demo
|
||||
* @return int <0 OK, >0 KO
|
||||
*/
|
||||
function fetch_lines()
|
||||
{
|
||||
@ -840,6 +840,7 @@ class Fichinter extends CommonObject
|
||||
$line->qty = round($objp->duree/3600,2);
|
||||
$line->date = $this->db->jdate($objp->date);
|
||||
$line->rang = $objp->rang;
|
||||
$line->product_type = 1;
|
||||
|
||||
$this->lines[$i] = $line;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user