mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Merge pull request #4834 from turbo124/v5-develop
Fixes for default template
This commit is contained in:
commit
5f45a72445
4
.env.ci
4
.env.ci
@ -10,6 +10,8 @@ DB_DATABASE1=ninja
|
||||
DB_USERNAME1=root
|
||||
DB_PASSWORD1=ninja
|
||||
DB_HOST1=127.0.0.1
|
||||
DB_PORT1=32768
|
||||
DB_PORT=32768
|
||||
DB_DATABASE=ninja
|
||||
DB_USERNAME=root
|
||||
DB_PASSWORD=ninja
|
||||
@ -17,4 +19,4 @@ DB_HOST=127.0.0.1
|
||||
NINJA_ENVIRONMENT=hosted
|
||||
COMPOSER_AUTH='{"github-oauth": {"github.com": "${{ secrets.GITHUB_TOKEN }}"}}'
|
||||
TRAVIS=true
|
||||
API_SECRET=superdoopersecrethere
|
||||
API_SECRET=superdoopersecrethere
|
15
.github/workflows/phpunit.yml
vendored
15
.github/workflows/phpunit.yml
vendored
@ -39,7 +39,7 @@ jobs:
|
||||
mariadb:
|
||||
image: mariadb:latest
|
||||
ports:
|
||||
- 3306
|
||||
- 32768:3306
|
||||
env:
|
||||
MYSQL_ALLOW_EMPTY_PASSWORD: yes
|
||||
MYSQL_USER: ninja
|
||||
@ -52,7 +52,6 @@ jobs:
|
||||
- name: Start mysql service
|
||||
run: |
|
||||
sudo /etc/init.d/mysql start
|
||||
|
||||
- name: Verify MariaDB connection
|
||||
env:
|
||||
DB_PORT: ${{ job.services.mariadb.ports[3306] }}
|
||||
@ -62,12 +61,11 @@ jobs:
|
||||
while ! mysqladmin ping -h"127.0.0.1" -P"$DB_PORT" --silent; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
extensions: mysql, sqlite3, bcmath, gmp, gd, curl, zip, openssl, mbstring, xml
|
||||
extensions: mysql, mysqlnd, sqlite3, bcmath, gmp, gd, curl, zip, openssl, mbstring, xml
|
||||
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
@ -77,33 +75,27 @@ jobs:
|
||||
- name: Copy .env
|
||||
run: |
|
||||
cp .env.ci .env
|
||||
|
||||
- name: Install composer dependencies
|
||||
run: |
|
||||
composer config -g github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}
|
||||
composer install
|
||||
|
||||
- name: Prepare Laravel Application
|
||||
run: |
|
||||
php artisan key:generate
|
||||
php artisan optimize
|
||||
php artisan cache:clear
|
||||
php artisan config:cache
|
||||
|
||||
- name: Create DB and schemas
|
||||
run: |
|
||||
mkdir -p database
|
||||
touch database/database.sqlite
|
||||
|
||||
- name: Migrate Database
|
||||
run: |
|
||||
php artisan migrate:fresh --seed --force && php artisan db:seed --force
|
||||
|
||||
- name: Prepare JS/CSS assets
|
||||
run: |
|
||||
npm i
|
||||
npm run production
|
||||
|
||||
- name: Run Testsuite
|
||||
run: |
|
||||
cat .env
|
||||
@ -113,5 +105,4 @@ jobs:
|
||||
|
||||
- name: Run php-cs-fixer
|
||||
run: |
|
||||
vendor/bin/php-cs-fixer fix
|
||||
|
||||
vendor/bin/php-cs-fixer fix
|
@ -224,8 +224,7 @@ class EmailTemplateDefaults
|
||||
private static function transformText($string)
|
||||
{
|
||||
//preformat the string, removing trailing colons.
|
||||
$string = rtrim($string, ":");
|
||||
|
||||
return str_replace(':', '$', ctrans('texts.'.$string));
|
||||
return str_replace(':', '$', rtrim( ctrans('texts.'.$string), ":"));
|
||||
}
|
||||
}
|
||||
|
@ -897,8 +897,9 @@ class Import implements ShouldQueue
|
||||
if ($this->tryTransformingId('invoices', $invoice['invoice_id'])) {
|
||||
$modified['invoices'][$key]['invoice_id'] = $this->transformId('invoices', $invoice['invoice_id']);
|
||||
} else {
|
||||
$modified['credits'][$key]['credit_id'] = $this->transformId('credits', $invoice['invoice_id']);
|
||||
$modified['credits'][$key]['amount'] = $modified['invoices'][$key]['amount'];
|
||||
nlog($modified['invoices']);
|
||||
// $modified['credits'][$key]['credit_id'] = $this->transformId('credits', $invoice['invoice_id']);
|
||||
// $modified['credits'][$key]['amount'] = $modified['invoices'][$key]['amount'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user