Submit social housing lettings and sales data (CORE)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1996 lines
55 KiB

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Module: Validations::Sales::SoftValidations
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../../css/style.css" type="text/css" />
<link rel="stylesheet" href="../../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "Validations::Sales::SoftValidations";
relpath = '../../';
</script>
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../../class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../../_index.html">Index (S)</a> &raquo;
<span class='title'>Validations</span> &raquo; <span class='title'>Sales</span>
&raquo;
<span class="title">SoftValidations</span>
</div>
<div id="search">
<a class="full_list_link" id="class_list_link"
href="../../class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Module: Validations::Sales::SoftValidations
</h1>
<div class="box_info">
<dl>
<dt>Includes:</dt>
<dd>SaleInformationValidations</dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>sales/soft_validations.rb</dd>
</dl>
</div>
<h2>
Constant Summary
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
</h2>
<dl class="constants">
<dt id="ALLOWED_INCOME_RANGES_SALES-constant" class="">ALLOWED_INCOME_RANGES_SALES =
</dt>
<dd><pre class="code"><span class='lbrace'>{</span>
<span class='int'>1</span> <span class='op'>=&gt;</span> <span class='const'>OpenStruct</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>soft_min:</span> <span class='int'>5000</span><span class='rparen'>)</span><span class='comma'>,</span>
<span class='int'>2</span> <span class='op'>=&gt;</span> <span class='const'>OpenStruct</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>soft_min:</span> <span class='int'>1500</span><span class='rparen'>)</span><span class='comma'>,</span>
<span class='int'>3</span> <span class='op'>=&gt;</span> <span class='const'>OpenStruct</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>soft_min:</span> <span class='int'>1000</span><span class='rparen'>)</span><span class='comma'>,</span>
<span class='int'>5</span> <span class='op'>=&gt;</span> <span class='const'>OpenStruct</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>soft_min:</span> <span class='int'>2000</span><span class='rparen'>)</span><span class='comma'>,</span>
<span class='int'>0</span> <span class='op'>=&gt;</span> <span class='const'>OpenStruct</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>soft_min:</span> <span class='int'>2000</span><span class='rparen'>)</span><span class='comma'>,</span>
<span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
</dl>
<h2>
Instance Method Summary
<small><a href="#" class="summary_toggle">collapse</a></small>
</h2>
<ul class="summary">
<li class="public ">
<span class="summary_signature">
<a href="#buyer1_livein_wrong_for_ownership_type%3F-instance_method" title="#buyer1_livein_wrong_for_ownership_type? (instance method)">#<strong>buyer1_livein_wrong_for_ownership_type?</strong> &#x21d2; Boolean </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#buyer2_livein_wrong_for_ownership_type%3F-instance_method" title="#buyer2_livein_wrong_for_ownership_type? (instance method)">#<strong>buyer2_livein_wrong_for_ownership_type?</strong> &#x21d2; Boolean </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#combined_income_over_soft_max%3F-instance_method" title="#combined_income_over_soft_max? (instance method)">#<strong>combined_income_over_soft_max?</strong> &#x21d2; Boolean </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#deposit_over_soft_max%3F-instance_method" title="#deposit_over_soft_max? (instance method)">#<strong>deposit_over_soft_max?</strong> &#x21d2; Boolean </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#discounted_ownership_value_invalid%3F-instance_method" title="#discounted_ownership_value_invalid? (instance method)">#<strong>discounted_ownership_value_invalid?</strong> &#x21d2; Boolean </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#extra_borrowing_expected_but_not_reported%3F-instance_method" title="#extra_borrowing_expected_but_not_reported? (instance method)">#<strong>extra_borrowing_expected_but_not_reported?</strong> &#x21d2; Boolean </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#grant_outside_common_range%3F-instance_method" title="#grant_outside_common_range? (instance method)">#<strong>grant_outside_common_range?</strong> &#x21d2; Boolean </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#hodate_3_years_or_more_saledate%3F-instance_method" title="#hodate_3_years_or_more_saledate? (instance method)">#<strong>hodate_3_years_or_more_saledate?</strong> &#x21d2; Boolean </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#income1_over_soft_max%3F-instance_method" title="#income1_over_soft_max? (instance method)">#<strong>income1_over_soft_max?</strong> &#x21d2; Boolean </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#income1_under_soft_min%3F-instance_method" title="#income1_under_soft_min? (instance method)">#<strong>income1_under_soft_min?</strong> &#x21d2; Boolean </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#income2_over_soft_max%3F-instance_method" title="#income2_over_soft_max? (instance method)">#<strong>income2_over_soft_max?</strong> &#x21d2; Boolean </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#income2_under_soft_min%3F-instance_method" title="#income2_under_soft_min? (instance method)">#<strong>income2_under_soft_min?</strong> &#x21d2; Boolean </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#monthly_charges_over_soft_max%3F-instance_method" title="#monthly_charges_over_soft_max? (instance method)">#<strong>monthly_charges_over_soft_max?</strong> &#x21d2; Boolean </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#mortgage_over_soft_max%3F-instance_method" title="#mortgage_over_soft_max? (instance method)">#<strong>mortgage_over_soft_max?</strong> &#x21d2; Boolean </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#mortgage_plus_deposit_less_than_discounted_value%3F-instance_method" title="#mortgage_plus_deposit_less_than_discounted_value? (instance method)">#<strong>mortgage_plus_deposit_less_than_discounted_value?</strong> &#x21d2; Boolean </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#percentage_discount_invalid%3F-instance_method" title="#percentage_discount_invalid? (instance method)">#<strong>percentage_discount_invalid?</strong> &#x21d2; Boolean </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#purchase_price_higher_or_lower_text-instance_method" title="#purchase_price_higher_or_lower_text (instance method)">#<strong>purchase_price_higher_or_lower_text</strong> &#x21d2; Object </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#purchase_price_out_of_soft_range%3F-instance_method" title="#purchase_price_out_of_soft_range? (instance method)">#<strong>purchase_price_out_of_soft_range?</strong> &#x21d2; Boolean </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#purchase_price_soft_min_or_soft_max-instance_method" title="#purchase_price_soft_min_or_soft_max (instance method)">#<strong>purchase_price_soft_min_or_soft_max</strong> &#x21d2; Object </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#savings_over_soft_max%3F-instance_method" title="#savings_over_soft_max? (instance method)">#<strong>savings_over_soft_max?</strong> &#x21d2; Boolean </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#shared_ownership_deposit_invalid%3F-instance_method" title="#shared_ownership_deposit_invalid? (instance method)">#<strong>shared_ownership_deposit_invalid?</strong> &#x21d2; Boolean </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#staircase_bought_above_fifty%3F-instance_method" title="#staircase_bought_above_fifty? (instance method)">#<strong>staircase_bought_above_fifty?</strong> &#x21d2; Boolean </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#staircase_owned_out_of_soft_range%3F-instance_method" title="#staircase_owned_out_of_soft_range? (instance method)">#<strong>staircase_owned_out_of_soft_range?</strong> &#x21d2; Boolean </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#wheelchair_when_not_disabled%3F-instance_method" title="#wheelchair_when_not_disabled? (instance method)">#<strong>wheelchair_when_not_disabled?</strong> &#x21d2; Boolean </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
</ul>
<div id="instance_method_details" class="method_details_list">
<h2>Instance Method Details</h2>
<div class="method_details first">
<h3 class="signature first" id="buyer1_livein_wrong_for_ownership_type?-instance_method">
#<strong>buyer1_livein_wrong_for_ownership_type?</strong> &#x21d2; <tt>Boolean</tt>
</h3><div class="docstring">
<div class="discussion">
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
152
153
154
155
156</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'sales/soft_validations.rb', line 152</span>
<span class='kw'>def</span> <span class='id identifier rubyid_buyer1_livein_wrong_for_ownership_type?'>buyer1_livein_wrong_for_ownership_type?</span>
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_ownershipsch'>ownershipsch</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_buy1livein'>buy1livein</span>
<span class='lparen'>(</span><span class='id identifier rubyid_discounted_ownership_sale?'>discounted_ownership_sale?</span> <span class='op'>||</span> <span class='id identifier rubyid_shared_ownership_scheme?'>shared_ownership_scheme?</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_buy1livein'>buy1livein</span> <span class='op'>==</span> <span class='int'>2</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="buyer2_livein_wrong_for_ownership_type?-instance_method">
#<strong>buyer2_livein_wrong_for_ownership_type?</strong> &#x21d2; <tt>Boolean</tt>
</h3><div class="docstring">
<div class="discussion">
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
158
159
160
161
162
163</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'sales/soft_validations.rb', line 158</span>
<span class='kw'>def</span> <span class='id identifier rubyid_buyer2_livein_wrong_for_ownership_type?'>buyer2_livein_wrong_for_ownership_type?</span>
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_ownershipsch'>ownershipsch</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_buy2livein'>buy2livein</span>
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_joint_purchase?'>joint_purchase?</span>
<span class='lparen'>(</span><span class='id identifier rubyid_discounted_ownership_sale?'>discounted_ownership_sale?</span> <span class='op'>||</span> <span class='id identifier rubyid_shared_ownership_scheme?'>shared_ownership_scheme?</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_buy2livein'>buy2livein</span> <span class='op'>==</span> <span class='int'>2</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="combined_income_over_soft_max?-instance_method">
#<strong>combined_income_over_soft_max?</strong> &#x21d2; <tt>Boolean</tt>
</h3><div class="docstring">
<div class="discussion">
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
36
37
38
39
40</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'sales/soft_validations.rb', line 36</span>
<span class='kw'>def</span> <span class='id identifier rubyid_combined_income_over_soft_max?'>combined_income_over_soft_max?</span>
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_income1'>income1</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_income2'>income2</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_la'>la</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_discounted_ownership_sale?'>discounted_ownership_sale?</span>
<span class='id identifier rubyid_income_over_soft_max?'>income_over_soft_max?</span><span class='lparen'>(</span><span class='id identifier rubyid_income1'>income1</span> <span class='op'>+</span> <span class='id identifier rubyid_income2'>income2</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="deposit_over_soft_max?-instance_method">
#<strong>deposit_over_soft_max?</strong> &#x21d2; <tt>Boolean</tt>
</h3><div class="docstring">
<div class="discussion">
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
64
65
66
67
68</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'sales/soft_validations.rb', line 64</span>
<span class='kw'>def</span> <span class='id identifier rubyid_deposit_over_soft_max?'>deposit_over_soft_max?</span>
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_savings'>savings</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_deposit'>deposit</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_mortgage_used?'>mortgage_used?</span>
<span class='id identifier rubyid_deposit'>deposit</span> <span class='op'>&gt;</span> <span class='id identifier rubyid_savings'>savings</span> <span class='op'>*</span> <span class='int'>4</span> <span class='op'>/</span> <span class='int'>3</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="discounted_ownership_value_invalid?-instance_method">
#<strong>discounted_ownership_value_invalid?</strong> &#x21d2; <tt>Boolean</tt>
</h3><div class="docstring">
<div class="discussion">
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
143
144
145
146
147
148
149
150</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'sales/soft_validations.rb', line 143</span>
<span class='kw'>def</span> <span class='id identifier rubyid_discounted_ownership_value_invalid?'>discounted_ownership_value_invalid?</span>
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_saledate'>saledate</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_collection_start_year'>collection_start_year</span> <span class='op'>&lt;=</span> <span class='int'>2023</span>
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_value'>value</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_deposit'>deposit</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_ownershipsch'>ownershipsch</span>
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_mortgage'>mortgage</span> <span class='op'>||</span> <span class='id identifier rubyid_mortgageused'>mortgageused</span> <span class='op'>==</span> <span class='int'>2</span> <span class='op'>||</span> <span class='id identifier rubyid_mortgageused'>mortgageused</span> <span class='op'>==</span> <span class='int'>3</span>
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_discount'>discount</span> <span class='op'>||</span> <span class='id identifier rubyid_grant'>grant</span> <span class='op'>||</span> <span class='id identifier rubyid_type'>type</span> <span class='op'>==</span> <span class='int'>29</span>
<span class='id identifier rubyid_mortgage_deposit_and_grant_total'>mortgage_deposit_and_grant_total</span> <span class='op'>!=</span> <span class='id identifier rubyid_value_with_discount'>value_with_discount</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_discounted_ownership_sale?'>discounted_ownership_sale?</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="extra_borrowing_expected_but_not_reported?-instance_method">
#<strong>extra_borrowing_expected_but_not_reported?</strong> &#x21d2; <tt>Boolean</tt>
</h3><div class="docstring">
<div class="discussion">
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
70
71
72
73
74</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'sales/soft_validations.rb', line 70</span>
<span class='kw'>def</span> <span class='id identifier rubyid_extra_borrowing_expected_but_not_reported?'>extra_borrowing_expected_but_not_reported?</span>
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_extrabor'>extrabor</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_mortgage'>mortgage</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_deposit'>deposit</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_value'>value</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_discount'>discount</span>
<span class='id identifier rubyid_extrabor'>extrabor</span> <span class='op'>!=</span> <span class='int'>1</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_mortgage'>mortgage</span> <span class='op'>+</span> <span class='id identifier rubyid_deposit'>deposit</span> <span class='op'>&gt;</span> <span class='id identifier rubyid_value'>value</span> <span class='op'>-</span> <span class='id identifier rubyid_value'>value</span> <span class='op'>*</span> <span class='id identifier rubyid_discount'>discount</span> <span class='op'>/</span> <span class='int'>100</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="grant_outside_common_range?-instance_method">
#<strong>grant_outside_common_range?</strong> &#x21d2; <tt>Boolean</tt>
</h3><div class="docstring">
<div class="discussion">
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
118
119
120
121
122
123</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'sales/soft_validations.rb', line 118</span>
<span class='kw'>def</span> <span class='id identifier rubyid_grant_outside_common_range?'>grant_outside_common_range?</span>
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_grant'>grant</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_type'>type</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_saledate'>saledate</span>
<span class='kw'>return</span> <span class='kw'>if</span> <span class='id identifier rubyid_form'>form</span><span class='period'>.</span><span class='id identifier rubyid_start_year_after_2024?'>start_year_after_2024?</span> <span class='op'>&amp;&amp;</span> <span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span> <span class='op'>==</span> <span class='int'>21</span> <span class='op'>||</span> <span class='id identifier rubyid_type'>type</span> <span class='op'>==</span> <span class='int'>8</span><span class='rparen'>)</span>
<span class='op'>!</span><span class='id identifier rubyid_grant'>grant</span><span class='period'>.</span><span class='id identifier rubyid_between?'>between?</span><span class='lparen'>(</span><span class='int'>9_000</span><span class='comma'>,</span> <span class='int'>16_000</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="hodate_3_years_or_more_saledate?-instance_method">
#<strong>hodate_3_years_or_more_saledate?</strong> &#x21d2; <tt>Boolean</tt>
</h3><div class="docstring">
<div class="discussion">
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
104
105
106
107
108</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'sales/soft_validations.rb', line 104</span>
<span class='kw'>def</span> <span class='id identifier rubyid_hodate_3_years_or_more_saledate?'>hodate_3_years_or_more_saledate?</span>
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_hodate'>hodate</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_saledate'>saledate</span>
<span class='id identifier rubyid_saledate'>saledate</span> <span class='op'>-</span> <span class='id identifier rubyid_hodate'>hodate</span> <span class='op'>&gt;=</span> <span class='int'>3</span><span class='period'>.</span><span class='id identifier rubyid_years'>years</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="income1_over_soft_max?-instance_method">
#<strong>income1_over_soft_max?</strong> &#x21d2; <tt>Boolean</tt>
</h3><div class="docstring">
<div class="discussion">
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
24
25
26
27
28</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'sales/soft_validations.rb', line 24</span>
<span class='kw'>def</span> <span class='id identifier rubyid_income1_over_soft_max?'>income1_over_soft_max?</span>
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_income1'>income1</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_la'>la</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_discounted_ownership_sale?'>discounted_ownership_sale?</span>
<span class='id identifier rubyid_income_over_soft_max?'>income_over_soft_max?</span><span class='lparen'>(</span><span class='id identifier rubyid_income1'>income1</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="income1_under_soft_min?-instance_method">
#<strong>income1_under_soft_min?</strong> &#x21d2; <tt>Boolean</tt>
</h3><div class="docstring">
<div class="discussion">
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
12
13
14
15
16</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'sales/soft_validations.rb', line 12</span>
<span class='kw'>def</span> <span class='id identifier rubyid_income1_under_soft_min?'>income1_under_soft_min?</span>
<span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>unless</span> <span class='id identifier rubyid_ecstat1'>ecstat1</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_income1'>income1</span> <span class='op'>&amp;&amp;</span> <span class='const'><span class='object_link'><a href="#ALLOWED_INCOME_RANGES_SALES-constant" title="Validations::Sales::SoftValidations::ALLOWED_INCOME_RANGES_SALES (constant)">ALLOWED_INCOME_RANGES_SALES</a></span></span><span class='lbracket'>[</span><span class='id identifier rubyid_ecstat1'>ecstat1</span><span class='rbracket'>]</span>
<span class='id identifier rubyid_income1'>income1</span> <span class='op'>&lt;</span> <span class='const'><span class='object_link'><a href="#ALLOWED_INCOME_RANGES_SALES-constant" title="Validations::Sales::SoftValidations::ALLOWED_INCOME_RANGES_SALES (constant)">ALLOWED_INCOME_RANGES_SALES</a></span></span><span class='lbracket'>[</span><span class='id identifier rubyid_ecstat1'>ecstat1</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='symbol'>:soft_min</span><span class='rbracket'>]</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="income2_over_soft_max?-instance_method">
#<strong>income2_over_soft_max?</strong> &#x21d2; <tt>Boolean</tt>
</h3><div class="docstring">
<div class="discussion">
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
30
31
32
33
34</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'sales/soft_validations.rb', line 30</span>
<span class='kw'>def</span> <span class='id identifier rubyid_income2_over_soft_max?'>income2_over_soft_max?</span>
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_income2'>income2</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_la'>la</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_discounted_ownership_sale?'>discounted_ownership_sale?</span>
<span class='id identifier rubyid_income_over_soft_max?'>income_over_soft_max?</span><span class='lparen'>(</span><span class='id identifier rubyid_income2'>income2</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="income2_under_soft_min?-instance_method">
#<strong>income2_under_soft_min?</strong> &#x21d2; <tt>Boolean</tt>
</h3><div class="docstring">
<div class="discussion">
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
18
19
20
21
22</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'sales/soft_validations.rb', line 18</span>
<span class='kw'>def</span> <span class='id identifier rubyid_income2_under_soft_min?'>income2_under_soft_min?</span>
<span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>unless</span> <span class='id identifier rubyid_ecstat2'>ecstat2</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_income2'>income2</span> <span class='op'>&amp;&amp;</span> <span class='const'><span class='object_link'><a href="#ALLOWED_INCOME_RANGES_SALES-constant" title="Validations::Sales::SoftValidations::ALLOWED_INCOME_RANGES_SALES (constant)">ALLOWED_INCOME_RANGES_SALES</a></span></span><span class='lbracket'>[</span><span class='id identifier rubyid_ecstat2'>ecstat2</span><span class='rbracket'>]</span>
<span class='id identifier rubyid_income2'>income2</span> <span class='op'>&lt;</span> <span class='const'><span class='object_link'><a href="#ALLOWED_INCOME_RANGES_SALES-constant" title="Validations::Sales::SoftValidations::ALLOWED_INCOME_RANGES_SALES (constant)">ALLOWED_INCOME_RANGES_SALES</a></span></span><span class='lbracket'>[</span><span class='id identifier rubyid_ecstat2'>ecstat2</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='symbol'>:soft_min</span><span class='rbracket'>]</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="monthly_charges_over_soft_max?-instance_method">
#<strong>monthly_charges_over_soft_max?</strong> &#x21d2; <tt>Boolean</tt>
</h3><div class="docstring">
<div class="discussion">
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
125
126
127
128
129
130</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'sales/soft_validations.rb', line 125</span>
<span class='kw'>def</span> <span class='id identifier rubyid_monthly_charges_over_soft_max?'>monthly_charges_over_soft_max?</span>
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_type'>type</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_mscharge'>mscharge</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_proptype'>proptype</span>
<span class='id identifier rubyid_soft_max'>soft_max</span> <span class='op'>=</span> <span class='id identifier rubyid_old_persons_shared_ownership?'>old_persons_shared_ownership?</span> <span class='op'>?</span> <span class='int'>550</span> <span class='op'>:</span> <span class='int'>300</span>
<span class='id identifier rubyid_mscharge'>mscharge</span> <span class='op'>&gt;</span> <span class='id identifier rubyid_soft_max'>soft_max</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="mortgage_over_soft_max?-instance_method">
#<strong>mortgage_over_soft_max?</strong> &#x21d2; <tt>Boolean</tt>
</h3><div class="docstring">
<div class="discussion">
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
46
47
48
49
50
51
52</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'sales/soft_validations.rb', line 46</span>
<span class='kw'>def</span> <span class='id identifier rubyid_mortgage_over_soft_max?'>mortgage_over_soft_max?</span>
<span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>unless</span> <span class='id identifier rubyid_mortgage'>mortgage</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_inc1mort'>inc1mort</span> <span class='op'>&amp;&amp;</span> <span class='lparen'>(</span><span class='id identifier rubyid_inc2mort'>inc2mort</span> <span class='op'>||</span> <span class='id identifier rubyid_not_joint_purchase?'>not_joint_purchase?</span><span class='rparen'>)</span>
<span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>if</span> <span class='id identifier rubyid_income1_used_for_mortgage?'>income1_used_for_mortgage?</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_income1'>income1</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span> <span class='op'>||</span> <span class='id identifier rubyid_income2_used_for_mortgage?'>income2_used_for_mortgage?</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_income2'>income2</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
<span class='id identifier rubyid_income_used_for_mortgage'>income_used_for_mortgage</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_income1_used_for_mortgage?'>income1_used_for_mortgage?</span> <span class='op'>?</span> <span class='id identifier rubyid_income1'>income1</span> <span class='op'>:</span> <span class='int'>0</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='lparen'>(</span><span class='id identifier rubyid_income2_used_for_mortgage?'>income2_used_for_mortgage?</span> <span class='op'>?</span> <span class='id identifier rubyid_income2'>income2</span> <span class='op'>:</span> <span class='int'>0</span><span class='rparen'>)</span>
<span class='id identifier rubyid_mortgage'>mortgage</span> <span class='op'>&gt;</span> <span class='id identifier rubyid_income_used_for_mortgage'>income_used_for_mortgage</span> <span class='op'>*</span> <span class='int'>5</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="mortgage_plus_deposit_less_than_discounted_value?-instance_method">
#<strong>mortgage_plus_deposit_less_than_discounted_value?</strong> &#x21d2; <tt>Boolean</tt>
</h3><div class="docstring">
<div class="discussion">
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
97
98
99
100
101
102</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'sales/soft_validations.rb', line 97</span>
<span class='kw'>def</span> <span class='id identifier rubyid_mortgage_plus_deposit_less_than_discounted_value?'>mortgage_plus_deposit_less_than_discounted_value?</span>
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_mortgage'>mortgage</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_deposit'>deposit</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_value'>value</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_discount'>discount</span>
<span class='id identifier rubyid_discounted_value'>discounted_value</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span> <span class='op'>*</span> <span class='lparen'>(</span><span class='int'>100</span> <span class='op'>-</span> <span class='id identifier rubyid_discount'>discount</span><span class='rparen'>)</span> <span class='op'>/</span> <span class='int'>100</span>
<span class='id identifier rubyid_mortgage'>mortgage</span> <span class='op'>+</span> <span class='id identifier rubyid_deposit'>deposit</span> <span class='op'>&lt;</span> <span class='id identifier rubyid_discounted_value'>discounted_value</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="percentage_discount_invalid?-instance_method">
#<strong>percentage_discount_invalid?</strong> &#x21d2; <tt>Boolean</tt>
</h3><div class="docstring">
<div class="discussion">
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
165
166
167
168
169
170
171
172
173
174</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'sales/soft_validations.rb', line 165</span>
<span class='kw'>def</span> <span class='id identifier rubyid_percentage_discount_invalid?'>percentage_discount_invalid?</span>
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_discount'>discount</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_proptype'>proptype</span>
<span class='kw'>case</span> <span class='id identifier rubyid_proptype'>proptype</span>
<span class='kw'>when</span> <span class='int'>1</span><span class='comma'>,</span> <span class='int'>2</span>
<span class='id identifier rubyid_discount'>discount</span> <span class='op'>&gt;</span> <span class='int'>50</span>
<span class='kw'>when</span> <span class='int'>3</span><span class='comma'>,</span> <span class='int'>4</span><span class='comma'>,</span> <span class='int'>9</span>
<span class='id identifier rubyid_discount'>discount</span> <span class='op'>&gt;</span> <span class='int'>35</span>
<span class='kw'>end</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="purchase_price_higher_or_lower_text-instance_method">
#<strong>purchase_price_higher_or_lower_text</strong> &#x21d2; <tt>Object</tt>
</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
110
111
112</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'sales/soft_validations.rb', line 110</span>
<span class='kw'>def</span> <span class='id identifier rubyid_purchase_price_higher_or_lower_text'>purchase_price_higher_or_lower_text</span>
<span class='id identifier rubyid_value'>value</span> <span class='op'>&lt;</span> <span class='id identifier rubyid_sale_range'>sale_range</span><span class='period'>.</span><span class='id identifier rubyid_soft_min'>soft_min</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>lower</span><span class='tstring_end'>&quot;</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>higher</span><span class='tstring_end'>&quot;</span></span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="purchase_price_out_of_soft_range?-instance_method">
#<strong>purchase_price_out_of_soft_range?</strong> &#x21d2; <tt>Boolean</tt>
</h3><div class="docstring">
<div class="discussion">
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
76
77
78
79
80</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'sales/soft_validations.rb', line 76</span>
<span class='kw'>def</span> <span class='id identifier rubyid_purchase_price_out_of_soft_range?'>purchase_price_out_of_soft_range?</span>
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_value'>value</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_beds'>beds</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_la'>la</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_sale_range'>sale_range</span>
<span class='op'>!</span><span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_between?'>between?</span><span class='lparen'>(</span><span class='id identifier rubyid_sale_range'>sale_range</span><span class='period'>.</span><span class='id identifier rubyid_soft_min'>soft_min</span><span class='comma'>,</span> <span class='id identifier rubyid_sale_range'>sale_range</span><span class='period'>.</span><span class='id identifier rubyid_soft_max'>soft_max</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="purchase_price_soft_min_or_soft_max-instance_method">
#<strong>purchase_price_soft_min_or_soft_max</strong> &#x21d2; <tt>Object</tt>
</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
114
115
116</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'sales/soft_validations.rb', line 114</span>
<span class='kw'>def</span> <span class='id identifier rubyid_purchase_price_soft_min_or_soft_max'>purchase_price_soft_min_or_soft_max</span>
<span class='id identifier rubyid_value'>value</span> <span class='op'>&lt;</span> <span class='id identifier rubyid_sale_range'>sale_range</span><span class='period'>.</span><span class='id identifier rubyid_soft_min'>soft_min</span> <span class='op'>?</span> <span class='id identifier rubyid_sale_range'>sale_range</span><span class='period'>.</span><span class='id identifier rubyid_soft_min'>soft_min</span> <span class='op'>:</span> <span class='id identifier rubyid_sale_range'>sale_range</span><span class='period'>.</span><span class='id identifier rubyid_soft_max'>soft_max</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="savings_over_soft_max?-instance_method">
#<strong>savings_over_soft_max?</strong> &#x21d2; <tt>Boolean</tt>
</h3><div class="docstring">
<div class="discussion">
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
60
61
62</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'sales/soft_validations.rb', line 60</span>
<span class='kw'>def</span> <span class='id identifier rubyid_savings_over_soft_max?'>savings_over_soft_max?</span>
<span class='id identifier rubyid_savings'>savings</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_savings'>savings</span> <span class='op'>&gt;</span> <span class='int'>100_000</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="shared_ownership_deposit_invalid?-instance_method">
#<strong>shared_ownership_deposit_invalid?</strong> &#x21d2; <tt>Boolean</tt>
</h3><div class="docstring">
<div class="discussion">
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
88
89
90
91
92
93
94
95</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'sales/soft_validations.rb', line 88</span>
<span class='kw'>def</span> <span class='id identifier rubyid_shared_ownership_deposit_invalid?'>shared_ownership_deposit_invalid?</span>
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_saledate'>saledate</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_collection_start_year'>collection_start_year</span> <span class='op'>&lt;=</span> <span class='int'>2023</span>
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_mortgage'>mortgage</span> <span class='op'>||</span> <span class='id identifier rubyid_mortgageused'>mortgageused</span> <span class='op'>==</span> <span class='int'>2</span> <span class='op'>||</span> <span class='id identifier rubyid_mortgageused'>mortgageused</span> <span class='op'>==</span> <span class='int'>3</span>
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_cashdis'>cashdis</span> <span class='op'>||</span> <span class='op'>!</span><span class='id identifier rubyid_social_homebuy?'>social_homebuy?</span>
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_deposit'>deposit</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_value'>value</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_equity'>equity</span>
<span class='id identifier rubyid_over_tolerance?'>over_tolerance?</span><span class='lparen'>(</span><span class='id identifier rubyid_mortgage_deposit_and_discount_total'>mortgage_deposit_and_discount_total</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span> <span class='op'>*</span> <span class='id identifier rubyid_equity'>equity</span> <span class='op'>/</span> <span class='int'>100</span><span class='comma'>,</span> <span class='int'>1</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="staircase_bought_above_fifty?-instance_method">
#<strong>staircase_bought_above_fifty?</strong> &#x21d2; <tt>Boolean</tt>
</h3><div class="docstring">
<div class="discussion">
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
42
43
44</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'sales/soft_validations.rb', line 42</span>
<span class='kw'>def</span> <span class='id identifier rubyid_staircase_bought_above_fifty?'>staircase_bought_above_fifty?</span>
<span class='id identifier rubyid_stairbought'>stairbought</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_stairbought'>stairbought</span> <span class='op'>&gt;</span> <span class='int'>50</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="staircase_owned_out_of_soft_range?-instance_method">
#<strong>staircase_owned_out_of_soft_range?</strong> &#x21d2; <tt>Boolean</tt>
</h3><div class="docstring">
<div class="discussion">
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
82
83
84
85
86</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'sales/soft_validations.rb', line 82</span>
<span class='kw'>def</span> <span class='id identifier rubyid_staircase_owned_out_of_soft_range?'>staircase_owned_out_of_soft_range?</span>
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_type'>type</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_stairowned'>stairowned</span>
<span class='id identifier rubyid_type'>type</span> <span class='op'>==</span> <span class='int'>24</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_stairowned'>stairowned</span><span class='period'>.</span><span class='id identifier rubyid_between?'>between?</span><span class='lparen'>(</span><span class='int'>76</span><span class='comma'>,</span> <span class='int'>100</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="wheelchair_when_not_disabled?-instance_method">
#<strong>wheelchair_when_not_disabled?</strong> &#x21d2; <tt>Boolean</tt>
</h3><div class="docstring">
<div class="discussion">
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
54
55
56
57
58</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'sales/soft_validations.rb', line 54</span>
<span class='kw'>def</span> <span class='id identifier rubyid_wheelchair_when_not_disabled?'>wheelchair_when_not_disabled?</span>
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_disabled'>disabled</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_wheel'>wheel</span>
<span class='id identifier rubyid_wheel'>wheel</span> <span class='op'>==</span> <span class='int'>1</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_disabled'>disabled</span> <span class='op'>==</span> <span class='int'>2</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated on Thu Apr 18 11:36:47 2024 by
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.36 (ruby-3.1.4).
</div>
</div>
</body>
</html>