crater
crater copied to clipboard
Add item without a price
Would be nice if you could add items without price. Sometimes that shows what type of extra value we have given our customer. Like a bonus for free.
@oalexandrefreire That's a good idea. Most companies do it by setting the price just to zero if they add free stuff. Other than that, you could add it to an item's description, to the notes, or add a custom field to invoices or estimates that could function like a note field.
I also made this suggestion.....I throw in FREEBIES on some jobs......and the ability to enter an OVER PAYMENT......if the customer pays you $5 more than the original on the invoice, you cannot record payment. .....allow over payment and prompt a box to enter reason....it could be for TIPS or customer giving you extra for gas for that extra trip, or just TIP for a good job well done, or a credit for a next job. ....this CRATER wont let you go ahead if the client paid $50.00 while the invoice is $45.00.
Hey, you can remove rules to permit item without price
Go to resources/scripts/admin/components/estimate-invoice-common/CreateItemRow.vue
And in rules array :
const rules = {
...
price: {
//required: helpers.withMessage(t('validation.required'), required),
/*minValue: helpers.withMessage(
t('validation.number_length_minvalue'),
minValue(1)
),*/
maxLength: helpers.withMessage(
t('validation.price_maxlength'),
maxLength(20)
),
},
...
}
Don't forget to build your assets after with yarn build
@agencetwogether Can you please consider to create a PR to fix this issue on the project with your fix?
I am also facing this issue.
Hi @agencetwogether thank you very much for posting this workaround. I am facing some issues with this fix.
I made the edits to the code as per your comments, then ran the following commands:
brew install yarn
brew install vite
yarn build
But I am getting the below error:
failed to load config from /Volumes/docker/crater/vite.config.ts
error during build:
Error: Cannot find module 'laravel-vite'
Require stack:
- /Volumes/docker/crater/vite.config.ts
- /opt/homebrew/Cellar/vite/4.3.9/libexec/lib/node_modules/vite/dist/node/chunks/dep-e8f070e8.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1070:15)
at Module._load (node:internal/modules/cjs/loader:923:27)
at Module.require (node:internal/modules/cjs/loader:1137:19)
at require (node:internal/modules/helpers:121:18)
at Object.<anonymous> (/Volumes/docker/crater/vite.config.ts:36:27)
at Module._compile (node:internal/modules/cjs/loader:1255:14)
at _require.extensions.<computed> [as .js] (file:///opt/homebrew/Cellar/vite/4.3.9/libexec/lib/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:64524:24)
at Module.load (node:internal/modules/cjs/loader:1113:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Module.require (node:internal/modules/cjs/loader:1137:19)
error Command failed with exit code 1.
I am running Crater in docker with docker-compose. I will greatly appreciate any help with this.