<commit_before><?php 
	//if we had specific update code for the module, we would create a class
	//called [module]Update with a method called updateSettings($variables)

	class bmsDisplay{
	
		function getFields($therecord){
			
			global $db;
			
			$theinput = new inputField("shipping_markup",$therecord["shipping_markup"],"shipping markup",false,"real",4,4);
			$fields[] = $theinput;
			
			$theinput = new inputField("shipping_postalcode",$therecord["shipping_postalcode"],"shipping orginiation zip/postal code",false,NULL,32,128);
			$fields[] = $theinput;

			$theinput = new inputDataTableList($db, "default_payment",$therecord["default_payment"],"paymentmethods","id","name",
									"inactive=0 AND `type` != 'receivable'", "priority,name", true, "default payment method");
			$fields[] = $theinput;
	
			$theinput = new inputDataTableList($db, "default_shipping",$therecord["default_shipping"],"shippingmethods","id","name",
									"`inactive`=0", "priority,name", true, "default shipping method");
			$fields[] = $theinput;
			
			$theinput = new inputDataTableList($db, "default_discount",$therecord["default_discount"],"discounts","id","name",
									"inactive=0", "name", true, "default discount");
			$fields[] = $theinput;
	
			$theinput = new inputDataTableList($db, "default_taxarea",$therecord["default_taxarea"],"tax","id","name",
									"inactive=0", "name", true, "default tax area");
			$fields[] = $theinput;

			$theinput = new inputBasicList("default_clienttype",$therecord["default_clienttype"],array("prospect"=>"prospect","client"=>"client"), "default type");
			$fields[] = $theinput;
	
			$theinput = new inputCheckbox("default_hascredit",$therecord["default_hascredit"],"has credit by default");
			$fields[] = $theinput;

			$theinput = new inputCurrency("default_creditlimit", $therecord["default_creditlimit"], "default credit limit");
			$fields[] = $theinput;
			
			$theinput = new inputField("term1_days",$therecord["term1_days"],"term 1 length",false,"integer",4,4);
			$theinput->setAttribute("class","important");
			$fields[] = $theinput;			

			$theinput = new inputField("term1_percentage",$therecord["term1_percentage"],"term 1 percentage",false,"real",4,4);
			$fields[] = $theinput;			

			$theinput = new inputField("term2_days",$therecord["term2_days"],"term 2 length",false,"integer",4,4);
			$theinput->setAttribute("class","important");
			$fields[] = $theinput;			

			$theinput = new inputField("term2_percentage",$therecord["term2_percentage"],"term 2 percentage",false,"real",4,4);
			$fields[] = $theinput;			

			$theinput = new inputField("term3_days",$therecord["term3_days"],"term 3 length",false,"integer",4,4);
			$theinput->setAttribute("class","important");
			$fields[] = $theinput;			

			$theinput = new inputField("term3_percentage",$therecord["term3_percentage"],"term 3 percentage",false,"real",4,4);
			$fields[] = $theinput;			

			return $fields;
		}
		
		function display($theform,$therecord){
?>
<h1 class="newModule">Module: Business Management System</h1>
<fieldset>
	<legend>shipping</legend>
	<p class="notes"><br />
		<strong>Note:</strong> The shipping information below is used when connecting to <br />
		UPS to calculate shipping costs for product.  Current tests show that the UPS <br />
		shipping calculator only works when shipping to and from the Unites States.<br />
	</p>
	
	<p>
		<?php $theform->showField("shipping_markup");?>
		<br />
		<span class="notes"><strong>Note:</strong> Enter the number to multiply the calculated shipping cost. <br />
		For example to mark up shipping costs by 10%, enter 1.1</span>
	</p>
	
	<p>
		<?php $theform->showField("shipping_postalcode");?>
	</p>
</fieldset>
<p class="updateButtonP"><input name="command" type="submit" class="Buttons" value="update settings" /></p>

<fieldset>
	<legend>invoices</legend>
	<p>
		<label for="invoice_default_printinstruc">default printed instructions</label><br/>
		<textarea id="invoice_default_printinstruc" name="invoice_default_printinstruc" cols="60" rows="3" ><?php echo $therecord["invoice_default_printinstruc"]?></textarea>
	</p>
	<p><?php $theform->showField("default_payment");?></p>

	<p><?php $theform->showField("default_shipping");?></p>

	<p><?php $theform->showField("default_discount");?></p>

	<p><?php $theform->showField("default_taxarea");?></p>
</fieldset>
<p class="updateButtonP"><input name="command" type="submit" class="Buttons" value="update settings" /></p>

<fieldset>
	<legend>clients</legend>
	
	<p><?php echo $theform->showField("default_clienttype");?></p>

	<p><?php echo $theform->showField("default_hascredit");?></p>

	<p><?php echo $theform->showField("default_creditlimit");?></p>

</fieldset>
<p class="updateButtonP"><input name="command" type="submit" class="Buttons" value="update settings" /></p>

<fieldset>
	<legend>Accounts Receivable</legend>
	
	<p><?php echo $theform->showField("term1_days");?> days</p>

	<p><?php echo $theform->showField("term1_percentage");?> %</p>

	<p><?php echo $theform->showField("term2_days");?> days</p>

	<p><?php echo $theform->showField("term2_percentage");?> %</p>

	<p><?php echo $theform->showField("term3_days");?> days</p>

	<p><?php echo $theform->showField("term3_percentage");?> %</p>

</fieldset>
<p class="updateButtonP"><input name="command" type="submit" class="Buttons" value="update settings" /></p>

<?php
		}//end method
	}//end class
?>
<commit_msg>Renamed invoice configuration to sales order<commit_after><?php 
	//if we had specific update code for the module, we would create a class
	//called [module]Update with a method called updateSettings($variables)

	class bmsDisplay{
	
		function getFields($therecord){
			
			global $db;
			
			$theinput = new inputField("shipping_markup",$therecord["shipping_markup"],"shipping markup",false,"real",4,4);
			$fields[] = $theinput;
			
			$theinput = new inputField("shipping_postalcode",$therecord["shipping_postalcode"],"shipping orginiation zip/postal code",false,NULL,32,128);
			$fields[] = $theinput;

			$theinput = new inputDataTableList($db, "default_payment",$therecord["default_payment"],"paymentmethods","id","name",
									"inactive=0 AND `type` != 'receivable'", "priority,name", true, "default payment method");
			$fields[] = $theinput;
	
			$theinput = new inputDataTableList($db, "default_shipping",$therecord["default_shipping"],"shippingmethods","id","name",
									"`inactive`=0", "priority,name", true, "default shipping method");
			$fields[] = $theinput;
			
			$theinput = new inputDataTableList($db, "default_discount",$therecord["default_discount"],"discounts","id","name",
									"inactive=0", "name", true, "default discount");
			$fields[] = $theinput;
	
			$theinput = new inputDataTableList($db, "default_taxarea",$therecord["default_taxarea"],"tax","id","name",
									"inactive=0", "name", true, "default tax area");
			$fields[] = $theinput;

			$theinput = new inputBasicList("default_clienttype",$therecord["default_clienttype"],array("prospect"=>"prospect","client"=>"client"), "default type");
			$fields[] = $theinput;
	
			$theinput = new inputCheckbox("default_hascredit",$therecord["default_hascredit"],"has credit by default");
			$fields[] = $theinput;

			$theinput = new inputCurrency("default_creditlimit", $therecord["default_creditlimit"], "default credit limit");
			$fields[] = $theinput;
			
			$theinput = new inputField("term1_days",$therecord["term1_days"],"term 1 length",false,"integer",4,4);
			$theinput->setAttribute("class","important");
			$fields[] = $theinput;			

			$theinput = new inputField("term1_percentage",$therecord["term1_percentage"],"term 1 percentage",false,"real",4,4);
			$fields[] = $theinput;			

			$theinput = new inputField("term2_days",$therecord["term2_days"],"term 2 length",false,"integer",4,4);
			$theinput->setAttribute("class","important");
			$fields[] = $theinput;			

			$theinput = new inputField("term2_percentage",$therecord["term2_percentage"],"term 2 percentage",false,"real",4,4);
			$fields[] = $theinput;			

			$theinput = new inputField("term3_days",$therecord["term3_days"],"term 3 length",false,"integer",4,4);
			$theinput->setAttribute("class","important");
			$fields[] = $theinput;			

			$theinput = new inputField("term3_percentage",$therecord["term3_percentage"],"term 3 percentage",false,"real",4,4);
			$fields[] = $theinput;			

			return $fields;
		}
		
		function display($theform,$therecord){
?>
<h1 class="newModule">Module: Business Management System</h1>
<fieldset>
	<legend>shipping</legend>
	<p class="notes"><br />
		<strong>Note:</strong> The shipping information below is used when connecting to <br />
		UPS to calculate shipping costs for product.  Current tests show that the UPS <br />
		shipping calculator only works when shipping to and from the Unites States.<br />
	</p>
	
	<p>
		<?php $theform->showField("shipping_markup");?>
		<br />
		<span class="notes"><strong>Note:</strong> Enter the number to multiply the calculated shipping cost. <br />
		For example to mark up shipping costs by 10%, enter 1.1</span>
	</p>
	
	<p>
		<?php $theform->showField("shipping_postalcode");?>
	</p>
</fieldset>
<p class="updateButtonP"><input name="command" type="submit" class="Buttons" value="update settings" /></p>

<fieldset>
	<legend>sales orders</legend>
	<p>
		<label for="invoice_default_printinstruc">default printed instructions</label><br/>
		<textarea id="invoice_default_printinstruc" name="invoice_default_printinstruc" cols="60" rows="3" ><?php echo $therecord["invoice_default_printinstruc"]?></textarea>
	</p>
	<p><?php $theform->showField("default_payment");?></p>

	<p><?php $theform->showField("default_shipping");?></p>

	<p><?php $theform->showField("default_discount");?></p>

	<p><?php $theform->showField("default_taxarea");?></p>
</fieldset>
<p class="updateButtonP"><input name="command" type="submit" class="Buttons" value="update settings" /></p>

<fieldset>
	<legend>clients</legend>
	
	<p><?php echo $theform->showField("default_clienttype");?></p>

	<p><?php echo $theform->showField("default_hascredit");?></p>

	<p><?php echo $theform->showField("default_creditlimit");?></p>

</fieldset>
<p class="updateButtonP"><input name="command" type="submit" class="Buttons" value="update settings" /></p>

<fieldset>
	<legend>Accounts Receivable</legend>
	
	<p><?php echo $theform->showField("term1_days");?> days</p>

	<p><?php echo $theform->showField("term1_percentage");?> %</p>

	<p><?php echo $theform->showField("term2_days");?> days</p>

	<p><?php echo $theform->showField("term2_percentage");?> %</p>

	<p><?php echo $theform->showField("term3_days");?> days</p>

	<p><?php echo $theform->showField("term3_percentage");?> %</p>

</fieldset>
<p class="updateButtonP"><input name="command" type="submit" class="Buttons" value="update settings" /></p>

<?php
		}//end method
	}//end class
?>

{'fraction_non_alphanumeric': 0.1926293539196765, 'fraction_numerical': 0.010293171583494165, 'mean_word_length': 6.249833444370419, 'pattern_counts': {'":': 0, '<': 201, '<?xml version=': 0, '>': 241, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1670956', 'n_tokens_mistral': 3979, 'n_tokens_neox': 3591, 'n_words': 700}