Add link to Android app

This commit is contained in:
Hillel Coren 2017-04-12 15:46:46 +03:00
parent be041629a3
commit ffa6f9d9a2
5 changed files with 13 additions and 11 deletions

View File

@ -306,6 +306,7 @@ if (! defined('APP_NAME')) {
define('NINJA_CONTACT_URL', env('NINJA_CONTACT_URL', 'https://www.invoiceninja.com/contact/')); define('NINJA_CONTACT_URL', env('NINJA_CONTACT_URL', 'https://www.invoiceninja.com/contact/'));
define('NINJA_FROM_EMAIL', env('NINJA_FROM_EMAIL', 'maildelivery@invoiceninja.com')); define('NINJA_FROM_EMAIL', env('NINJA_FROM_EMAIL', 'maildelivery@invoiceninja.com'));
define('NINJA_IOS_APP_URL', 'https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=1220337560&mt=8'); define('NINJA_IOS_APP_URL', 'https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=1220337560&mt=8');
define('NINJA_ANDROID_APP_URL', 'https://play.google.com/store/apps/details?id=com.invoiceninja.invoiceninja');
define('RELEASES_URL', env('RELEASES_URL', 'https://trello.com/b/63BbiVVe/invoice-ninja')); define('RELEASES_URL', env('RELEASES_URL', 'https://trello.com/b/63BbiVVe/invoice-ninja'));
define('ZAPIER_URL', env('ZAPIER_URL', 'https://zapier.com/zapbook/invoice-ninja')); define('ZAPIER_URL', env('ZAPIER_URL', 'https://zapier.com/zapbook/invoice-ninja'));
define('OUTDATE_BROWSER_URL', env('OUTDATE_BROWSER_URL', 'http://browsehappy.com/')); define('OUTDATE_BROWSER_URL', env('OUTDATE_BROWSER_URL', 'http://browsehappy.com/'));

View File

@ -56,8 +56,10 @@ class HandleUserLoggedIn
$account->loadLocalizationSettings(); $account->loadLocalizationSettings();
if (strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone') || strpos($_SERVER['HTTP_USER_AGENT'], 'iPad')) { if (strstr($_SERVER['HTTP_USER_AGENT'], 'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'], 'iPad')) {
Session::flash('warning', trans('texts.iphone_app_message', ['link' => link_to(NINJA_IOS_APP_URL, trans('texts.iphone_app'))])); Session::flash('warning', trans('texts.iphone_app_message', ['link' => link_to(NINJA_IOS_APP_URL, trans('texts.iphone_app'))]));
} elseif (strstr($_SERVER['HTTP_USER_AGENT'], 'Android')) {
Session::flash('warning', trans('texts.iphone_app_message', ['link' => link_to(NINJA_ANDROID_APP_URL, trans('texts.android_app'))]));
} }
// if they're using Stripe make sure they're using Stripe.js // if they're using Stripe make sure they're using Stripe.js

View File

@ -2293,6 +2293,7 @@ $LANG = array(
'renew_license' => 'Renew License', 'renew_license' => 'Renew License',
'iphone_app_message' => 'Consider downloading our :link', 'iphone_app_message' => 'Consider downloading our :link',
'iphone_app' => 'iPhone app', 'iphone_app' => 'iPhone app',
'android_app' => 'Android app',
'logged_in' => 'Logged In', 'logged_in' => 'Logged In',
'switch_to_primary' => 'Switch to your primary company (:name) to manage your plan.', 'switch_to_primary' => 'Switch to your primary company (:name) to manage your plan.',
'inclusive' => 'Inclusive', 'inclusive' => 'Inclusive',

View File

@ -74,10 +74,9 @@ class AcceptanceTester extends \Codeception\Actor
} }
} }
function createClient(\AcceptanceTester $I, $email, $name = '') function createClient(\AcceptanceTester $I, $email)
{ {
$I->amOnPage('/clients/create'); $I->amOnPage('/clients/create');
$I->fillField(['name' => 'name'], $name);
$I->fillField(['name' => 'contacts[0][email]'], $email); $I->fillField(['name' => 'contacts[0][email]'], $email);
$I->click('Save'); $I->click('Save');
$I->see($email); $I->see($email);

View File

@ -18,7 +18,6 @@ class GatewayFeesCest
public function checkLineItemFee(AcceptanceTester $I) public function checkLineItemFee(AcceptanceTester $I)
{ {
$clientName = $this->faker->text(14);
$clientEmail = $this->faker->safeEmail; $clientEmail = $this->faker->safeEmail;
$productKey = $this->faker->word(); $productKey = $this->faker->word();
$taxName = $this->faker->word(); $taxName = $this->faker->word();
@ -39,7 +38,7 @@ class GatewayFeesCest
$partialFee = $feeAmount + ($total / 2 * $feeAmount / 100); $partialFee = $feeAmount + ($total / 2 * $feeAmount / 100);
$partialFeeWithTax = $partialFee + ($partialFee * $taxRate / 100); $partialFeeWithTax = $partialFee + ($partialFee * $taxRate / 100);
$I->createClient($I, $clientEmail, $clientName); $I->createClient($I, $clientEmail);
$I->createGateway($I); $I->createGateway($I);
$this->configureFees($I, $feeAmount, $feePercent); $this->configureFees($I, $feeAmount, $feePercent);
@ -50,14 +49,14 @@ class GatewayFeesCest
// without taxing the fee // without taxing the fee
$this->configureGatewayFeeTax($I); $this->configureGatewayFeeTax($I);
$this->createInvoice($I, $clientName, $productKey, $total, $fee); $this->createInvoice($I, $clientEmail, $productKey, $total, $fee);
// with taxing the fee // with taxing the fee
$this->configureGatewayFeeTax($I, $taxName, $taxRate); $this->configureGatewayFeeTax($I, $taxName, $taxRate);
$this->createInvoice($I, $clientName, $productKey, $total, $feeWithTax); $this->createInvoice($I, $clientEmail, $productKey, $total, $feeWithTax);
// partial invoice (resaving invoice between payments) // partial invoice (resaving invoice between payments)
$invitationKey = $this->createInvoice($I, $clientName, $productKey, $total, $partialFeeWithTax, $total / 2); $invitationKey = $this->createInvoice($I, $clientEmail, $productKey, $total, $partialFeeWithTax, $total / 2);
$invoiceId = $I->grabFromDatabase('invitations', 'invoice_id', ['invitation_key' => $invitationKey]); $invoiceId = $I->grabFromDatabase('invitations', 'invoice_id', ['invitation_key' => $invitationKey]);
$invoicePublicId = $I->grabFromDatabase('invoices', 'public_id', ['id' => $invoiceId]); $invoicePublicId = $I->grabFromDatabase('invoices', 'public_id', ['id' => $invoiceId]);
$I->amOnPage('/invoices/' . $invoicePublicId . '/edit'); $I->amOnPage('/invoices/' . $invoicePublicId . '/edit');
@ -124,9 +123,9 @@ class GatewayFeesCest
$I->click('#modalSave'); $I->click('#modalSave');
} }
private function createInvoice($I, $clientName, $productKey, $amount, $fee, $partial = false) private function createInvoice($I, $clientEmail, $productKey, $amount, $fee, $partial = false)
{ {
$invoiceNumber = $I->fillInvoice($I, $clientName, $productKey); $invoiceNumber = $I->fillInvoice($I, $clientEmail, $productKey);
if ($partial) { if ($partial) {
$amount = ($partial * 2); $amount = ($partial * 2);
@ -138,7 +137,7 @@ class GatewayFeesCest
//$I->see('Successfully created invoice'); //$I->see('Successfully created invoice');
//$clientId = $I->grabFromDatabase('contacts', 'client_id', ['email' => $clientEmail]); //$clientId = $I->grabFromDatabase('contacts', 'client_id', ['email' => $clientEmail]);
$clientId = $I->grabFromDatabase('clients', 'id', ['name' => $clientName]); $clientId = $I->grabFromDatabase('clients', 'id', ['name' => $clientEmail]);
$invoiceId = $I->grabFromDatabase('invoices', 'id', ['client_id' => $clientId, 'invoice_number' => $invoiceNumber]); $invoiceId = $I->grabFromDatabase('invoices', 'id', ['client_id' => $clientId, 'invoice_number' => $invoiceNumber]);
$invitationKey = $I->grabFromDatabase('invitations', 'invitation_key', ['invoice_id' => $invoiceId]); $invitationKey = $I->grabFromDatabase('invitations', 'invitation_key', ['invoice_id' => $invoiceId]);