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
198fce45
Commit
198fce45
authored
15 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Fix: Bad error message
parent
3559ded8
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/compta/facture.php
+12
-14
12 additions, 14 deletions
htdocs/compta/facture.php
with
12 additions
and
14 deletions
htdocs/compta/facture.php
+
12
−
14
View file @
198fce45
...
...
@@ -346,10 +346,10 @@ if ($_GET['action'] == 'modif' && $user->rights->facture->modifier && $conf->glo
$resteapayer
=
$fac
->
total_ttc
-
$totalpaye
;
// On v
�
rifie si les lignes de factures ont
�t�
export
�
es en compta et/ou ventil
�
es
// On v
e
rifie si les lignes de factures ont
ete
export
e
es en compta et/ou ventil
e
es
$ventilExportCompta
=
$fac
->
getVentilExportCompta
();
// On v
�
rifie si aucun paiement n'a
�t�
effectu
�
// On v
e
rifie si aucun paiement n'a
ete
effectu
e
if
(
$resteapayer
==
$fac
->
total_ttc
&&
$fac
->
paye
==
0
&&
$ventilExportCompta
==
0
)
{
$fac
->
set_draft
(
$user
);
...
...
@@ -364,14 +364,14 @@ if ($_GET['action'] == 'modif' && $user->rights->facture->modifier && $conf->glo
}
}
// Class
e �
"pa
y�e
"
// Class
ify
"pa
id
"
if
(
$_REQUEST
[
'action'
]
==
'confirm_paid'
&&
$_REQUEST
[
'confirm'
]
==
'yes'
&&
$user
->
rights
->
facture
->
paiement
)
{
$fac
=
new
Facture
(
$db
);
$fac
->
fetch
(
$_GET
[
'facid'
]);
$result
=
$fac
->
set_paid
(
$user
);
}
// Class
e �
"pa
y�e
parti
ellement
"
// Class
if
"pa
id
parti
aly
"
if
(
$_REQUEST
[
'action'
]
==
'confirm_paid_partially'
&&
$_REQUEST
[
'confirm'
]
==
'yes'
&&
$user
->
rights
->
facture
->
paiement
)
{
$fac
=
new
Facture
(
$db
);
...
...
@@ -387,7 +387,7 @@ if ($_REQUEST['action'] == 'confirm_paid_partially' && $_REQUEST['confirm'] == '
$mesg
=
'<div class="error">'
.
$langs
->
trans
(
"ErrorFieldRequired"
,
$langs
->
trans
(
"Reason"
))
.
'</div>'
;
}
}
// Class
e �
"abandon
n�
e"
// Class
ify
"abandone
d
"
if
(
$_REQUEST
[
'action'
]
==
'confirm_canceled'
&&
$_REQUEST
[
'confirm'
]
==
'yes'
)
{
$fac
=
new
Facture
(
$db
);
...
...
@@ -836,9 +836,7 @@ if ($_POST['action'] == 'add' && $user->rights->facture->creer)
}
}
/*
* Ajout d'une ligne produit dans la facture
*/
// Add a new line
if
((
$_POST
[
'action'
]
==
'addline'
||
$_POST
[
'action'
]
==
'addline_predef'
)
&&
$user
->
rights
->
facture
->
creer
)
{
$fac
=
new
Facture
(
$db
);
...
...
@@ -854,8 +852,12 @@ if (($_POST['action'] == 'addline' || $_POST['action'] == 'addline_predef') && $
$mesg
=
'<div class="error">'
.
$langs
->
trans
(
"ErrorFieldRequired"
,
$langs
->
transnoentitiesnoconv
(
"UnitPriceHT"
))
.
'</div>'
;
$result
=
-
1
;
}
if
(
$result
>=
0
&&
$_POST
[
'qty'
]
!=
''
&&
((
$_POST
[
'pu'
]
!=
''
&&
(
$_POST
[
'np_desc'
]
||
$_POST
[
'dp_desc'
]))
||
$_POST
[
'idprod'
]))
if
(
!
isset
(
$_POST
[
'qty'
])
||
$_POST
[
'qty'
]
==
''
)
{
$mesg
=
'<div class="error">'
.
$langs
->
trans
(
"ErrorFieldRequired"
,
$langs
->
transnoentitiesnoconv
(
'Qty'
))
.
'</div>'
;
$result
=
-
1
;
}
if
(
$result
>=
0
&&
(
(
$_POST
[
'pu'
]
!=
''
&&
(
$_POST
[
'np_desc'
]
||
$_POST
[
'dp_desc'
]))
||
$_POST
[
'idprod'
]
)
)
{
$ret
=
$fac
->
fetch
(
$_POST
[
'facid'
]);
if
(
$ret
<
0
)
...
...
@@ -958,10 +960,6 @@ if (($_POST['action'] == 'addline' || $_POST['action'] == 'addline_predef') && $
}
}
}
else
{
$mesg
=
'<div class="error">'
.
$langs
->
trans
(
"ErrorFieldRequired"
,
$langs
->
transnoentitiesnoconv
(
'Qty'
))
.
'</div>'
;
}
if
(
$result
>
0
)
{
...
...
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