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
GitLab 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
No related tags found
No related merge requests found
Changes
1
Show 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
<?php
/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
/* Copyright (C) 2002-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 ric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
* 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
* 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
...
@@ -22,12 +22,11 @@
...
@@ -22,12 +22,11 @@
*/
*/
/**
/**
\file htdocs/
compta
/facture.php
\file htdocs/
telephonie/client
/facture.php
\ingroup facture
\ingroup
telephonie/
facture
\brief Page de
cr
ation d'une facture
\brief Page de
visualis
ation d'une facture
\version $Revision$
\version $Revision$
*/
*/
require
(
"./pre.inc.php"
);
require
(
"./pre.inc.php"
);
$user
->
getrights
(
'facture'
);
$user
->
getrights
(
'facture'
);
...
@@ -40,7 +39,8 @@ $warning_delay=31*24*60*60; // Delai affichage warning retard (si retard paiemen
...
@@ -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
.
"/facture.class.php"
;
require_once
DOL_DOCUMENT_ROOT
.
"/paiement.class.php"
;
require_once
DOL_DOCUMENT_ROOT
.
"/paiement.class.php"
;
require_once
DOL_DOCUMENT_ROOT
.
"/lib/CMailFile.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
(
$_GET
[
"socidp"
])
{
$socidp
=
$_GET
[
"socidp"
];
}
if
(
isset
(
$_GET
[
"msg"
]))
{
$msg
=
urldecode
(
$_GET
[
"msg"
]);
}
if
(
isset
(
$_GET
[
"msg"
]))
{
$msg
=
urldecode
(
$_GET
[
"msg"
]);
}
...
@@ -52,10 +52,6 @@ if ($user->societe_id > 0)
...
@@ -52,10 +52,6 @@ if ($user->societe_id > 0)
$socidp
=
$user
->
societe_id
;
$socidp
=
$user
->
societe_id
;
}
}
// Nombre de ligne pour choix de produit/service prdfinis
$NBLINES
=
4
;
/*
/*
* Action envoi de mail
* Action envoi de mail
*/
*/
...
@@ -117,6 +113,21 @@ if ($_POST["action"] == 'send' || $_POST["action"] == 'relance')
...
@@ -117,6 +113,21 @@ if ($_POST["action"] == 'send' || $_POST["action"] == 'relance')
$filename
[
1
]
=
$_FILES
[
'addedfile'
][
'name'
];
$filename
[
1
]
=
$_FILES
[
'addedfile'
][
'name'
];
$mimetype
[
1
]
=
$_FILES
[
'addedfile'
][
'type'
];
$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
// Envoi de la facture
$mailfile
=
new
CMailFile
(
$subject
,
$sendto
,
$from
,
$message
,
$filepath
,
$mimetype
,
$filename
,
$sendtocc
);
$mailfile
=
new
CMailFile
(
$subject
,
$sendto
,
$from
,
$message
,
$filepath
,
$mimetype
,
$filename
,
$sendtocc
);
...
@@ -125,8 +136,7 @@ if ($_POST["action"] == 'send' || $_POST["action"] == 'relance')
...
@@ -125,8 +136,7 @@ if ($_POST["action"] == 'send' || $_POST["action"] == 'relance')
$msg
=
'<div class="ok">'
.
$langs
->
trans
(
"MailSuccessfulySent"
,
$from
,
$sendto
)
.
'.</div>'
;
$msg
=
'<div class="ok">'
.
$langs
->
trans
(
"MailSuccessfulySent"
,
$from
,
$sendto
)
.
'.</div>'
;
// Insertion action
// Insertion action
include_once
(
"../contact.class.php"
);
include_once
(
"../actioncomm.class.php"
);
$actioncomm
=
new
ActionComm
(
$db
);
$actioncomm
=
new
ActionComm
(
$db
);
$actioncomm
->
type_id
=
$actiontypeid
;
$actioncomm
->
type_id
=
$actiontypeid
;
$actioncomm
->
label
=
$actionmsg2
;
$actioncomm
->
label
=
$actionmsg2
;
...
@@ -174,16 +184,10 @@ if ($_POST["action"] == 'send' || $_POST["action"] == 'relance')
...
@@ -174,16 +184,10 @@ if ($_POST["action"] == 'send' || $_POST["action"] == 'relance')
}
}
}
}
llxHeader
(
''
,
$langs
->
trans
(
"Bill"
),
'Facture'
);
llxHeader
(
''
,
$langs
->
trans
(
"Bill"
),
'Facture'
);
$html
=
new
Form
(
$db
);
$html
=
new
Form
(
$db
);
if
(
$_GET
[
"facid"
]
>
0
)
if
(
$_GET
[
"facid"
]
>
0
)
{
{
if
(
$msg
)
print
"
$msg
<br>"
;
if
(
$msg
)
print
"
$msg
<br>"
;
...
@@ -464,8 +468,6 @@ if ($_GET["facid"] > 0)
...
@@ -464,8 +468,6 @@ if ($_GET["facid"] > 0)
}
}
$total
=
$total
+
(
$objp
->
qty
*
$objp
->
price
);
$total
=
$total
+
(
$objp
->
qty
*
$objp
->
price
);
$i
++
;
$i
++
;
}
}
...
@@ -476,17 +478,13 @@ if ($_GET["facid"] > 0)
...
@@ -476,17 +478,13 @@ if ($_GET["facid"] > 0)
{
{
dolibarr_print_error
(
$db
);
dolibarr_print_error
(
$db
);
}
}
/*
/*
* Ajouter une ligne
* Ajouter une ligne
*/
*/
print
"</table>
\n
"
;
print
"</table>
\n
"
;
print
"</div>
\n
"
;
print
"</div>
\n
"
;
/*
/*
* Boutons actions
* Boutons actions
*/
*/
...
@@ -495,10 +493,6 @@ if ($_GET["facid"] > 0)
...
@@ -495,10 +493,6 @@ if ($_GET["facid"] > 0)
{
{
print
"<div class=
\"
tabsAction
\"
>
\n
"
;
print
"<div class=
\"
tabsAction
\"
>
\n
"
;
// Envoyer
// Envoyer
if
(
$fac
->
statut
==
1
&&
$user
->
rights
->
facture
->
envoyer
)
if
(
$fac
->
statut
==
1
&&
$user
->
rights
->
facture
->
envoyer
)
{
{
...
@@ -506,14 +500,12 @@ if ($_GET["facid"] > 0)
...
@@ -506,14 +500,12 @@ if ($_GET["facid"] > 0)
}
}
// Envoyer une relance
// Envoyer une relance
/*
if ($fac->statut == 1 && price($resteapayer) > 0 && $user->rights->facture->envoyer)
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 " <a class=\"tabAction\" href=\"".$_SERVER["PHP_SELF"]."?facid=$fac->id&action=prerelance\">".$langs->trans("SendRemind")."</a>\n";
}
}
*/
print
"</div>
\n
"
;
print
"</div>
\n
"
;
...
@@ -546,7 +538,6 @@ if ($_GET["facid"] > 0)
...
@@ -546,7 +538,6 @@ if ($_GET["facid"] > 0)
print
'<td align="right">'
.
strftime
(
"%d %b %Y %H:%M:%S"
,
filemtime
(
$file
))
.
'</td>'
;
print
'<td align="right">'
.
strftime
(
"%d %b %Y %H:%M:%S"
,
filemtime
(
$file
))
.
'</td>'
;
print
'</tr>'
;
print
'</tr>'
;
$dir
=
$conf
->
facture
->
dir_output
.
"/"
.
$facref
.
"/"
;
$dir
=
$conf
->
facture
->
dir_output
.
"/"
.
$facref
.
"/"
;
$handle
=
opendir
(
$dir
);
$handle
=
opendir
(
$dir
);
...
@@ -736,15 +727,12 @@ if ($_GET["facid"] > 0)
...
@@ -736,15 +727,12 @@ if ($_GET["facid"] > 0)
}
}
}
}
}
}
else
else
{
{
/* Facture non trouve */
/* Facture non trouve */
print
$langs
->
trans
(
"ErrorBillNotFound"
,
$_GET
[
"facid"
]);
print
$langs
->
trans
(
"ErrorBillNotFound"
,
$_GET
[
"facid"
]);
}
}
}
}
$db
->
close
();
$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