Skip to content

3989 operacion impuestos#1761

Merged
NeoRazorX merged 5 commits intoNeoRazorX:masterfrom
daniel89fg:3989-operacion-impuestos
Jul 29, 2025
Merged

3989 operacion impuestos#1761
NeoRazorX merged 5 commits intoNeoRazorX:masterfrom
daniel89fg:3989-operacion-impuestos

Conversation

@daniel89fg
Copy link
Copy Markdown
Contributor

Copilot AI review requested due to automatic review settings July 23, 2025 07:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements tax operation functionality by adding a new "operacion" field to the tax (Impuesto) model and related UI components. The changes support categorizing taxes by operation type (e.g., VAT, IGIC, Ceuta y Melilla).

  • Adds new "operacion" field to tax database table and model
  • Creates OperacionIVA library class to manage tax operation types
  • Updates UI views to include operation selection dropdown

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
Core/Table/impuestos.xml Adds operacion column to tax database table
Core/Model/Impuesto.php Adds operacion property to tax model
Core/Lib/OperacionIVA.php New library class defining tax operation constants and methods
Core/XMLView/ListImpuesto.xml Adds operation column to tax list view
Core/XMLView/EditImpuesto.xml Adds operation field to tax edit form
Core/Controller/ListImpuesto.php Populates operation dropdown values in list view
Core/Controller/EditImpuesto.php Populates operation dropdown values in edit view
Core/Data/Codpais/ESP/impuestos.csv Updates Spanish tax data with operation values
Core/View/Master/MicroTemplate.html.twig Adds version parameters to CSS/JS assets
Core/View/Master/MenuTemplate.html.twig Adds version parameters to CSS/JS assets

Comment on lines +33 to +39

/** @var array */
private static $values = [];

public static function add(string $key, string $value): void
{
$fixedKey = substr($key, 0, 20);
Copy link

Copilot AI Jul 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The magic number 20 should be defined as a named constant to improve code maintainability and make the key length limit explicit.

Suggested change
/** @var array */
private static $values = [];
public static function add(string $key, string $value): void
{
$fixedKey = substr($key, 0, 20);
const MAX_KEY_LENGTH = 20;
/** @var array */
private static $values = [];
public static function add(string $key, string $value): void
{
$fixedKey = substr($key, 0, self::MAX_KEY_LENGTH);

Copilot uses AI. Check for mistakes.
/** @var string */
public $descripcion;

/** @var string */
Copy link

Copilot AI Jul 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new operacion property lacks documentation. Consider adding a docstring comment explaining its purpose and expected values.

Suggested change
/** @var string */
/**
* Describes the type of operation associated with the tax.
* Expected values: a string representing the operation type, such as "sale" or "purchase".
* @var string
*/

Copilot uses AI. Check for mistakes.
<columns>
<group name="data" numcolumns="12">
<column name="description" numcolumns="6" order="100">
<column name="description" numcolumns="4" order="100">
Copy link

Copilot AI Jul 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The description column width was reduced from 6 to 4 columns to accommodate the new operation field. Verify that the description field remains adequately sized for typical tax descriptions.

Suggested change
<column name="description" numcolumns="4" order="100">
<column name="description" numcolumns="6" order="100">

Copilot uses AI. Check for mistakes.
@NeoRazorX
Copy link
Copy Markdown
Owner

Revisa los valores del csv porque creo que no están bien.

@NeoRazorX NeoRazorX merged commit 47346f8 into NeoRazorX:master Jul 29, 2025
17 checks passed
@daniel89fg daniel89fg deleted the 3989-operacion-impuestos branch July 29, 2025 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants