Atualizando arquivos
This commit is contained in:
parent
de717491cd
commit
169a2e1a53
3 changed files with 12 additions and 5 deletions
|
|
@ -1701,6 +1701,11 @@ function alternarCheckboxes() {
|
|||
const selecionados = Array.from(checkboxes).filter(cb => cb.checked);
|
||||
|
||||
if (selecionados.length === 0) {
|
||||
|
||||
$('#btnGerarOrcamento').html('Gerar Orçamento Agrupado');
|
||||
$('#btnGerarOrcamento').removeClass('btn-danger');
|
||||
|
||||
|
||||
/** Desabilita o formulário caso esteja oculto */
|
||||
$('.collapse').collapse();
|
||||
return;
|
||||
|
|
@ -1774,7 +1779,9 @@ function alternarCheckboxes() {
|
|||
//aplica o foco no campo indicado
|
||||
$('#budget').focus();
|
||||
|
||||
|
||||
//Altera o texto do botão de ação
|
||||
$('#btnGerarOrcamento').html('Cancelar Orçamento');
|
||||
$('#btnGerarOrcamento').addClass('btn-danger');
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
/** Importação de classes */
|
||||
use vendor\model\CompaniesBudgets;
|
||||
use vendor\model\ClientProducts;
|
||||
use vendor\model\CompaniesProducts;
|
||||
use vendor\controller\client_budgets\CompaniesBudgetsValidate;
|
||||
|
||||
try{
|
||||
|
|
@ -12,7 +12,7 @@ try{
|
|||
|
||||
/** Instânciamento de classes */
|
||||
$CompaniesBudgets = new CompaniesBudgets();
|
||||
$ClientProducts = new ClientProducts();
|
||||
$CompaniesProducts = new CompaniesProducts();
|
||||
$CompaniesBudgetsValidate = new CompaniesBudgetsValidate();
|
||||
|
||||
/** Parametros de entrada */
|
||||
|
|
@ -94,7 +94,7 @@ try{
|
|||
if($budgetsId > 0){
|
||||
|
||||
/** Atualiza o valor do produto do orçamento */
|
||||
$ClientProducts->UpdateValueProduct($CompaniesBudgetsValidate->getcompanyId(), $CompaniesBudgetsValidate->getProductsId(), $CompaniesBudgetsValidate->getReadjustmentBudget());
|
||||
$CompaniesProducts->UpdateValueProduct($CompaniesBudgetsValidate->getcompanyId(), $CompaniesBudgetsValidate->getProductsId(), $CompaniesBudgetsValidate->getReadjustmentBudget());
|
||||
|
||||
/** Prepara o retorno */
|
||||
$procedure = '<script type="text/javascript">';
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ try{
|
|||
|
||||
<div class="col-md-2 mb-2 text-end">
|
||||
|
||||
<button type="button" class="btn btn-primary mt-3" onclick="alternarCheckboxes()">Gerar Orçamento Agrupado</button>
|
||||
<button type="button" id="btnGerarOrcamento" class="btn btn-primary mt-3" onclick="alternarCheckboxes()">Gerar Orçamento Agrupado</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue