Skip to content

Instantly share code, notes, and snippets.

@LucaTomei
Last active February 1, 2023 09:00
Show Gist options
  • Save LucaTomei/96066f4413d49121769b96f17e70c49b to your computer and use it in GitHub Desktop.
Save LucaTomei/96066f4413d49121769b96f17e70c49b to your computer and use it in GitHub Desktop.
Gist updated via Python on 31/01/2023

STREAMSERVE TEMPLATE

Deployed in DEV, TEST and EDU environments - Project Path and Technical Document

Project Path:

  • Project File:
    M3Out\MOS_LV1_DEV_21102\Design\Mod\PMS241 - Manufacturing order
  • Exported File:
    M3Out\MOS_LV1_DEV_21102\export\PMS241 - Manufacturing order

Deployed in DEV and TEST on 31/01/2023


MAK + STREAMSERVE TEMPLATE

Deployed in DEV, TEST and EDU environments - Project Path and Technical Document

Project Paths:

  • STREAMSERVE Project Path:
    D:\Infor\M3Out\MOS_US1\Design\Mod\TWS021 - Generic label
  • STREAMSERVE Control Center Export Path:
    D:\Infor\M3Out\MOS_US1\export\TWS021-Platform.export
  • MAK Action Number:
    2005194
  • MAK Zip Files Dir:
    \twsstrm3s230\M3BE\delivery odayDate\VFix_2005194_TWS.zip

Deployed in DEV, TEST and EDU environments on 31/01/2023


MEC TEMPLATE

Deployed in DEV, TEST and EDU environments - Project Path and Technical Document

  • Mapping TWS_M3_SDI_Fattura has been modified. A new version 14.0 has been created.

Deployed in DEV, TEST and EDU environments on 31/01/2023

@LucaTomei
Copy link
Author

LucaTomei commented Nov 21, 2022

//**********************************************************************************
//*                                                                                *
//*           This subfunction accept one argument setInputFormatNum(arg1),                *
//*           which then 'normalize' the numeric input value, regardless of format *
//*                                                                                *
//*           Argument accept only sums containing 1, 2 or 3 long string,          *
//*           containing only numbers.                                             *
//*                                                                                *
//*                --> #1 Indata to be normalized.                           *
//*                <-- String <-- Returndata                                       *
//*                                                                                *
//**********************************************************************************
 func setInputFormatNum() {
     $retval = strblk(strrblk(#1));
	 $pos1 = stridx(#1, ".");     
	 $pos2 = stridx(#1, ",");     
	 
	 if (num($pos1) > num($pos2)) {         
	 	$retval = substrrepl($retval, ",", "");     
	} else {         
		$retval = substrrepl($retval, ".", "");         
		$retval = substrrepl($retval, ",", ".");     
	}     
	
	if(stridx($retval, "-") > 1) 
		$retval = "-" + substrrepl($retval, "-", "");     
		
	return substrrepl($retval, " ", ""); 
} 


//**********************************************************************************
//*                                                                                *
//*           This subfunction accept one argument normalizeNumber(arg1, arg2),    *
//*           which then 'normalize' the numeric input value arg2 in               *
//*			  the same format of arg1                                              *
//*                                                                                *
//*                                                                                *
//*                --> #1 Normalization format.                                    *
//*                --> #2 Indata to be normalized.                                 *
//*                <-- String <-- Returndata                                       *
//*                                                                                *
//**********************************************************************************
 func normalizeNumber() {
	$to_normalize = num(setInputFormatNum(strblk(strrblk(#2))));		

	$pos1 = stridx(#1, ".");     
	$pos2 = stridx(#1, ",");     
	 
	if (num($pos1) > num($pos2)) {         
		$to_normalize = NFORMAT("Z,ZZZ,ZZ9.99",$to_normalize);
	}else{
		$to_normalize = NFORMAT("Z.ZZZ.ZZ9,99",$to_normalize);
	}
	return $to_normalize;
} 

//EXAMPLE
//$0LWBSAPR_NEW = normalizeNumber(sinval("0SWSTOPY"), $0LWBSAPR_NEW);    // this will format $0LWBSAPR_NEW with same format of 0SWSTOPY

@LucaTomei
Copy link
Author

LucaTomei commented Nov 21, 2022

//**********************************************************************************
//*                                                                               																						 *
//*           This subfunction accept one argument dateSeparatorFormatting(arg1, arg2),    *
//*            which then 'format' the  input  data value arg1 with               											*
//*			 the separator arg2                                              																		*
//*                                                                                																					*
//*                                                                                																					*
//*                --> #1 date to format.   ("021222")                                 													*
//*                --> #2 formatting separator ("/")                                														*
//*                02/12/22 <-- String <-- Returndata                                       												*
//*                                                                                																					*
//**********************************************************************************
 func dateSeparatorFormatting() {
	$toFormat = strblk(strrblk(#1));		// 021222
	$separator = strblk(strrblk(#2));		// "-"
	$old_date = $toFormat;
	if(strlen($old_date) = 6){ // 201221
		$day = $old_date(1,2);
		$month = $old_date(3,2);
		$year = $old_date(5,2);
	}else if(strlen($old_date) = 8){ // 20/12/21 or 20221124
	    if(strlen(str(num($old_date))) = 8){	//20221124
			$day = $old_date(7,2);
			$month = $old_date(5,2);
			$year = $old_date(1,4);
		}
		else{
			$day = $old_date(1,2);
			$month = $old_date(4,2);
			$year = $old_date(7,2);
		}
	}else if(strlen($old_date) = 10){ // 05/21/2008
		$day = $old_date(1,2);
		$month = $old_date(4,2);
		$year = $old_date(7,4);
	}

	if(strlen($toFormat) = 0){
		return "";
	}
	$newDateFormat = $day + $separator + $month + $separator + $year;
	return $newDateFormat;
}  

@LucaTomei
Copy link
Author

LucaTomei commented Nov 22, 2022

// SETTINGS FOR EMAIL
ISO 8859-1

$mvx_subject.pdf
$mvx_frmail
$mvx_tomail
$mvx_ccmail
$mvx_subject

// SETTINGS FOR ATTACHMENTS
$attachName
$attach
Predefined
application/pdf

// code for A4 process
$attach = "..\data\pdf\201_SI.pdf";
$attachName = "TWS MOTO _POGOJI NABAVE ZA STORITVE .pdf";

@LucaTomei
Copy link
Author

// COMMENTI

//[LT]: START 			202208102005194 - 20220708

//[LT]: END 					202208102005194 - 20220708


/*[LT]: 202208102005194 START */

/*[LT]: 202208102005194 END*/

@LucaTomei
Copy link
Author

LucaTomei commented Nov 23, 2022

NOMI DOCUMENTI

  • APS162 = Payment specification
  • APS501 = Acc Payable REP
  • APS516 = Payment forecast Age REP
  • ARS121 = Manual invoice
  • ARS149 = Statement
  • ARS159 = Reminder
  • ARS501 = Acc Receivable REP
  • ARS516 = AR Pmt ForecastAge Dist REP
  • CAS171 = Order costing REP
  • CAS531 = Inventory Value REP
  • CRS601 = Trade Statistics REP
  • CRS602 = Intrastat summarized
  • CRS616 = Customer printout
  • CRS672 = Put away label
  • GLS041 = Journals
  • MMS303 = Physical Inv Perform
  • MMS304 = Physical Inv Variances
  • MMS480 = Delivery Note
  • MMS486 = Address label
  • MMS626 = Stocklocation label
  • MMS626 = Stocklocation label
  • MMS666 = Item Statistics
  • MWS435PF = Picking List
  • MWS437 = Wave picklist
  • MWS450 = Put away Product Label
  • MWS610 = CMR
  • OIS199 = Invoice
  • OIS395 = Return goods
  • OIS606PF = Order Confirmation
  • PMS241 = Manufacturing order
  • PPS312 = Inspection label 2
  • PPS601 = Purchase Order
  • PPS821 = Claim
  • QPS601 = Quotation
  • RGS655 = Report generator
  • TWS021 = Generic label

@LucaTomei
Copy link
Author

//--------------------------------------------------------------NELL'AFTER DEL MESSAGE
$basware = "yes";

$PDFpath = "\\twsstrsdb015\MOS\PRD\BASWARE\INVOICE\";
if ($layer = "Test") $PDFpath = "\\twsstrsdb015\MOS\TST\BASWARE\INVOICE\";
if ($layer = "Dev") $PDFpath = "\\twsstrsdb015\MOS\DEV\BASWARE\INVOICE\";

$PDFname  = "TWS_"+$0HUHDIVI+"_"+$year+"_"+$customeraccount+"_"+$0HUIIVNO+".pdf";

//FILE OVERWRITING
$que = "FILE";
callproc("OIS1990H-A4");

//FILE NOT OVERWRITING
//$err = FileOpen($PDFpath+$PDFname, "r");
//if(num($err)!=0)
//{
//	 $errtext=ioerrtext($err);
//     log(0,"Errortext "+$errtext+" so creating new");
//	$que = "FILE";
//  callproc("OIS1990H-A4");
//  } else {
// 	log(1,"PDF file "+$PDFpath+$PDFname+" does already exists");
//	FileClose($PDFpath+$PDFname);
//}

$basware = "no";


//----------------------------------------------------------NEL BEFORE PROCESS
if($basware = "yes") setdestpath($PDFpath+$PDFname);
//----------------------------------------------------------

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment