Skip to content

feat: Add "Add to quantity" and "Subtract from quantity" actions#1023

Open
kaligrafy wants to merge 1 commit intorgriebl:mainfrom
kaligrafy:addSubstractQuantityIssue1002
Open

feat: Add "Add to quantity" and "Subtract from quantity" actions#1023
kaligrafy wants to merge 1 commit intorgriebl:mainfrom
kaligrafy:addSubstractQuantityIssue1002

Conversation

@kaligrafy
Copy link
Copy Markdown

Add two new quantity adjustment actions that allow users to quickly increment or decrement the quantity of selected items by a specified amount, without needing to calculate the new total manually.

Changes:

  • Add edit_qty_add and edit_qty_subtract actions in ActionManager
  • Add Document::addQuantity() method with overflow checking
  • Add actions to Edit > Quantity submenu
  • Add actions to Quantity column context menu
  • Add toolbar buttons (list-add/list-remove icons)
  • Add actions to mobile ViewEditMenu

Also fixes a missing brace in desktopapplication.cpp that caused a build error.

Closes #1002

Add two new quantity adjustment actions that allow users to quickly
increment or decrement the quantity of selected items by a specified
amount, without needing to calculate the new total manually.

Changes:
- Add edit_qty_add and edit_qty_subtract actions in ActionManager
- Add Document::addQuantity() method with overflow checking
- Add actions to Edit > Quantity submenu
- Add actions to Quantity column context menu
- Add toolbar buttons (list-add/list-remove icons)
- Add actions to mobile ViewEditMenu

Also fixes a missing brace in desktopapplication.cpp that caused
a build error.

Closes rgriebl#1002
@kaligrafy
Copy link
Copy Markdown
Author

Some screenshots:

image image image image

@paramecie
Copy link
Copy Markdown

Or easier, one single interface "Add to qty" but allowing negative quantity like -3 which then subtracts.
You don't need 2 interfaces.

@paramecie
Copy link
Copy Markdown

paramecie commented Jan 25, 2026

Alternatively, we could have a more generic "Edit Qty" or "Calc Qty" (say current qty is 100):

  • if number has no sign or symbol, then it simply updates the quantity (120 => changes to 120)
  • if number is prefixed by "+" it adds (+33 => 133)
  • if number is prefixed by "-" it subtracts (-18 => 82)

By extension:

  • if number is prefixed by "*" it multiplies (*2 => 200)
  • if number is prefixed by "/" it divides (if no modulo) (/4 => 25)

We'd ignore "*-2" or a symbol and a sign (vice versa), which probably is too complicated or rare to be of any usage.

@ZZJHONS
Copy link
Copy Markdown
Contributor

ZZJHONS commented Jan 26, 2026

The Quantity column already has a right click menu item to set quantity and it has buttons for +/- the only problem is that it defaults to the last used numbers but when selecting only one lot it could have the old value.

@paramecie
Copy link
Copy Markdown

What? I don't have any button + or - in the Set Qty from contextual menu. Just a single text field with the value. Latest version on Win 10.

@ZZJHONS
Copy link
Copy Markdown
Contributor

ZZJHONS commented Jan 26, 2026

Maybe windows 11 thingy? Location or something?
image

@paramecie
Copy link
Copy Markdown

paramecie commented Jan 26, 2026

Ahhh this. It's Win 11. Here I have instead an up and down triangle. But that doesn't do an addition, it increases and decreases.

Frankly I like this proposal:
#1023 (comment)

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.

Progam not opening on either MacOS Version 2025.9.2 or MacOS legacy version 2025.9.2

3 participants