-
Notifications
You must be signed in to change notification settings - Fork 848
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2726 from frappe/version-15-hotfix
chore: release v15
- Loading branch information
Showing
15 changed files
with
334 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[ | ||
{"url": "https://github.com/frappe/erpnext","branch": "version-15"}, | ||
{"url": "https://github.com/frappe/payments","branch": "version-15"}, | ||
{"url": "https://github.com/frappe/hrms","branch": "version-15"} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Build Container Image | ||
on: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- version-15 | ||
tags: | ||
- "*" | ||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
arch: [amd64, arm64] | ||
|
||
permissions: | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout Entire Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
with: | ||
platforms: linux/${{ matrix.arch }} | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set Branch | ||
run: | | ||
export APPS_JSON_PATH='${{ github.workspace }}/.github/helper/apps.json' | ||
echo "APPS_JSON_BASE64=$(cat $APPS_JSON_PATH | base64 -w 0)" >> $GITHUB_ENV | ||
echo "FRAPPE_BRANCH=version-15" >> $GITHUB_ENV | ||
- name: Set Image Tag | ||
run: | | ||
echo "IMAGE_TAG=stable" >> $GITHUB_ENV | ||
- uses: actions/checkout@v4 | ||
with: | ||
repository: frappe/frappe_docker | ||
path: builds | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v6 | ||
with: | ||
push: true | ||
context: builds | ||
file: builds/images/layered/Containerfile | ||
tags: > | ||
ghcr.io/${{ github.repository }}:${{ github.ref_name }}, | ||
ghcr.io/${{ github.repository }}:${{ env.IMAGE_TAG }} | ||
build-args: | | ||
"FRAPPE_BRANCH=${{ env.FRAPPE_BRANCH }}" | ||
"APPS_JSON_BASE64=${{ env.APPS_JSON_BASE64 }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -254,6 +254,64 @@ def test_expense_claim_partially_paid_via_advance(self): | |
self.assertEqual(claim.total_amount_reimbursed, 500) | ||
self.assertEqual(claim.status, "Paid") | ||
|
||
def test_expense_claim_with_deducted_returned_advance(self): | ||
from hrms.hr.doctype.employee_advance.test_employee_advance import ( | ||
create_return_through_additional_salary, | ||
get_advances_for_claim, | ||
make_employee_advance, | ||
make_journal_entry_for_advance, | ||
) | ||
from hrms.hr.doctype.expense_claim.expense_claim import get_allocation_amount | ||
from hrms.payroll.doctype.salary_component.test_salary_component import create_salary_component | ||
from hrms.payroll.doctype.salary_structure.test_salary_structure import make_salary_structure | ||
|
||
# create employee and employee advance | ||
employee_name = make_employee("[email protected]", "_Test Company") | ||
advance = make_employee_advance(employee_name, {"repay_unclaimed_amount_from_salary": 1}) | ||
journal_entry = make_journal_entry_for_advance(advance) | ||
journal_entry.submit() | ||
advance.reload() | ||
|
||
# set up salary components and structure | ||
create_salary_component("Advance Salary - Deduction", type="Deduction") | ||
make_salary_structure( | ||
"Test Additional Salary for Advance Return", | ||
"Monthly", | ||
employee=employee_name, | ||
company="_Test Company", | ||
) | ||
|
||
# create additional salary for advance return | ||
additional_salary = create_return_through_additional_salary(advance) | ||
additional_salary.salary_component = "Advance Salary - Deduction" | ||
additional_salary.payroll_date = nowdate() | ||
additional_salary.amount = 400 | ||
additional_salary.insert() | ||
additional_salary.submit() | ||
advance.reload() | ||
|
||
self.assertEqual(advance.return_amount, 400) | ||
|
||
# create an expense claim | ||
payable_account = get_payable_account("_Test Company") | ||
claim = make_expense_claim( | ||
payable_account, 200, 200, "_Test Company", "Travel Expenses - _TC", do_not_submit=True | ||
) | ||
|
||
# link advance to the claim | ||
claim = get_advances_for_claim(claim, advance.name, amount=200) | ||
claim.save() | ||
claim.submit() | ||
|
||
# verify the allocation amount | ||
advance = claim.advances[0] | ||
self.assertEqual( | ||
get_allocation_amount( | ||
unclaimed_amount=advance.unclaimed_amount, return_amount=advance.return_amount | ||
), | ||
600, | ||
) | ||
|
||
def test_expense_claim_gl_entry(self): | ||
payable_account = get_payable_account(company_name) | ||
taxes = generate_taxes() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.