Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
80b26d63
Commit
80b26d63
authored
19 years ago
by
Rodolphe Quiedeville
Browse files
Options
Downloads
Patches
Plain Diff
Ajout envoi des détails
parent
f50f4ee1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/telephonie/client/facture.php
+26
-38
26 additions, 38 deletions
htdocs/telephonie/client/facture.php
with
26 additions
and
38 deletions
htdocs/telephonie/client/facture.php
+
26
−
38
View file @
80b26d63
<?php
/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 ric Seigne <eric.seigne@ryxeo.com>
/* Copyright (C) 2002-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 ric Seigne <eric.seigne@ryxeo.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
...
...
@@ -22,12 +22,11 @@
*/
/**
\file htdocs/
compta
/facture.php
\ingroup facture
\brief Page de
cr
ation d'une facture
\version $Revision$
\file htdocs/
telephonie/client
/facture.php
\ingroup
telephonie/
facture
\brief Page de
visualis
ation d'une facture
\version $Revision$
*/
require
(
"./pre.inc.php"
);
$user
->
getrights
(
'facture'
);
...
...
@@ -40,7 +39,8 @@ $warning_delay=31*24*60*60; // Delai affichage warning retard (si retard paiemen
require_once
DOL_DOCUMENT_ROOT
.
"/facture.class.php"
;
require_once
DOL_DOCUMENT_ROOT
.
"/paiement.class.php"
;
require_once
DOL_DOCUMENT_ROOT
.
"/lib/CMailFile.class.php"
;
include_once
DOL_DOCUMENT_ROOT
.
"/contact.class.php"
;
include_once
DOL_DOCUMENT_ROOT
.
"/actioncomm.class.php"
;
if
(
$_GET
[
"socidp"
])
{
$socidp
=
$_GET
[
"socidp"
];
}
if
(
isset
(
$_GET
[
"msg"
]))
{
$msg
=
urldecode
(
$_GET
[
"msg"
]);
}
...
...
@@ -52,10 +52,6 @@ if ($user->societe_id > 0)
$socidp
=
$user
->
societe_id
;
}
// Nombre de ligne pour choix de produit/service prdfinis
$NBLINES
=
4
;
/*
* Action envoi de mail
*/
...
...
@@ -117,6 +113,21 @@ if ($_POST["action"] == 'send' || $_POST["action"] == 'relance')
$filename
[
1
]
=
$_FILES
[
'addedfile'
][
'name'
];
$mimetype
[
1
]
=
$_FILES
[
'addedfile'
][
'type'
];
$dir
=
$conf
->
facture
->
dir_output
.
"/"
.
$fac
->
ref
.
"/"
;
$handle
=
opendir
(
$dir
);
$ifi
=
2
;
while
((
$dfile
=
readdir
(
$handle
))
!==
false
)
{
if
(
is_readable
(
$dir
.
$dfile
)
&&
substr
(
$dfile
,
-
10
)
==
'detail.pdf'
)
{
$filepath
[
$ifi
]
=
$conf
->
facture
->
dir_output
.
"/"
.
$fac
->
ref
.
"/"
.
$dfile
;
$filename
[
$ifi
]
=
$dfile
;
$mimetype
[
$ifi
]
=
"application/pdf"
;
$ifi
++
;
}
}
// Envoi de la facture
$mailfile
=
new
CMailFile
(
$subject
,
$sendto
,
$from
,
$message
,
$filepath
,
$mimetype
,
$filename
,
$sendtocc
);
...
...
@@ -125,8 +136,7 @@ if ($_POST["action"] == 'send' || $_POST["action"] == 'relance')
$msg
=
'<div class="ok">'
.
$langs
->
trans
(
"MailSuccessfulySent"
,
$from
,
$sendto
)
.
'.</div>'
;
// Insertion action
include_once
(
"../contact.class.php"
);
include_once
(
"../actioncomm.class.php"
);
$actioncomm
=
new
ActionComm
(
$db
);
$actioncomm
->
type_id
=
$actiontypeid
;
$actioncomm
->
label
=
$actionmsg2
;
...
...
@@ -174,16 +184,10 @@ if ($_POST["action"] == 'send' || $_POST["action"] == 'relance')
}
}
llxHeader
(
''
,
$langs
->
trans
(
"Bill"
),
'Facture'
);
$html
=
new
Form
(
$db
);
if
(
$_GET
[
"facid"
]
>
0
)
{
if
(
$msg
)
print
"
$msg
<br>"
;
...
...
@@ -464,8 +468,6 @@ if ($_GET["facid"] > 0)
}
$total
=
$total
+
(
$objp
->
qty
*
$objp
->
price
);
$i
++
;
}
...
...
@@ -476,17 +478,13 @@ if ($_GET["facid"] > 0)
{
dolibarr_print_error
(
$db
);
}
/*
* Ajouter une ligne
*/
print
"</table>
\n
"
;
print
"</div>
\n
"
;
/*
* Boutons actions
*/
...
...
@@ -495,10 +493,6 @@ if ($_GET["facid"] > 0)
{
print
"<div class=
\"
tabsAction
\"
>
\n
"
;
// Envoyer
if
(
$fac
->
statut
==
1
&&
$user
->
rights
->
facture
->
envoyer
)
{
...
...
@@ -506,14 +500,12 @@ if ($_GET["facid"] > 0)
}
// Envoyer une relance
/*
if ($fac->statut == 1 && price($resteapayer) > 0 && $user->rights->facture->envoyer)
{
print " <a class=\"tabAction\" href=\"".$_SERVER["PHP_SELF"]."?facid=$fac->id&action=prerelance\">".$langs->trans("SendRemind")."</a>\n";
}
*/
print
"</div>
\n
"
;
...
...
@@ -546,7 +538,6 @@ if ($_GET["facid"] > 0)
print
'<td align="right">'
.
strftime
(
"%d %b %Y %H:%M:%S"
,
filemtime
(
$file
))
.
'</td>'
;
print
'</tr>'
;
$dir
=
$conf
->
facture
->
dir_output
.
"/"
.
$facref
.
"/"
;
$handle
=
opendir
(
$dir
);
...
...
@@ -736,15 +727,12 @@ if ($_GET["facid"] > 0)
}
}
}
else
{
/* Facture non trouve */
print
$langs
->
trans
(
"ErrorBillNotFound"
,
$_GET
[
"facid"
]);
}
}
$db
->
close
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment