|  |  |  | @ -99,6 +99,12 @@ module Submissions | 
			
		
	
		
			
				
					|  |  |  |  |         height: 1 | 
			
		
	
		
			
				
					|  |  |  |  |       ) | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |       configs = submission.account.account_configs.where(key: [AccountConfig::WITH_AUDIT_VALUES_KEY, | 
			
		
	
		
			
				
					|  |  |  |  |                                                                AccountConfig::WITH_SIGNATURE_ID]) | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |       with_signature_id = configs.find { |c| c.key == AccountConfig::WITH_SIGNATURE_ID }&.value == true | 
			
		
	
		
			
				
					|  |  |  |  |       with_audit_values = configs.find { |c| c.key == AccountConfig::WITH_AUDIT_VALUES_KEY }&.value != false | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |       composer.page_style(:default, page_size:) do |canvas, style| | 
			
		
	
		
			
				
					|  |  |  |  |         box = canvas.context.box(:media) | 
			
		
	
		
			
				
					|  |  |  |  |         canvas.save_graphics_state do | 
			
		
	
	
		
			
				
					|  |  |  | @ -110,9 +116,6 @@ module Submissions | 
			
		
	
		
			
				
					|  |  |  |  |           maybe_add_background(canvas, submission, page_size) | 
			
		
	
		
			
				
					|  |  |  |  |         end | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         with_signature_id = submission.account.account_configs | 
			
		
	
		
			
				
					|  |  |  |  |                                       .exists?(key: AccountConfig::WITH_SIGNATURE_ID, value: true) | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         if with_signature_id || submission.account.testing? | 
			
		
	
		
			
				
					|  |  |  |  |           canvas.save_graphics_state do | 
			
		
	
		
			
				
					|  |  |  |  |             document_id = Digest::MD5.hexdigest(submission.slug).upcase | 
			
		
	
	
		
			
				
					|  |  |  | @ -263,6 +266,7 @@ module Submissions | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         composer.table(info_rows, cell_style: { padding: [0, 0, 0, 0], border: { width: 0 } }) | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         if with_audit_values | 
			
		
	
		
			
				
					|  |  |  |  |           submission.template_fields.filter_map do |field| | 
			
		
	
		
			
				
					|  |  |  |  |             next if field['submitter_uuid'] != submitter.uuid | 
			
		
	
		
			
				
					|  |  |  |  |             next if field['type'] == 'heading' | 
			
		
	
	
		
			
				
					|  |  |  | @ -332,7 +336,10 @@ module Submissions | 
			
		
	
		
			
				
					|  |  |  |  |                   value = TimeUtils.format_date_string(value, field.dig('preferences', 'format'), account.locale) | 
			
		
	
		
			
				
					|  |  |  |  |                 end | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |               value = NumberUtils.format_number(value, field.dig('preferences', 'format')) if field['type'] == 'number' | 
			
		
	
		
			
				
					|  |  |  |  |                 if field['type'] == 'number' | 
			
		
	
		
			
				
					|  |  |  |  |                   value = NumberUtils.format_number(value, | 
			
		
	
		
			
				
					|  |  |  |  |                                                     field.dig('preferences', 'format')) | 
			
		
	
		
			
				
					|  |  |  |  |                 end | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |                 value = value.join(', ') if value.is_a?(Array) | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | @ -342,6 +349,7 @@ module Submissions | 
			
		
	
		
			
				
					|  |  |  |  |               end | 
			
		
	
		
			
				
					|  |  |  |  |             ] | 
			
		
	
		
			
				
					|  |  |  |  |           end | 
			
		
	
		
			
				
					|  |  |  |  |         end | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         composer.draw_box(divider) | 
			
		
	
		
			
				
					|  |  |  |  |       end | 
			
		
	
	
		
			
				
					|  |  |  | 
 |