mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Add link to Android app
This commit is contained in:
parent
be041629a3
commit
ffa6f9d9a2
@ -306,6 +306,7 @@ if (! defined('APP_NAME')) {
|
||||
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_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('ZAPIER_URL', env('ZAPIER_URL', 'https://zapier.com/zapbook/invoice-ninja'));
|
||||
define('OUTDATE_BROWSER_URL', env('OUTDATE_BROWSER_URL', 'http://browsehappy.com/'));
|
||||
|
@ -56,8 +56,10 @@ class HandleUserLoggedIn
|
||||
|
||||
$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'))]));
|
||||
} 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
|
||||
|
@ -2293,6 +2293,7 @@ $LANG = array(
|
||||
'renew_license' => 'Renew License',
|
||||
'iphone_app_message' => 'Consider downloading our :link',
|
||||
'iphone_app' => 'iPhone app',
|
||||
'android_app' => 'Android app',
|
||||
'logged_in' => 'Logged In',
|
||||
'switch_to_primary' => 'Switch to your primary company (:name) to manage your plan.',
|
||||
'inclusive' => 'Inclusive',
|
||||
|
@ -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->fillField(['name' => 'name'], $name);
|
||||
$I->fillField(['name' => 'contacts[0][email]'], $email);
|
||||
$I->click('Save');
|
||||
$I->see($email);
|
||||
|
@ -18,7 +18,6 @@ class GatewayFeesCest
|
||||
|
||||
public function checkLineItemFee(AcceptanceTester $I)
|
||||
{
|
||||
$clientName = $this->faker->text(14);
|
||||
$clientEmail = $this->faker->safeEmail;
|
||||
$productKey = $this->faker->word();
|
||||
$taxName = $this->faker->word();
|
||||
@ -39,7 +38,7 @@ class GatewayFeesCest
|
||||
$partialFee = $feeAmount + ($total / 2 * $feeAmount / 100);
|
||||
$partialFeeWithTax = $partialFee + ($partialFee * $taxRate / 100);
|
||||
|
||||
$I->createClient($I, $clientEmail, $clientName);
|
||||
$I->createClient($I, $clientEmail);
|
||||
$I->createGateway($I);
|
||||
$this->configureFees($I, $feeAmount, $feePercent);
|
||||
|
||||
@ -50,14 +49,14 @@ class GatewayFeesCest
|
||||
|
||||
// without taxing the fee
|
||||
$this->configureGatewayFeeTax($I);
|
||||
$this->createInvoice($I, $clientName, $productKey, $total, $fee);
|
||||
$this->createInvoice($I, $clientEmail, $productKey, $total, $fee);
|
||||
|
||||
// with taxing the fee
|
||||
$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)
|
||||
$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]);
|
||||
$invoicePublicId = $I->grabFromDatabase('invoices', 'public_id', ['id' => $invoiceId]);
|
||||
$I->amOnPage('/invoices/' . $invoicePublicId . '/edit');
|
||||
@ -124,9 +123,9 @@ class GatewayFeesCest
|
||||
$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) {
|
||||
$amount = ($partial * 2);
|
||||
@ -138,7 +137,7 @@ class GatewayFeesCest
|
||||
//$I->see('Successfully created invoice');
|
||||
|
||||
//$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]);
|
||||
$invitationKey = $I->grabFromDatabase('invitations', 'invitation_key', ['invoice_id' => $invoiceId]);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user