add receipt handling
This commit is contained in:
		
							parent
							
								
									0a6c05ff6d
								
							
						
					
					
						commit
						c0e6528728
					
				
					 1 changed files with 51 additions and 0 deletions
				
			
		
							
								
								
									
										51
									
								
								src/main/java/tech/iBeans/POSware/Lite/receipt.java
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								src/main/java/tech/iBeans/POSware/Lite/receipt.java
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,51 @@ | ||||||
|  | /* | ||||||
|  |  * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license | ||||||
|  |  * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template | ||||||
|  |  */ | ||||||
|  | package tech.iBeans.POSware.Lite; | ||||||
|  | import java.util.*; | ||||||
|  | import tech.iBeans.POSware.Lite.data_test.*; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * | ||||||
|  |  * @author eleven | ||||||
|  |  */ | ||||||
|  | public class receipt { | ||||||
|  |     public static String content = ""; | ||||||
|  |      | ||||||
|  |     public static void init() { | ||||||
|  |         content = ""; | ||||||
|  |     }; | ||||||
|  |      | ||||||
|  |     public static String headers() { | ||||||
|  |         /* Generate the headers.  | ||||||
|  |         */ | ||||||
|  |          | ||||||
|  |         Dictionary <String, String> content_headers_raw = data_test.read_properties(); | ||||||
|  |         Enumeration<String> content_headers_raw_headers = content_headers_raw.keys(); | ||||||
|  |         String content_headers = ""; | ||||||
|  |          | ||||||
|  |         if (content_headers_raw.get("Full Name") != null) { | ||||||
|  |             content_headers = content_headers_raw.get("Full Name"); | ||||||
|  |         } else if (content_headers_raw.get("Name") != null) { | ||||||
|  |             content_headers = content_headers_raw.get("Name"); | ||||||
|  |         }; | ||||||
|  |          | ||||||
|  |         while (content_headers_raw_headers.hasMoreElements()) { | ||||||
|  |             String content_headers_header = content_headers_raw_headers.nextElement(); | ||||||
|  |             if (content_headers_raw.get(content_headers_header) != null) { | ||||||
|  |                 if (!content_headers_header.contains("Name")) { | ||||||
|  |                     content_headers = content_headers.concat("\n"); | ||||||
|  |                     content_headers = content_headers.concat(content_headers_header.concat(": ")); | ||||||
|  |                     content_headers = content_headers.concat(content_headers_raw.get(content_headers_header)); | ||||||
|  |                 }; | ||||||
|  |             }; | ||||||
|  |         }; | ||||||
|  |          | ||||||
|  |          | ||||||
|  |         content = content.concat(content_headers); | ||||||
|  |          | ||||||
|  |         return(content_headers); | ||||||
|  |     }; | ||||||
|  |      | ||||||
|  | } | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue