Register changes

This commit is contained in:
SamSys
2025-05-07 22:53:41 +03:30
4 changed files with 58 additions and 33 deletions

View File

@@ -475,7 +475,12 @@ public class TemporaryClientRegistrationApplication : ITemporaryClientRegistrati
var findEndOfMonth = startDate.FindeEndOfMonth();
for (int i = 1; i <= instalmentCount; i++)
{
if (i > 1)
if (i == 1)
{
startDate = (DateTime.Now).ToFarsi();
}
else if (i > 1)
{
var currentMonthStart = ((findEndOfMonth.ToGeorgianDateTime()).AddDays(1)).ToFarsi();
startDate = currentMonthStart.FindeEndOfMonth();

View File

@@ -23,19 +23,30 @@
<div class="footerStep4Container">
<div>
<div class="titleFooter">مدت قرارداد</div>
<div class="radioBtnFooterContainer">
<input type="radio" id="oneMonth" value="oneMonth" name="radMonth" class="radioOption" disabled="disabled"/>
<label for="oneMonth" class="radioLabelListOption disable">1 ماهه</label>
<div class="d-flex align-items-center gap-3 justify-content-between">
<div class="radioBtnFooterContainer">
<input type="radio" id="contractStartCurrentMonthFa" value="contractStartCurrentMonthFa" name="radFinanceContract" class="radioOption" checked="checked" />
<label for="contractStartCurrentMonthFa" class="radioLabelListOption">ابتدای ماه جاری</label>
<input type="radio" id="threeMonth" value="threeMonth" name="radMonth" class="radioOption" disabled="disabled" />
<label for="threeMonth" class="radioLabelListOption disable">3 ماهه</label>
<input type="radio" id="contractStartNextMonthFa" value="contractStartNextMonthFa" name="radFinanceContract" class="radioOption" />
<label for="contractStartNextMonthFa" class="radioLabelListOption">ابتدای ماه بعد</label>
</div>
<input type="radio" id="sixMonth" value="sixMonth" name="radMonth" class="radioOption" disabled="disabled" />
<label for="sixMonth" class="radioLabelListOption disable">6 ماهه</label>
<div class="radioBtnFooterContainer">
<input type="radio" id="oneMonth" value="oneMonth" name="radMonth" class="radioOption" disabled="disabled"/>
<label for="oneMonth" class="radioLabelListOption disable">1 ماهه</label>
<input type="radio" id="twelveMonth" value="twelveMonth" name="radMonth" class="radioOption" checked="checked"/>
<label for="twelveMonth" class="radioLabelListOption">12 ماهه</label>
<input type="radio" id="threeMonth" value="threeMonth" name="radMonth" class="radioOption" disabled="disabled" />
<label for="threeMonth" class="radioLabelListOption disable">3 ماهه</label>
<input type="radio" id="sixMonth" value="sixMonth" name="radMonth" class="radioOption" disabled="disabled" />
<label for="sixMonth" class="radioLabelListOption disable">6 ماهه</label>
<input type="radio" id="twelveMonth" value="twelveMonth" name="radMonth" class="radioOption" checked="checked"/>
<label for="twelveMonth" class="radioLabelListOption">12 ماهه</label>
</div>
</div>
<div class="infoPricesContainerDiv mt-3" id="priceStepContainer" style="display: none">
<div class="infoPricesContainer" id="priceStepContainerHtml">
<div class="item">
@@ -76,15 +87,9 @@
<div class="">
<div class="lineRegisterStep4 px-2 my-2"></div>
<div class="d-block text-center d-md-flex justify-content-between align-items-center gap-5">
<div>
<div class="radioBtnFooterContainer">
<input type="radio" id="contractStartCurrentMonthFa" value="contractStartCurrentMonthFa" name="radFinanceContract" class="radioOption" checked="checked" />
<label for="contractStartCurrentMonthFa" class="radioLabelListOption">اول ماه جاری</label>
<input type="radio" id="contractStartNextMonthFa" value="contractStartNextMonthFa" name="radFinanceContract" class="radioOption" />
<label for="contractStartNextMonthFa" class="radioLabelListOption">آخر ماه بعد</label>
</div>
<div id="ContractStartMonthView" class=""style="text-align: center; margin: 3px auto; font-size: 12px; color: #0B5959;"></div>
<div class="d-block text-start gap-2">
<div class="d-flex align-items-center" style="margin: 3px auto; font-size: 12px; color: #0B5959;"><div style="width:100px;">شروع قرارداد: </div> <span id="ContractStartMonthView"></span></div>
<div class="d-flex align-items-center" style="margin: 3px auto; font-size: 12px; color: #0B5959;"><div style="width:100px;">پایان قرارداد: </div> <span id="contractEndFa"></span></div>
<input type="hidden" id="ContractStartMonthGr" value="" />
</div>
<div>

View File

@@ -1,7 +1,7 @@
var globalPhone = "";
$(document).ready(function() {
$(document).ready(function () {
$("#nationalCode").mask("0000000000");
$(document).on('input', "#nationalCode", function () {
let value = $(this).val();
@@ -30,10 +30,16 @@ $(document).ready(function() {
});
new Cleave(this, {
date: true,
delimiter: '/',
datePattern: ['Y', 'm', 'd']
delimiters: ['/', '/'],
blocks: [4, 2, 2],
numericOnly: true
});
//new Cleave(this, {
// date: true,
// delimiter: '/',
// datePattern: ['Y', 'm', 'd']
//});
});
});
@@ -97,7 +103,7 @@ async function checkInputsStep1() {
$('#fatherName').val(response.data.fatherName);
$('#nationalNumber').val(response.data.idNumber);
globalPhone = response.data.phone;
// The State and City
$('#state').select2();
$('#state').val(response.data.state).trigger('change');

View File

@@ -113,14 +113,14 @@ async function totalPaymentAndWorkshopList() {
var financeContract = "";
switch (selectedRadFinanceContract) {
case 'currentMonth':
case 'contractStartCurrentMonthFa':
financeContract = 'currentMonth';
break;
case 'nextMonth':
case 'contractStartNextMonthFa':
financeContract = 'nextMonth';
break;
}
ajax.get(totalPaymentAndWorkshopListUrl,
{
contractingPartyTempId: parseInt($('#contractPartyId').val()) || 0,
@@ -128,7 +128,7 @@ async function totalPaymentAndWorkshopList() {
contractStartType: financeContract
})
.then(response => {
// console.log(response.data);
//console.log(response.data);
if (hasPriceStatic) {
$(`#sumOfWorkshopsPaymentPayment`).text(response.data.oneTimeWithoutTaxPaymentStr + " ریال");
@@ -167,11 +167,20 @@ async function totalPaymentAndWorkshopList() {
});
}
$('#ContractStartMonthView').text(
$('#contractStartCurrentMonthFa').prop('checked')
? response.data.contractStartCurrentMonthFa
: response.data.contractStartNextMonthFa
);
$('#ContractStartMonthView').text(response.data.contractStartCurrentMonthFa);
$('#contractEndFa').text(response.data.contractEndFa);
//$('#ContractStartMonthView').text(
// $('#contractStartCurrentMonthFa').prop('checked')
// ? response.data.contractStartCurrentMonthFa
// : response.data.contractStartNextMonthFa
//);
//
//$('#ContractStartNextMonthView').text(
// $('#contractStartNextMonthFa').prop('checked')
// ? response.data.contractStartCurrentMonthFa
// : response.data.contractStartNextMonthFa
//);
$('#ContractStartMonthGr').val(
$('#contractStartCurrentMonthFa').prop('checked')