Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Manufacturing module in 4.15
05-31-2018, 05:32 PM,
#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
Reply
05-31-2018, 08:17 PM,
#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
Reply
05-31-2018, 10:31 PM,
#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
Reply
05-31-2018, 10:58 PM,
#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
Reply
06-01-2018, 03:06 AM,
#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
Reply
06-01-2018, 03:10 AM,
#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
Reply
07-02-2018, 11:06 AM, (This post was last modified: 07-02-2018, 11:16 AM by TurboPT.)
#7
RE: Manufacturing module in 4.15
Thanks Tim and alanmi3833 for the $Prefix fix.

...and to alanmi3383 for pointing out the barcodes directory matter.
The barcodes directory, as it turns out, SHOULD be located as a sub-directory to tcpdf/include/, as that is where it is located in the original tgz, as shown in the source tree here. So, that directory will be moved to where the rest of the library expects it to be located.

The post #3 $Prefix change committed. (credit to alanmi3383)

The post #6 path issue fix committed. (directory move)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)