1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-21 00:41:34 +02:00
Commit Graph

214 Commits

Author SHA1 Message Date
David Bomba
0ff14c97fd
Minors Fixes (#3405)
* Tests for client contact passwords

* test for client API

* Client Tests for password quality

* Final tests for client contact password

* Implement feature permissions

* Minor fixes
2020-03-01 21:18:13 +11:00
David Bomba
e2ed1fad8b
Enable client contact password to be set via API. (#3402)
* Tests for client contact passwords

* test for client API

* Client Tests for password quality

* Final tests for client contact password
2020-03-01 16:00:54 +11:00
David Bomba
f8ea4c0d0f
Implement Design API (#3400)
* Working on CompanyUser route

* CompanyUser update route

* tests for updating a company user

* Fixes for exchange currency rate

* Move slack and google analytics fields into company table

* implement Design API
2020-02-29 08:57:47 +11:00
David Bomba
0061da2600
Update Company User Route (#3398)
* Working on CompanyUser route

* CompanyUser update route

* tests for updating a company user
2020-02-28 23:11:56 +11:00
David Bomba
abe3376c48
Validate invoices in a payment (#3397)
* Payment Scenarios:

* Fixes for duplicate invoice-ids in a payment
2020-02-28 19:18:34 +11:00
David Bomba
08ce375fbc
Fixes for payments with invoices from different clients (#3396) 2020-02-28 12:58:49 +11:00
David Bomba
fba88c2d62
Fixes for tests (#3395) 2020-02-28 08:17:17 +11:00
David Bomba
f20b0f7720
Fixes for company tokens. (#3375)
* Testing Company Ledger

* Fixes for company ledger

* Fixes for company ledger

* Company ledger testS

* Fixes for user / client / contacts transformers

* Fixes for tests

* Fixes for tokens
2020-02-26 14:26:07 +11:00
David Bomba
1ac2a73b2a
Update CORS fields (#3371)
* Working on invoice invitations

* Credit invitations

* Update CORS
2020-02-25 19:33:53 +11:00
David Bomba
08b4c4f4e1
Fixes for invoice invitation creation (#3370)
* Working on invoice invitations

* Fixes for invitation creation
2020-02-25 09:00:28 +11:00
Benjamin Beganović
8121a0166d
Importing migration data via HTTP (#3365)
* Accept migration over HTTP

* Comment wip tests
2020-02-25 08:15:07 +11:00
David Bomba
3d31f810c0
Set Invitations as a default include for invoices (#3362)
* Working on importing company gateways

* Fix for companyuser settings object

* Migrate client_gateway_tokens

* Working on Notificaitons

* Working on notifications

* Failsafe for user-company

* unlink files

* Set DB for jobs

* Always have a fallback for company_id

* Fixes for user model

* Formatting for MultiDB

* Working on Company Ledger Tests

* Fixes for contact request

* Set Invitations as a default include for invoices
2020-02-24 21:15:30 +11:00
Benjamin Beganović
cf3bcb90be
Accept migration over the API (#3356) 2020-02-21 07:58:38 +11:00
David Bomba
9e9cd37b87
Modifications to Designs (#3353)
* Working on Quotes

* Naming refactor for Quotes

* Quote Actions

* Quote Pdfs

* Quote PDFs

* Refunds in Stripe

* Fixes tests

* Company Ledger work
2020-02-20 07:44:12 +11:00
David Bomba
f57339f185
Fixes and Refactors for Invoice Emails. (#3339)
* Working on emailing invoices

* Working on emailing and displaying email

* Working on emailing and displaying email

* Email invoices

* Fixes for html emails

* Ensure valid client prior to store

* Ensure client exists when storing an entity

* Update variable name send -> send_email for client_contacts

* Mailable download files

* Extend timeouts of password protected routes when a protected route is hit

* Add default portal design to company settings

* Minor fixes

* Fixes for Tests

* Fixes for invoicing emails

* Refactors for InvoiceEmail

* Implement abstractservice

* Refactors for services

* Refactors for emails

* Fixes for Invoice Emails
2020-02-17 20:37:44 +11:00
David Bomba
a79c7bf60d
Code Cleanup
* Working on emailing invoices

* Working on emailing and displaying email

* Working on emailing and displaying email

* Email invoices

* Fixes for html emails

* Ensure valid client prior to store

* Ensure client exists when storing an entity

* refactor for emails

* Design Transformer

* Include designs in first_load response

* Code cleanup
2020-02-15 20:06:30 +11:00
David Bomba
162580bcd3
Fixes for ClientContact CRUD (#3317)
* Fixes for downloading invoice PDF

* Fixes for client contact CRUD
2020-02-12 20:18:56 +11:00
David Bomba
797c3fb3f6
Fixes for refunds (#3288)
* Working on invoice designs

* Fix unusual form request issue in tests vs production

* Fixes for form requests

* Fixes for refunds
2020-02-06 08:54:20 +11:00
David Bomba
11960e25e7
Fixes for refunds (#3285)
* Working self-updater package

* Fixes for travis

* Working on invoice designs

* Working on invoice builder

* Tests for invoice design

* Working on invoice designs

* Minor fixes

* Working on Invoice Design Engine

* Working on invoice designs

* Fixes for refunds
2020-02-05 21:28:56 +11:00
David Bomba
c25de936ed
Refactor - moving away from jobs. (#3279)
* Implement Services

* implement service pattern

* Service patterns

* Refactoring invoice paid

* refactoring invoice

* Refactor jobs

* Refactor - remove jobs

* Refactor jobs

* Refactoring jobs

* Refactoring away from jobs

* Refactoring jobs

* Add Credits to test data
2020-02-03 21:33:07 +11:00
David Bomba
79c57aa8da
Fixes for payments (#3276)
* More tests for refunds

* Tests for refunds

* Improve test speeds

* Fixes for tests

* Adjust the way we update products

* Adjustments for payments

* Fixes for payments
2020-02-02 07:45:23 +11:00
David Bomba
63f514f3bc
Working on payments (#3269)
* Add PHP 7.4 to Travis Tests

* Fixes for tests

* fixes for tests

* Fixes for tests

* More tests for Refunds

* Remove dusk tests

* Refactor refund variables

* Working on refunds

* Working on refunds

* working on refundS

* working on refunds
2020-01-30 15:50:45 +11:00
Benjamin Beganović
67c6ac1bc2
Test fixes & code improvements (#3267)
- Updated rules for storing credits
- Fixed route controller
- Added test for crud operations
- Added new $invoice object in MockAccountData
- Added & registered CreditPolicy
2020-01-30 14:02:25 +11:00
Benjamin Beganović
0f661495db
Create 'Credits' module (#3263)
* Create 'Credits' module

* Various fixes on Credit module

* Fix MarkCreditPaid factory
2020-01-30 12:27:22 +11:00
David Bomba
45cc67075d
Include contacts in sample migration files. (#3260)
* add types to transformers

* minor fixes for test data creator

* Working on refunds

* Update migration files to include client contacts

* Working on refunds

* Working on refunds

* Working on refunds

* Refund Tests

* Working on refund tests
2020-01-29 13:03:47 +11:00
Benjamin Beganović
01c47d7c5d (Sync) beganovich:v2 to invoiceninja:v2 (#3254)
* Add more checks to invoice test

* Uploading migration file & test

* Comment redundant tests

* Improve tests with smaller sample files. (#3250)

* Reduce migration file size to improve test velocity

* minor fixes

* remove xhprof ext

* Tests for templates

* Remove commented tests

* Fix invoices testing & importing

* Sending e-mail when migration fails

* Uploading & storing the migration file
- Added Swagger notation
- Added MigrationTest.php method

Co-authored-by: David Bomba <turbo124@gmail.com>
2020-01-28 07:56:48 +11:00
Benjamin Beganović
11cc40d23a Migrate commits from 2-migration-with-json into v2 (#3241)
* Scaffold test case

* Import.php tests:
- Basic test scaffold
- Test if exception is thrown when unknown resource
- Company update test

* Migration importer & exception classes

* Company migration test
- Added 3rd parameter for accepting custom resources
- Wip tax_rates migration

* Tax rate migration

* Tax rate update
- Added company_id & user_id property modifiers

* Users migration

* Save IDs for users importing

* Add 'transformIds' method

* Importing clients
- An exception for resource not migration
- Dependency logic
- Removing id on insert

* Exception for unresolved dependency

* Import clients

* Method for inspecting user_id

* Importing invoices

* Importing quotes

* Fix tests & wrap with try-catch

* Fix tax_rates user_id transform

* Working on migration

* Tests for migration

* fixes for test

* Tests for Import.php
- Added ext-json to composer.json

* Tests for Import.php
- Added ext-json to composer.json

* Change migration exceptions to MigrationValidatorFailed

* Fixes for tests and counters

* Unzipping the migration archive
- Changed .gitignore to ignore all local migrations

* Comparing local data with inserted

* Ignore verification - wip

* Fix formatting for api.php

* Uploading file test (wip)

* Fix typo

Co-authored-by: David Bomba <turbo124@gmail.com>
2020-01-24 07:35:00 +11:00
David Bomba
a70b024d94
Payment refunds, Projects, Expenses and Vendors. (#3228)
* OpenAPI Documentation for Vendors and Expenses

* Rules for refunds

* Rules for Payment Refunds

* Fixes for quote invitation link

* Project
2020-01-20 21:10:33 +11:00
David Bomba
84642bf035
Expense and Vendors (#3226)
* add expenses, vendors and vendor_contacts along with factories and test data

* padding out vendors, expenses

* Minor fixes

* Add Expense and Company TransformerS
2020-01-20 12:31:58 +11:00
David Bomba
27d06a2ae1
Payment tests (#3224)
* Auto Calculate Payment amount if parameter is not supplied

* Tests for payments

* Flag logs to be sent with support messages
2020-01-19 13:02:02 +10:00
David Bomba
2c99d3478b
Payment fixes (#3204)
* Fixes for unused variables and annotating the paymentrepository for future work

* Refactor Payment repository

* rename variables for payments
2020-01-12 08:01:28 +10:00
David Bomba
0878decf18
Implement payment rules at application edge (FormRequest) (#3202)
* Ensure payments, invoice and credit amount balance in the validator prior to saving

* additional payment validation rules and tests for processing payments

* Factories for credits

* Tests for payments

* Working on updating a payment

* Working on updating a payment

* fixes for updating a payment

* Working on Payment Tests

* More tests for payments, formrequests

* remove product_key as required from products
2020-01-10 07:15:10 +11:00
David Bomba
957ac9f5d8
Fix for password protected authorization (#3198)
* Remove unnecessary save() on invoice

* Update copyright

* Working on Credit Repository

* Implement credits as a paymentable entity

* Add credit_id to transformer

* fix rules for update payment

* Fix random deleted_at keys in transformers

* Fix for password_protect check
2020-01-07 11:13:47 +11:00
David Bomba
ad06de25f5
Fixes for Payments (#3194)
* Set payment number on completed payment

* Fix for paymentables not returning

* Do not set invoice status to paid if only a partial amount of the invoice has been paid
2020-01-04 13:27:51 +11:00
David Bomba
f712b789ca
Fixes for tests (#3184)
* fix typo

* php-cs traits

* CS fixer pass

* Password protect User routes

* Implement checks to prevent editing a deleted record

* Clean up payment flows

* Fixes for tests
2019-12-31 08:59:12 +11:00
David Bomba
b0da84baa7
Fix Quote transformer. (#3165)
* Use native Laravel prepareForValidation method instead of custom sanitize

* fix quote transformer
2019-12-20 22:23:09 +11:00
David Bomba
e125052f96
Implement invoice reminder scheduler (#3160)
* Do not set email template defaults in settings

* Set invoice reminders, trait + tets

* Fixes for tets

* Only all an account owner to delete companies/users
2019-12-18 13:45:18 +11:00
David Bomba
556b2ab1c9
Fixes for Storing Quotes (#3159)
* Return blank object for group settings

* Implement Quote Store

* Clean up Logging
2019-12-18 09:40:15 +11:00
Benjamin Beganović
da49880733 Massively creating resources (#3152)
* Bulk storing request & accesing policy service

* Transform hardcoded action to self-property

* Testing, support for multiple resources

* Uncomment, response(200)

* Change authorize to isAdmin() property
2019-12-17 21:58:23 +11:00
David Bomba
f6f5b89af9
Return company user settings as object (#3156)
* Conditional in test

* Add additional fields to payments

* Additional fields for payments table

* Return company user as object
2019-12-17 21:50:45 +11:00
David Bomba
c6e1658ffe
Refactors (#3148)
* Refactor company properties to be presented from settings object instead of company properties

* Working on Email Tests

* Working on emails

* Working on email templats

* Include text version of email

* Refactor Email template builder into trait'

* Fix for custom_value4

* Refactor payment_date -> date && payment_type_id -> type_id

* expose paymentables to API

* expose paymentables to API

* Implement a next_send_date field in invoice/quote tables to allow control over reminder scheduling

* Add custom_values to users,documents and company_gateways tables
2019-12-16 22:34:38 +11:00
David Bomba
ec5cbe66a0
New Validation rule for USER POST route (#3138) 2019-12-08 21:28:52 +11:00
Benjamin Beganović
259a28099f Various fixes (#3136) 2019-12-07 22:33:49 +11:00
David Bomba
01173c66d8
Fixes for validation. (#3130)
* Fixes for OpenAPI Documentation + fix support for docs for PHP 7.4

* Minor fixes for GMail API

* Add fix for 2 contacts with no email addresses failing validation, emails are optional! but cannot be duplicated if a value is set

* Return template as a object with subject and body components

* Fixes for OpenAPI Schema

* Stubs for payment edge cases

* payment tests
2019-12-05 17:22:20 +11:00
David Bomba
25514b43cf
Allow fine grained payments (#3110)
* Allow payment amounts to be partial per invoice paid

* edge case tests for payments

* Allow per invoice payment amounts and allow direct payments which simply credit a clients credit_balance

* Fixes
2019-12-01 22:23:24 +11:00
David Bomba
32aedf26dd
Attach and Detach a user to a company (#3107)
* fixes for template controller

* Default gateway as string

* Bulk actions

* Move currency_id back to settings

* Allow store and update currency ID

* Attach user to company_user

* Add / Detach company users
2019-11-30 13:42:44 +11:00
David Bomba
a7048ee61d
Implement Support for PHP 7.4 (#3102)
* Fixes for company factor

* Add dates to create test data

* Fixes for transformers, use faker to generate random dates

* Bump to PHP 7.4git add app/Http/Requests/User/DetachCompanyUserRequest.php

* Fixes for route model binding
2019-11-28 21:35:13 +11:00
David Bomba
4bc92a7aa1
Stub GMail Driver (#3099)
* fix for blank client settings

* Force all custom fields to strings

* Fixes for bulk actions

* Fixes for company POST route..

* Change text from Bitcoin to CRYPTO

* Implement default_gateway_type_id in transformer

* use scopes for company filtering

* Implement validation for portal_domain

* Add Google API client

* Add activities to company transformer
2019-11-27 20:47:59 +11:00
David Bomba
34cf93b78e
Portal Domain Validation (#3098)
* fix for blank client settings

* Force all custom fields to strings

* Fixes for bulk actions

* Fix for client transformer

* Validation for portal domain -> url

* Portal Domain Validation
2019-11-26 21:32:01 +11:00
David Bomba
4b4921703a
Fixes for blank client settings and force strings for custom_fields (#3096)
* fix for blank client settings

* Force all custom fields to strings
2019-11-26 20:11:22 +11:00
David Bomba
0908893180
Fixes for client currency id (#3092)
* Fix for CORs error where file download were being prevented by headers

* Fixes for CORs and File downloads

* give contextual error messages for invalid route actions

* Clean up LoginController for OAuth Testing

* Quote Actions

* Invoice and Quote Actions

* Fix for client currency
2019-11-25 20:38:55 +11:00
David Bomba
52c031e290
Email template defaults (#3090)
* Update User and Company User

* Email Template Defaults for Settings

* Separate methods for saving client and group settings
2019-11-24 17:37:53 +11:00
David Bomba
5c9ada0f77
V2 (#3089)
* Set default templates in Company Settings

* Working on Company User creation

* Working on company_user relationship

* Fixes for company_user relation

* Clean up
2019-11-23 08:10:53 +11:00
David Bomba
69efd4d574
Enhancements to API (#3088)
* working on email throttling

* Fixes for invitaiton links

* pass custom fields as object

* Add user agent to company token

* Update company token transformer

* Remove prefix setting from CompanySettings

* Implement user agent on company token & provide better error handling for undefined relationships includes

* Fix bulk actions

* Working on updating/creating a company user

* Fixes for tests
2019-11-21 19:38:57 +11:00
David Bomba
6d225b7fe7
Fixes for payments (#3081)
* Bump client contacts in test data

* Only allow a payment to be deleted once

* Update client balance and paid to date on payment

* Clean up
2019-11-20 08:06:48 +11:00
David Bomba
ff17e3eb67
Payment deletes (#3079)
* Add amount to paymentable tables to enable reversing payments gracefully

* Create Test Data artisan comannd

* Delete Payments + Fixes for company settings persistence
2019-11-19 21:23:56 +11:00
David Bomba
fe5a97e174
Activity API fixes + Payments API (#3076)
* Fixes for Store Payment Validation

* Tests for Payments

* Use custom validator to ensure payments are made ONLY to payable invoices

* Working on custom payment validators

* Update Client balance

* fixes for client balance

* Fixes for activity API
2019-11-18 21:46:01 +11:00
David Bomba
81c481c071
Fixes for RandomDataSeeder (#3073)
* Provide failsafe creation of invoice invitations

* URL Links for invitations

* open up route for invitations

* Set DB by Invite

* Set DB By invitation Key

* Tests for setting DB based on user email address

* Middleware for setting db by email address

* fixes for tets

* fixes for tests

* Tests for bulk actions

* Payments API

* Fixes for tests
2019-11-16 14:12:29 +11:00
David Bomba
e1fa1186d1
CORS implementation (#3065)
* fix regression in company name

* HasOneThrough for company user

* Validation rules for contact email addresses

* Force a blank contact if no contacts passed in client
2019-11-13 22:32:53 +11:00
David Bomba
0354b58f82
Remove CORS from middleware (#3064)
* Remove headers

* Unique emails per client

* fixes for company name

* remove cors from middleware
2019-11-13 17:18:24 +11:00
David Bomba
384a3b4603
Fixes for transforming and saving company settings. (#3058)
* Cleanup for settings remove from entities

* Fixes for saving and transforming company settings
2019-11-13 08:26:40 +11:00
David Bomba
cb939ed986
Implement Company Settings Sieve (#3057)
* remove redundant custom gateways

* Implement view_all,edit_all_create_all permissions

* Fixes for company settings sieve
2019-11-12 22:36:24 +11:00
David Bomba
e4c18e734a
Implement fees and limits map for company gateways (#3053)
* Add ability to remove group settings level company logo

* Company Gateway Fees and Limits

* Validation tests for FeesAndLimits

* Working on company gateways

* Working on transforming fees_and_limits in transformer

* Implement fees and limits map for company gateways
2019-11-11 23:21:19 +11:00
David Bomba
49ecde8a38
Fixes for group settings id put/post hashing (#3052) 2019-11-11 08:12:21 +11:00
David Bomba
37a826374b
Remove settings from invoice table (#3051)
* Implement client/group/company level counters clientCounter, groupCounter and counter

* Implement functionalityfor customising the timing of invoice_number creation

* Add Jobs

* adjustments

* clean line items at the request layer

* Clean line items at the request layer

* minor formatting for notification

* Schema Fixes

* schema changes, cast country_id to stirng

* Fixes for tests

* force line item ids to string

* Map company gateway fees and limits

* Schema changes

* Remove id from invoice item stdClass

* Remove settings object from invoice table
2019-11-10 23:06:30 +11:00
David Bomba
a78b6aaacd
Set casts on Invoice Line Items (#3049)
* Implement client/group/company level counters clientCounter, groupCounter and counter

* Implement functionalityfor customising the timing of invoice_number creation

* Add Jobs

* adjustments

* clean line items at the request layer

* Clean line items at the request layer
2019-11-08 11:38:22 +11:00
David Bomba
a6f928b181
Fixes for settings, implement invitations from invoice request (#3047)
* Fixes for client portal localization

* Replace Invoice Ninja Logo with user defined logo and website URL in client portal

* Minor Fixes

* Refactor for invitations on invoices

* Fixes for settings
2019-11-07 09:57:09 +11:00
David Bomba
13e104c1d9
Fixes for line items (#3028) 2019-10-29 22:12:59 +11:00
David Bomba
004d39cc73
Fixes for blank settings (#3027) 2019-10-29 20:51:23 +11:00
David Bomba
5fafbac36f
Tax Rates (#3026)
* Insert generic for client country if not set

* Invoice fixes

* fixes

* Schema changes

* Refactor Schema and implement fixes for testS

* Use Dispatcher for system logs

* Add TaxRateController

* Update OpenAPI definitions for Tax Rates
2019-10-29 13:55:26 +11:00
David Bomba
a60613aa26
Track signup platform (#3014)
* update company settings and OpenAPI definitions

* Fixes for tests

* Add extra variables to company settings

* Track signup platform when new account signup processed
2019-10-24 15:46:24 +11:00
David Bomba
ed449ea1ab
Default gateway type ID (#3008)
* Show Recurring Invoice - Client Portal

* Password protect some routes

* Password Protection Routes

* Add default_gateway_type_id to gateway table
2019-10-22 22:27:03 +11:00
David Bomba
3cbe60abda
clean up (#2978) 2019-10-11 11:54:53 +11:00
David Bomba
6698609512 Fixes for tests 2019-10-11 11:26:35 +11:00
David Bomba
9cc31195f7 fixes for storing invoice 2019-10-11 09:11:36 +11:00
David Bomba
8d14c6b2bd Switch currency_id back to settings object 2019-10-10 21:43:50 +11:00
David Bomba
3123547e55 Implement validation rule for settings 2019-10-10 12:01:38 +11:00
David Bomba
534b515849 Abstract settings save to separate trait 2019-10-09 10:53:33 +11:00
David Bomba
ebf439adcf fixes for client number incrementation 2019-10-08 22:17:05 +11:00
David Bomba
faa5a05ac1 Validation rules for update client 2019-10-08 22:14:23 +11:00
David Bomba
db3ccaf4bc validation fixes 2019-10-08 06:49:16 +10:00
David Bomba
d35a90cb94 change logo_url to company_logo_url 2019-10-07 22:06:23 +11:00
David Bomba
b8515e26b0 Upload company logo to client settings 2019-10-07 22:05:06 +11:00
David Bomba
264d6662e3 set blank object for client settings 2019-10-07 17:43:19 +11:00
David Bomba
6ea2140578 Remove json validation 2019-10-07 08:13:16 +11:00
David Bomba
cf67589f23 Open API 2019-10-06 19:44:00 +11:00
David Bomba
95be70a7b5 Group Settings 2019-10-06 08:24:46 +11:00
David Bomba
70fe64ed96 Fixes for tests 2019-10-05 10:11:04 +10:00
David Bomba
2f657aaac8 Stubs for group settings controller 2019-10-05 08:58:51 +10:00
David Bomba
7c69de5ebb validate json fields 2019-10-05 08:15:57 +10:00
David Bomba
2c25f20a25 Force at least 1 product quantity 2019-10-04 21:57:33 +10:00
David Bomba
187fb67275 remove work_ prefix 2019-10-04 21:01:52 +10:00
David Bomba
724cccacfc Fixes for tests 2019-10-03 21:50:50 +10:00
David Bomba
3af84f7de7 Company Gateway endpoint and tests 2019-10-03 21:18:12 +10:00
David Bomba
16cd98980b Company Gateway Tests 2019-10-03 20:59:19 +10:00
David Bomba
3b6fa39d43 Fixes for transformers 2019-10-03 15:42:58 +10:00
David Bomba
9afcc28549 Fixes for company logo output 2019-10-03 15:17:57 +10:00
David Bomba
fd58aeb856 Company Gateway API 2019-10-03 13:21:24 +10:00
David Bomba
70d2531ab4 validation rules 2019-10-03 07:53:59 +10:00
David Bomba
0c5202ea8c API Tests for clients 2019-10-02 20:22:10 +10:00