diff --git a/README.md b/README.md index 294c67c8825a..142790f22e31 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,10 @@ ## [Hosted](https://www.invoiceninja.com) | [Self-Hosted](https://www.invoiceninja.org) -### We're on Slack, join us at [slack.invoiceninja.com](http://slack.invoiceninja.com) +### We're on Slack, join us at [slack.invoiceninja.com](http://slack.invoiceninja.com) or if you like [StackOverflow](https://stackoverflow.com/tags/invoice-ninja/) + +Just make sure to add the `invoice-ninja` tag to your question. + #### We are currently looking for co-mainteners for the [dockerfiles repository](https://github.com/invoiceninja/dockerfiles), if you're interested please let us know @@ -19,8 +22,9 @@ The self-host zip includes all third party libraries whereas downloading the cod * [Features](https://www.invoiceninja.com/invoicing-features/) * [Videos](https://www.youtube.com/channel/UCXAHcBvhW05PDtWYIq7WDFA/videos) -* [User Guide](https://invoice-ninja.readthedocs.io/en/latest/) +* [User Guide](https://docs.invoiceninja.com/) * [Support Forum](https://www.invoiceninja.com/forums/forum/support/) +* [StackOverflow](https://stackoverflow.com/tags/invoice-ninja/) ## Referral Program * Earn 50% of Pro & Enterprise Plans up to 4 years - [Learn more](https://www.invoiceninja.com/referral-program/) @@ -32,11 +36,12 @@ The self-host zip includes all third party libraries whereas downloading the cod ## Installation Options * [Ansible](https://github.com/invoiceninja/ansible-installer) -* [Self-Host Zip](https://invoice-ninja.readthedocs.io/en/latest/install.html) +* [Self-Host Zip](https://docs.invoiceninja.com/install.html) * [Docker File](https://hub.docker.com/r/invoiceninja/invoiceninja/) * [Cloudron](https://cloudron.io/store/com.invoiceninja.cloudronapp.html) * [Softaculous](https://www.softaculous.com/apps/ecommerce/Invoice_Ninja) * [Lando](https://github.com/invoiceninja/invoiceninja/issues/2880) +* [Yunohost](https://github.com/YunoHost-Apps/invoiceninja_ynh) ## Recommended Providers * [Stripe](https://stripe.com/) diff --git a/app/Http/Controllers/Migration/StepsController.php b/app/Http/Controllers/Migration/StepsController.php index 0c4b984188c6..ab8a7ab26659 100644 --- a/app/Http/Controllers/Migration/StepsController.php +++ b/app/Http/Controllers/Migration/StepsController.php @@ -213,6 +213,7 @@ class StepsController extends BaseController 'company' => $this->getCompany(), 'users' => $this->getUsers(), 'tax_rates' => $this->getTaxRates(), + 'payment_terms' => $this->getPaymentTerms(), 'clients' => $this->getClients(), 'products' => $this->getProducts(), 'invoices' => $this->getInvoices(), diff --git a/app/Models/Traits/HasLogo.php b/app/Models/Traits/HasLogo.php index 1feb8c0a3d87..73423b0fc522 100644 --- a/app/Models/Traits/HasLogo.php +++ b/app/Models/Traits/HasLogo.php @@ -4,6 +4,7 @@ namespace App\Models\Traits; use Utils; use Illuminate\Support\Facades\Storage; +use App\Models\Document; /** * Class HasLogo. diff --git a/app/Traits/GenerateMigrationResources.php b/app/Traits/GenerateMigrationResources.php index fea470945c5b..9f55022e60bb 100644 --- a/app/Traits/GenerateMigrationResources.php +++ b/app/Traits/GenerateMigrationResources.php @@ -11,6 +11,7 @@ use App\Models\Document; use App\Models\Invoice; use App\Models\Payment; use App\Models\PaymentMethod; +use App\Models\PaymentTerm; use App\Models\Product; use App\Models\TaxRate; use App\Models\User; @@ -220,7 +221,7 @@ trait GenerateMigrationResources 'custom_value2' => $contact->custom_value2, 'email' => $contact->email, 'is_primary' => $contact->is_primary, - 'send_invoice' => $contact->send_invoice, + 'send_email' => $contact->send_invoice, 'confirmed' => $contact->confirmation_token ? true : false, 'last_login' => $contact->last_login, 'password' => $contact->password, @@ -365,7 +366,7 @@ trait GenerateMigrationResources 'client_id' => $invoice->client_id, 'user_id' => $invoice->user_id, 'company_id' => $invoice->account_id, - 'status_id' => $invoice->invoice_status_id, + 'status_id' => $this->transformStatusId($invoice->invoice_status_id), 'design_id' => $invoice->invoice_design_id, 'number' => $invoice->invoice_number, 'discount' => $invoice->discount, @@ -402,6 +403,50 @@ trait GenerateMigrationResources return $invoices; } + /* + define('INVOICE_STATUS_DRAFT', 1); + define('INVOICE_STATUS_SENT', 2); + define('INVOICE_STATUS_VIEWED', 3); + define('INVOICE_STATUS_APPROVED', 4); + define('INVOICE_STATUS_PARTIAL', 5); + define('INVOICE_STATUS_PAID', 6); + define('INVOICE_STATUS_OVERDUE', -1); + define('INVOICE_STATUS_UNPAID', -2); + + const STATUS_DRAFT = 1; + const STATUS_SENT = 2; + const STATUS_PARTIAL = 3; + const STATUS_PAID = 4; + const STATUS_CANCELLED = 5; + const STATUS_REVERSED = 6; + */ + private function transformStatusId($status) + { + switch ($status) { + case 1: + return 1; + break; + case 2: + return 2; + break; + case 3: + return 2; + break; + case 4: + return 2; + break; + case 5: + return 3; + break; + case 6: + return 4; + break; + default: + return 2; + break; + } + } + public function getResourceInvitations($items, $resourceKeyId) { $transformed = []; @@ -507,6 +552,31 @@ trait GenerateMigrationResources return $transformed; } + /* + const STATUS_DRAFT = 1; + const STATUS_SENT = 2; + const STATUS_APPROVED = 3; + const STATUS_EXPIRED = -1; + */ + private function transformQuoteStatus($status) + { + switch ($status) { + case 1: + return 1; + break; + case 2: + return 2; + break; + case 4: + return 3; + break; + + default: + return 2; + break; + } + } + public function getPayments() { $transformed = []; @@ -668,6 +738,30 @@ trait GenerateMigrationResources return $transformed; } + private function getPaymentTerms() + { + $payment_terms = PaymentTerm::where('account_id', 0)->orWhere('account_id', $this->account->id)->get(); + + $transformed = []; + + foreach($payment_terms as $payment_term) + { + + if($payment_term->num_days == -1) + $payment_term->num_days = 0; + + $transformed[] = [ + 'user_id' => 0, + 'company_id' => $this->account->id, + 'num_days' => $payment_term->num_days, + 'deleted_at' => $payment_term->deleted_at, + ]; + + } + + return $transformed; + } + private function convertMeta($payment_method) { $expiry = explode('-', $payment_method->expiration); diff --git a/public/images/social/signin/btn_facebook_signin.png b/public/images/social/signin/btn_facebook_signin.png new file mode 100644 index 000000000000..aa4f62348c48 Binary files /dev/null and b/public/images/social/signin/btn_facebook_signin.png differ diff --git a/public/images/social/signin/btn_github_signin.png b/public/images/social/signin/btn_github_signin.png new file mode 100644 index 000000000000..007be18580f4 Binary files /dev/null and b/public/images/social/signin/btn_github_signin.png differ diff --git a/public/images/social/signin/btn_google_signin_dark_normal_web@2x.png b/public/images/social/signin/btn_google_signin_dark_normal_web@2x.png new file mode 100644 index 000000000000..f27bb2433042 Binary files /dev/null and b/public/images/social/signin/btn_google_signin_dark_normal_web@2x.png differ diff --git a/public/images/social/signin/btn_linkedin_signin.png b/public/images/social/signin/btn_linkedin_signin.png new file mode 100644 index 000000000000..a3faf3b850cf Binary files /dev/null and b/public/images/social/signin/btn_linkedin_signin.png differ diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index 45ce8d7c9860..769109cc2781 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -59,13 +59,17 @@
{{ trans('texts.login_or_existing') }}
@foreach (App\Services\AuthService::$providers as $provider) - diff --git a/resources/views/list.blade.php b/resources/views/list.blade.php index 8924ebc4e72d..2cc61cc72a3d 100644 --- a/resources/views/list.blade.php +++ b/resources/views/list.blade.php @@ -172,7 +172,7 @@ } submittedForm = true; - if (id) { + if (id || id===0) { $('#public_id_{{ $entityType }}').val(id); } @@ -180,7 +180,9 @@ sweetConfirm(function() { $('#action_{{ $entityType }}').val(action); $('form.listForm_{{ $entityType }}').submit(); - }); + }, null, null, function(){ // CancelCallback + submittedForm = false; + }); } else { $('#action_{{ $entityType }}').val(action); $('form.listForm_{{ $entityType }}').submit(); diff --git a/resources/views/partials/sign_up.blade.php b/resources/views/partials/sign_up.blade.php index 2d927eb1f8be..3b04330e6a38 100644 --- a/resources/views/partials/sign_up.blade.php +++ b/resources/views/partials/sign_up.blade.php @@ -207,13 +207,20 @@ function handleSignedUp() {