ADD EV3-431 Profitcenter - betűkód phase2/2 add hasCusetomer code switch to supplier administration

This commit is contained in:
E98Developer 2026-08-09 10:46:46 +02:00
parent 41758a81c4
commit 1f1254c818
3 changed files with 24 additions and 14 deletions

View File

@ -102,6 +102,12 @@ private function getSupplierDataFromRequest(Request $request)
$data[$key] = $request->get($key);
}
$data['status'] = DbStatusFieldEnum::active;
// A hasCustomerCode mező csak akkor jelenik meg a formon, ha a SupplierCustomerCode
// feature flag aktív - ilyenkor nem szabad null-t írni a NOT NULL boolean oszlopba.
if ($request->has('hasCustomerCode')) {
$data['hasCustomerCode'] = $request->boolean('hasCustomerCode');
}
if ($contactId = $request->get('contactId')) {
$data['contactId'] = $contactId;
} else {

View File

@ -18,6 +18,9 @@ if(typeof Supplier==='undefined'){
if(typeof this.hasDeliveryConstraint ==="undefined"){
this.hasDeliveryConstraint=0;
}
if(typeof this.hasCustomerCode ==="undefined"){
this.hasCustomerCode=0;
}
if(typeof this.orderCutOffTime ==="undefined"){
this.orderCutOffTime=12;
}
@ -229,6 +232,7 @@ window.SupplierAdmin=function (options,SupplierItem) {
$(CSSSelectorForm+' *[data-toggle=canSeeInOrder][data-title='+root.Supplier.canSeeInOrder+']').click();
$(CSSSelectorForm+' *[data-toggle=hooreycaDataActive][data-title='+root.Supplier.hooreycaDataActive+']').click();
$(CSSSelectorForm+' *[data-toggle=hasDeliveryConstraint][data-title='+root.Supplier.hasDeliveryConstraint+']').click();
$(CSSSelectorForm+' *[data-toggle=hasCustomerCode][data-title='+root.Supplier.hasCustomerCode+']').click();
$(CSSSelectorForm+' input[name=orderCutOffTime]').val(root.Supplier.orderCutOffTime);
$(CSSSelectorForm+' select[name=deliveryLeadTime]').val(root.Supplier.deliveryLeadTime);
let productGroup=[];

View File

@ -350,6 +350,20 @@ class="form-control" id="openHours"
</div>
</div>
@feature('SupplierCustomerCode')
<div class="form-group row">
<label for="hasCustomerCode" class="col-sm-2 col-form-label">Vevőkód funkció:</label>
<div class="col-sm-10">
<div class="input-group">
<div class="btn-group customRadioBtnGroup">
<a class="btn btn-primary btn-sm notActive" data-toggle="hasCustomerCode" data-title="1">Igen</a>
<a class="btn btn-primary btn-sm active" data-toggle="hasCustomerCode" data-title="0">Nem</a>
</div>
<input type="hidden" name="hasCustomerCode" value="0">
</div>
</div>
</div>
@endfeature
<div class="form-group row">
<label for="hasDeliveryConstraint" class="col-sm-2 col-form-label">Szállítási korlátozások:</label>
<div class="col-sm-10">
@ -380,20 +394,6 @@ class="form-control" id="openHours"
</select>
</div>
</div>
@feature('SupplierCustomerCode')
<div class="form-group row">
<label for="hasCustomerCode" class="col-sm-2 col-form-label">Vevőkód funkció:</label>
<div class="col-sm-10">
<div class="input-group">
<div class="btn-group customRadioBtnGroup">
<a class="btn btn-primary btn-sm notActive" data-toggle="hasCustomerCode" data-title="1">Igen</a>
<a class="btn btn-primary btn-sm active" data-toggle="hasCustomerCode" data-title="0">Nem</a>
</div>
<input type="hidden" name="hasCustomerCode" value="0">
</div>
</div>
</div>
@endfeature
{{-- <div class="form-group row">
<label for="hooreycaDataActive" class="col-sm-2 col-form-label">Hooreyca adatátadás:</label>
<div class="col-sm-10">