Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
SAMBUMBA
pasteque-server
Commits
6b36b00f
Commit
6b36b00f
authored
Feb 25, 2013
by
Cédric Houbart
Browse files
Help on colored stock levels in inventory
parent
50ea0366
Changes
3
Hide whitespace changes
Inline
Side-by-side
modules/base_stocks/actions/inventory.php
View file @
6b36b00f
...
...
@@ -45,18 +45,21 @@ $qty = isset($stocks[$product->id]) ? $stocks[$product->id] : 0;
$security
=
isset
(
$levels
[
$product
->
id
])
?
$levels
[
$product
->
id
]
->
security
:
NULL
;
$max
=
isset
(
$levels
[
$product
->
id
])
?
$levels
[
$product
->
id
]
->
max
:
NULL
;
$class
=
""
;
$help
=
""
;
if
(
$security
!==
NULL
&&
$qty
<
$security
)
{
$class
=
" warn-level"
;
$help
=
' title="'
.
\
i18n
(
"Stock is below security level!"
,
PLUGIN_NAME
)
.
'"'
;
}
if
(
$qty
<
0
||
(
$max
!==
NULL
&&
$qty
>
$max
))
{
$class
=
" alert-level"
;
$help
=
' title="'
.
\
i18n
(
"Stock is negative!"
,
PLUGIN_NAME
)
.
'"'
;
}
?>
<tr
class=
"row-
<?php
echo
$par
?
'par'
:
'odd'
;
?>
"
>
<td><img
class=
"thumbnail"
src=
"?
<?php
echo
\
Pasteque\URL_ACTION_PARAM
;
?>
=img&w=product&id=
<?php
echo
$product
->
id
;
?>
"
/>
<td>
<?php
echo
$product
->
reference
;
?>
</td>
<td>
<?php
echo
$product
->
label
;
?>
</td>
<td
class=
"numeric
<?php
echo
$class
;
?>
"
>
<?php
echo
$qty
;
?>
</td>
<td
class=
"numeric
<?php
echo
$class
;
?>
"
<?php
echo
$help
;
?>
>
<?php
echo
$qty
;
?>
</td>
<td
class=
"numeric"
>
<?php
echo
$security
===
NULL
?
\
i18n
(
"Undefined"
)
:
$security
;
?>
</td>
</tr>
<?php
...
...
modules/base_stocks/languages/default.locale
View file @
6b36b00f
...
...
@@ -7,6 +7,8 @@
"Input (buy)": "Input (buy)",
"Output (sell)": "Output (sell)",
"Output (return to supplyer)": "Output (return to supplyer)",
"Stock is below security level!": "Stock is below security level!",
"Stock is negative!": "Stock is negative",
"Inventory": "Inventory",
"Security threshold": "Security threshold",
...
...
modules/base_stocks/languages/fr-FR.locale
View file @
6b36b00f
...
...
@@ -7,6 +7,8 @@
"Input (buy)": "Entrée (achat)",
"Output (sell)": "Sortie (vente)",
"Output (return to supplyer": "Sortie (retour au fournisseur)",
"Stock is below security level!": "Le stock est sous le seuil de sécurité !",
"Stock is negative!": "Le stock est négatif !",
"Inventory": "Inventaire",
"Security threshold": "Seuil de sécurité",
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment