rounding rules via admin screen, round begin when starting record (#1229)
This commit is contained in:
@@ -16,8 +16,10 @@ use App\Form\Model\SystemConfiguration as SystemConfigurationModel;
|
||||
use App\Form\SystemConfigurationForm;
|
||||
use App\Form\Type\EnhancedSelectboxType;
|
||||
use App\Form\Type\LanguageType;
|
||||
use App\Form\Type\RoundingModeType;
|
||||
use App\Form\Type\SkinType;
|
||||
use App\Form\Type\TrackingModeType;
|
||||
use App\Form\Type\WeekDaysType;
|
||||
use App\Repository\ConfigurationRepository;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
@@ -215,6 +217,39 @@ class SystemConfigurationController extends AbstractController
|
||||
new GreaterThanOrEqual(['value' => 1])
|
||||
]),
|
||||
]),
|
||||
(new SystemConfigurationModel())
|
||||
->setSection(SystemConfigurationModel::SECTION_ROUNDING)
|
||||
->setConfiguration([
|
||||
(new Configuration())
|
||||
->setName('timesheet.rounding.default.mode')
|
||||
->setType(RoundingModeType::class)
|
||||
->setTranslationDomain('system-configuration'),
|
||||
(new Configuration())
|
||||
->setName('timesheet.rounding.default.begin')
|
||||
->setType(IntegerType::class)
|
||||
->setTranslationDomain('system-configuration')
|
||||
->setConstraints([
|
||||
new GreaterThanOrEqual(['value' => 0])
|
||||
]),
|
||||
(new Configuration())
|
||||
->setName('timesheet.rounding.default.end')
|
||||
->setType(IntegerType::class)
|
||||
->setTranslationDomain('system-configuration')
|
||||
->setConstraints([
|
||||
new GreaterThanOrEqual(['value' => 0])
|
||||
]),
|
||||
(new Configuration())
|
||||
->setName('timesheet.rounding.default.duration')
|
||||
->setType(IntegerType::class)
|
||||
->setTranslationDomain('system-configuration')
|
||||
->setConstraints([
|
||||
new GreaterThanOrEqual(['value' => 0])
|
||||
]),
|
||||
(new Configuration())
|
||||
->setName('timesheet.rounding.default.days')
|
||||
->setType(WeekDaysType::class)
|
||||
->setTranslationDomain('system-configuration'),
|
||||
]),
|
||||
(new SystemConfigurationModel())
|
||||
->setSection(SystemConfigurationModel::SECTION_FORM_CUSTOMER)
|
||||
->setConfiguration([
|
||||
|
||||
Reference in New Issue
Block a user