Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Manufacturing module in 4.15
05-31-2018, 05:32 PM
Post: #1
Manufacturing module in 4.15
Good day.
Some functionality got lost in 4.15.
When trying to manufacture a item in 4.15 it gives insufficient stock, which are correct, but will not indicate which item are insufficient.
Quote:ERROR Report : Receiving the selected quantity against this work order would result in negative stock for a component. The system parameters are set to prohibit negative stocks from occurring. This manufacturing receipt cannot be created until the stock on hand is corrected.
while 4.14.1 will give this result for the same item manufacture.
Quote:Component - 1000UF25VR - Negative Stock Prohibited : Receiving the selected quantity against this work order would result in negative stock for a component. The system parameters are set to prohibit negative stocks from occurring. This manufacturing receipt cannot be created until the stock on hand is corrected.
Or are this the intended behaviour for 4.15

Regards
Alan
Find all posts by this user
Quote this message in a reply
05-31-2018, 08:17 PM
Post: #2
RE: Manufacturing module in 4.15
This is actually a problem with the new Message writing code as it doesn't properly deal with the $Prefix. The section at the top of the includes/footer.php should read as below. Andy do you want to commit this?

PHP Code:
if (isset($Messages) and count($Messages) > 0) {
    foreach (
$Messages as $Message) {
        switch (
$Message[1]) {
            case 
'error':
                
$Class 'error';
                
$Message[2] = $Message[2] ? $Message[2] : _('ERROR') . ' ' _('Report');
                if (isset(
$_SESSION['LogSeverity']) and $_SESSION['LogSeverity'] > 3) {
                    
fwrite($LogFiledate('Y-m-d h-m-s') . ',' $Type ',' $_SESSION['UserID'] . ',' trim($Msg',') . "\n");
                }
                echo 
'<div class="Message ' $Class ' noPrint">
                <span class="MessageCloseButton">&times;</span>
                <b>' 
$Message[2] . '</b> : ' $Message[0] . '</div>';
                break;
            case 
'warn':
            case 
'warning':
                
$Class 'warn';
                
$Message[2] = $Message[2] ? $Message[2] : _('WARNING') . ' ' _('Report');
                if (isset(
$_SESSION['LogSeverity']) and $_SESSION['LogSeverity'] > 3) {
                    
fwrite($LogFiledate('Y-m-d h-m-s') . ',' $Type ',' $_SESSION['UserID'] . ',' trim($Msg',') . "\n");
                }
                echo 
'<div class="Message ' $Class ' noPrint">
                <span class="MessageCloseButton">&times;</span>
                <b>' 
$Message[2] . '</b> : ' $Message[0] . '</div>';
                break;
            case 
'success':
                
$Class 'success';
                
$Message[2] = $Message[2] ? $Message[2] : _('SUCCESS') . ' ' _('Report');
                if (isset(
$_SESSION['LogSeverity']) and $_SESSION['LogSeverity'] > 3) {
                    
fwrite($LogFiledate('Y-m-d h-m-s') . ',' $Type ',' $_SESSION['UserID'] . ',' trim($Msg',') . "\n");
                }
                echo 
'<div class="Message ' $Class ' noPrint">
                <span class="MessageCloseButton">&times;</span>
                <b>' 
$Message[2] . '</b> : ' $Message[0] . '</div>';
                break;
            case 
'info':
            default:
                
$Message[2] = $Message[2] ? $Message[2] : _('INFORMATION') . ' ' _('Message');
                
$Class 'info';
                if (isset(
$_SESSION['LogSeverity']) and $_SESSION['LogSeverity'] > 2) {
                    
fwrite($LogFiledate('Y-m-d h-m-s') . ',' $Type ',' $_SESSION['UserID'] . ',' trim($Msg',') . "\n");
                }
                echo 
'<div class="Message ' $Class ' noPrint">
                <span class="MessageCloseButton">&times;</span>
                <b>' 
$Message[2] . '</b> : ' $Message[0] . '</div>';
        }
    }


Tim
Visit this user's website Find all posts by this user
Quote this message in a reply
05-31-2018, 10:31 PM
Post: #3
RE: Manufacturing module in 4.15
Thanks again for helping Tim

That did the trick. I actually just did
PHP Code:
$Prefix $Message[2]; 
as it looked like you just replaced Prefix with Message[2]. Saved a lot of copying Rolleyes
Find all posts by this user
Quote this message in a reply
05-31-2018, 10:58 PM
Post: #4
RE: Manufacturing module in 4.15
Yes, that would work as well and is probably better than mine Smile

Before the last release this section was done inside a function and $Prefix was an argument of that function, so as it was now redundant I got rid of it, but your change is less work which is something I am always in favour of!

Tim
Visit this user's website Find all posts by this user
Quote this message in a reply
06-01-2018, 03:06 AM
Post: #5
RE: Manufacturing module in 4.15
(05-31-2018 08:17 PM)falkoner Wrote:  Andy do you want to commit this?

Hi Tim,

Yes, thanks, I'll commit this later today/tomorrow.

Andy.

https://www.linkedin.com/in/andrewcouling
Find all posts by this user
Quote this message in a reply
06-01-2018, 03:10 AM
Post: #6
RE: Manufacturing module in 4.15
Goodday
In 4.15 the 'barcodes' directory are expected in 'webERP\includes\tcpdf/include/barcodes/qrcode.php' and not in 'webERP\includes\tcpdf/barcodes/qrcode.php

otherwise you get an error when trying to print a 'work order'.
Not sure which one are incorrect the placement of qrcode.php or the calling function referencing the wrong directory.

Regards
Alan
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)