|
@@ -136,7 +136,10 @@
|
|
|
</template>
|
|
</template>
|
|
|
</DefaultInput>
|
|
</DefaultInput>
|
|
|
|
|
|
|
|
- <div class="col-md-3 col-12 row no-wrap items-center" style="gap: 8px">
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="col-md-3 col-12 row no-wrap items-center"
|
|
|
|
|
+ style="gap: 8px"
|
|
|
|
|
+ >
|
|
|
<DefaultInput
|
|
<DefaultInput
|
|
|
v-model="contractForm.tax_base_maintenance"
|
|
v-model="contractForm.tax_base_maintenance"
|
|
|
label="Taxa de Manutenção"
|
|
label="Taxa de Manutenção"
|
|
@@ -163,7 +166,9 @@
|
|
|
</q-card-section>
|
|
</q-card-section>
|
|
|
|
|
|
|
|
<q-card-section>
|
|
<q-card-section>
|
|
|
- <div class="text-body2 q-mb-sm">Histórico de Reajuste de Valores e TBR</div>
|
|
|
|
|
|
|
+ <div class="text-body2 q-mb-sm">
|
|
|
|
|
+ Histórico de Reajuste de Valores e TBR
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
<q-table
|
|
<q-table
|
|
|
flat
|
|
flat
|
|
@@ -201,10 +206,7 @@ import DefaultSelect from "src/components/defaults/DefaultSelect.vue";
|
|
|
|
|
|
|
|
import { getUnit } from "src/api/unit";
|
|
import { getUnit } from "src/api/unit";
|
|
|
import { getInhabitantClassificationsForSelect } from "src/api/inhabitant_classification";
|
|
import { getInhabitantClassificationsForSelect } from "src/api/inhabitant_classification";
|
|
|
-import {
|
|
|
|
|
- updateFranchiseeContract,
|
|
|
|
|
- getFranchiseeContractTaxHistory,
|
|
|
|
|
-} from "src/api/franchisee_contract";
|
|
|
|
|
|
|
+import { getFranchiseeContractTaxHistory } from "src/api/franchisee_contract";
|
|
|
|
|
|
|
|
defineEmits([...useDialogPluginComponent.emits]);
|
|
defineEmits([...useDialogPluginComponent.emits]);
|
|
|
|
|
|
|
@@ -226,7 +228,6 @@ function openTaxesDialog() {
|
|
|
onDialogOK({ openTaxes: true, contract: props.contract });
|
|
onDialogOK({ openTaxes: true, contract: props.contract });
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-const saving = ref(false);
|
|
|
|
|
const loadingHistory = ref(false);
|
|
const loadingHistory = ref(false);
|
|
|
const inhabitantOptions = ref([]);
|
|
const inhabitantOptions = ref([]);
|
|
|
const tbrHistory = ref([]);
|
|
const tbrHistory = ref([]);
|
|
@@ -275,7 +276,12 @@ const tbrColumns = [
|
|
|
field: "inhabitant_classification",
|
|
field: "inhabitant_classification",
|
|
|
align: "left",
|
|
align: "left",
|
|
|
},
|
|
},
|
|
|
- { name: "tbr_fixed_value", label: "TBR", field: "tbr_fixed_value", align: "left" },
|
|
|
|
|
|
|
+ {
|
|
|
|
|
+ name: "tbr_fixed_value",
|
|
|
|
|
+ label: "TBR",
|
|
|
|
|
+ field: "tbr_fixed_value",
|
|
|
|
|
+ align: "left",
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
name: "marketing_fund_percentage",
|
|
name: "marketing_fund_percentage",
|
|
|
label: "FNM",
|
|
label: "FNM",
|
|
@@ -328,35 +334,5 @@ async function loadTaxHistory() {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-async function save() {
|
|
|
|
|
- saving.value = true;
|
|
|
|
|
- try {
|
|
|
|
|
- await updateFranchiseeContract(props.contract.id, {
|
|
|
|
|
- start_date: contractForm.start_date,
|
|
|
|
|
- end_date: contractForm.end_date,
|
|
|
|
|
- tbr_fixed_value: contractForm.tbr_fixed_value,
|
|
|
|
|
- invoice_due_date: contractForm.invoice_due_date,
|
|
|
|
|
- inhabitant_classification_id: contractForm.inhabitant_classification_id,
|
|
|
|
|
- tbr_fixed_value_percentage:
|
|
|
|
|
- contractForm.tax_base_royalts != null
|
|
|
|
|
- ? contractForm.tax_base_royalts / 100
|
|
|
|
|
- : null,
|
|
|
|
|
- marketing_fund_percentage:
|
|
|
|
|
- contractForm.tax_base_fnm != null
|
|
|
|
|
- ? contractForm.tax_base_fnm / 100
|
|
|
|
|
- : null,
|
|
|
|
|
- maintance_tax_percentage:
|
|
|
|
|
- contractForm.tax_base_maintenance != null
|
|
|
|
|
- ? contractForm.tax_base_maintenance / 100
|
|
|
|
|
- : null,
|
|
|
|
|
- });
|
|
|
|
|
- onDialogOK();
|
|
|
|
|
- } catch (error) {
|
|
|
|
|
- console.error(error);
|
|
|
|
|
- } finally {
|
|
|
|
|
- saving.value = false;
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
onMounted(loadData);
|
|
onMounted(loadData);
|
|
|
</script>
|
|
</script>
|