Skip to content

Commit

Permalink
Merge branch 'diamoerp-staging' into backport-780-to-diamoerp-staging
Browse files Browse the repository at this point in the history
  • Loading branch information
fproldan authored Aug 29, 2023
2 parents 2eb409c + 4bf75f5 commit 3536ae0
Show file tree
Hide file tree
Showing 12 changed files with 50 additions and 29 deletions.
12 changes: 6 additions & 6 deletions erpnext/accounts/doctype/cierre_de_caja/cierre_de_caja.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ def get_totals(self):
accounts = self.get_accounts(True)
positive_entries_filter = [['creation', '>=', self.period_start_date], ['creation', '<=', self.period_end_date], ['paid_to', 'in', accounts], ['docstatus', '=', '1']]
negative_entries_filter = [['creation', '>=', self.period_start_date], ['creation', '<=', self.period_end_date], ['paid_from', 'in', accounts], ['docstatus', '=', '1']]
positive_payment_entries = frappe.db.get_all("Payment Entry", filters=positive_entries_filter, fields=["total_allocated_amount"])
negative_payment_entries = frappe.db.get_all("Payment Entry", filters=negative_entries_filter, fields=["total_allocated_amount"])
total_cash_cheque = sum(payment_entry['total_allocated_amount'] for payment_entry in positive_payment_entries) + sum(payment_entry['total_allocated_amount'] * -1 for payment_entry in negative_payment_entries)
positive_payment_entries = frappe.db.get_all("Payment Entry", filters=positive_entries_filter, fields=["paid_amount"])
negative_payment_entries = frappe.db.get_all("Payment Entry", filters=negative_entries_filter, fields=["paid_amount"])
total_cash_cheque = sum(payment_entry['paid_amount'] for payment_entry in positive_payment_entries) + sum(payment_entry['paid_amount'] * -1 for payment_entry in negative_payment_entries)
totals['total_cash_cheque'] = total_cash_cheque
return totals

Expand All @@ -61,9 +61,9 @@ def get_expected_amount(mode_of_payment, period_start_date, period_end_date, own
account = frappe.db.get_value("Mode of Payment Account", {"parent": mode_of_payment, "company": company}, "default_account")
positive_entries_filter = [['creation', '>=', period_start_date], ['creation', '<=', period_end_date], ['paid_to', '=', account], ['docstatus', '=', '1']]
negative_entries_filter = [['creation', '>=', period_start_date], ['creation', '<=', period_end_date], ['paid_from', '=', account], ['docstatus', '=', '1']]
positive_payment_entries = frappe.db.get_all("Payment Entry", filters=positive_entries_filter, fields=["total_allocated_amount"])
negative_payment_entries = frappe.db.get_all("Payment Entry", filters=negative_entries_filter, fields=["total_allocated_amount"])
return sum(payment_entry['total_allocated_amount'] for payment_entry in positive_payment_entries) + sum(payment_entry['total_allocated_amount'] * -1 for payment_entry in negative_payment_entries)
positive_payment_entries = frappe.db.get_all("Payment Entry", filters=positive_entries_filter, fields=["paid_amount"])
negative_payment_entries = frappe.db.get_all("Payment Entry", filters=negative_entries_filter, fields=["paid_amount"])
return sum(payment_entry['paid_amount'] for payment_entry in positive_payment_entries) + sum(payment_entry['paid_amount'] * -1 for payment_entry in negative_payment_entries)


@frappe.whitelist()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def get_data():
'Payment Request': 'reference_name',
'Landed Cost Voucher': 'receipt_document',
'Purchase Invoice': 'return_against',
'Auto Repeat': 'reference_document'
'Auto Repeat': 'reference_document',
},
'internal_links': {
'Purchase Order': ['items', 'purchase_order'],
Expand Down
4 changes: 2 additions & 2 deletions erpnext/accounts/doctype/subscription/subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -624,8 +624,8 @@ def cancel_subscription(self):
to_prorate = frappe.db.get_single_value('Subscription Settings', 'prorate')
self.status = 'Cancelled'
self.cancelation_date = nowdate()
if to_generate_invoice:
self.generate_invoice(prorate=to_prorate)
# if to_generate_invoice:
# self.generate_invoice(prorate=to_prorate)
self.save()

def restart_subscription(self):
Expand Down
5 changes: 1 addition & 4 deletions erpnext/accounts/report/balance_sheet/balance_sheet.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"filters": [],
"idx": 2,
"is_standard": "Yes",
"modified": "2022-12-06 15:43:22.678305",
"modified": "2022-12-06 16:43:22.678305",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Balance Sheet",
Expand All @@ -24,9 +24,6 @@
},
{
"role": "Accounts Manager"
},
{
"role": "Auditor"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"filters": [],
"idx": 0,
"is_standard": "Yes",
"modified": "2021-03-31 09:48:30.944429",
"modified": "2021-03-31 09:49:30.944429",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Billed Items To Be Received",
Expand All @@ -28,9 +28,6 @@
},
{
"role": "Accounts Manager"
},
{
"role": "Auditor"
}
]
}
5 changes: 1 addition & 4 deletions erpnext/accounts/report/trial_balance/trial_balance.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"filters": [],
"idx": 2,
"is_standard": "Yes",
"modified": "2022-12-06 15:43:13.046204",
"modified": "2022-12-06 15:44:13.046204",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Trial Balance",
Expand All @@ -24,9 +24,6 @@
},
{
"role": "Accounts Manager"
},
{
"role": "Auditor"
}
]
}
4 changes: 1 addition & 3 deletions erpnext/crm/doctype/opportunity/opportunity.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@
"no_copy": 1
},
{
"default": "Sales",
"fieldname": "opportunity_type",
"fieldtype": "Link",
"in_list_view": 1,
Expand Down Expand Up @@ -224,7 +223,6 @@
"fieldtype": "Column Break"
},
{
"default": "Prospecting",
"fieldname": "sales_stage",
"fieldtype": "Link",
"label": "Sales Stage",
Expand Down Expand Up @@ -430,7 +428,7 @@
"icon": "fa fa-info-sign",
"idx": 195,
"links": [],
"modified": "2021-06-05 11:11:22.831139",
"modified": "2021-06-05 12:12:22.831139",
"modified_by": "Administrator",
"module": "CRM",
"name": "Opportunity",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ def validate_is_holiday(self):
frappe.bold(formatdate(self.date))))

def get_holiday_list(company=None):
if not frappe.db.exists("Has Domain", {"domain": 'HR Asistencia y Vacaciones'}):
return None

if not company:
company = get_default_company() or frappe.get_all('Company')[0].name

Expand Down
19 changes: 19 additions & 0 deletions erpnext/patches/v13_0/release_1_7.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from __future__ import unicode_literals

import frappe


def execute():
frappe.get_doc(
{
"name": "¡Nueva actualización 1.7!",
"title": "¡Nueva actualización 1.7 🚀!",
"public": 1,
"notify_on_login": 1,
"notify_on_every_login": 0,
"expire_notification_on": "2023-04-30",
"content": "<div class=\"ql-editor read-mode\"><p><img src=\"https://user-images.githubusercontent.com/4945122/232548760-8f915323-2702-4df9-89d1-ecc967861e98.jpg\"></p><p><br></p><p>Desde el equipo de DiamoERP estamos felices de anunciar la release V 1.7 de DiamoERP. Hemos trabajado arduamente para seguir ofreciendo un servicio de excelencia, y a continuación les contamos las principales características de la versión actualizada: Optimización de consultas y rendimiento, para mayor velocidad de acceso a los datos.</p><p><br></p><p>¡Esperamos que les gusten tanto como a nosotros!</p><p><br></p><h3>Hasta 1.5X más rápido!</h3><p><br></p><p>Sabemos que el tiempo es un recurso valioso para cualquier empresa, y nuestro ERP mejorado puede ayudarte a ahorrar tiempo y aumentar tu productividad. DiamoERP ha mejorado su velocidad en hasta 50% en algunos escenarios, lo que significa que ahora puedes completar tus tareas diarias en la mitad del tiempo.</p><p><br></p><p><img src=\"https://user-images.githubusercontent.com/4945122/232548747-e1df6541-46ba-4995-b4e9-8ec1aa3eb665.png\"></p><p><br></p><p>1.4 X en Consultas, 1.2 X en Transacciones y hasta 1.5 X en consultas de reportes!</p><p><br></p><h3>Módulo Web Discusiones</h3><p><br></p><p>Con un simple click, agregar el módulo discusiones a tus páginas web permite que tu público interactúe de una forma sencilla y sin plugins de terceros.</p><p><br></p><p><img align=\"center\" src=\"https://user-images.githubusercontent.com/4945122/232548736-8bd2d3b1-bdd5-4076-8fcd-b2bb07b28a0a.png\" style=\"display: block; margin: auto;\" width=\"705\"></p><p><br></p><h3><strong>Mejoras en nuestra plataforma de Documentación</strong></h3><p><br></p><p>Nuevos menús de navegación y utilidades para que encontrar lo que estás buscando sea más intuitivo, y toda la información que necesitas este en el lugar correcto.</p><p><br></p><p>Agregados menores como correcciones en Conciliador Bancario, Reportes contables, agregados de nuevos tipos de comprobantes , optimizaciones de performance y más en esta actualización, buscando la excelencia de DiamoERP.</p><p><br></p></div>",
"doctype": "Note",
}
).insert(ignore_mandatory=True)
frappe.db.commit()
12 changes: 12 additions & 0 deletions erpnext/patches/v13_0/remove_auditor_role_from_users.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import frappe


def execute():
for u in frappe.get_all('User'):
user = frappe.get_doc('User', u)
user_roles = [r.role for r in user.roles]

if 'Auditor' in user_roles:
user.remove_roles("Auditor")

frappe.db.commit()
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@

def get_data():
return {
'fieldname': 'purchase_receipt_no',
'fieldname': 'purchase_receipt',
'non_standard_fieldnames': {
'Purchase Invoice': 'purchase_receipt',
'Asset': 'purchase_receipt',
'Landed Cost Voucher': 'receipt_document',
'Auto Repeat': 'reference_document',
Expand All @@ -17,7 +16,6 @@ def get_data():
'Purchase Order': ['items', 'purchase_order'],
'Project': ['items', 'project'],
'Quality Inspection': ['items', 'quality_inspection'],
'Purchase Invoice': ['items', 'purchase_invoice'],
},
'transactions': [
{
Expand Down
4 changes: 2 additions & 2 deletions erpnext/translations/es.csv
Original file line number Diff line number Diff line change
Expand Up @@ -6687,10 +6687,10 @@ Please set VAT Accounts in {0},Please set VAT Accounts in {0},
Please set Warehouse in Woocommerce Settings,Establezca Almacén en la configuración de Woocommerce,
Please set a Company,Establezca una empresa,
Please set a Customer linked to the Patient,Establezca un cliente vinculado al paciente,
Please set a Default Cash Account in Company defaults,Please set a Default Cash Account in Company defaults,
Please set a Default Cash Account in Company defaults,Establezca una cuenta de efectivo predeterminada en Valores predeterminados de la empresa,
Please set a Linked Item for the Membership Type {0},Please set a Linked Item for the Membership Type {0},
Please set a Supplier against the Items to be considered in the Purchase Order.,Establezca un Proveedor contra los Artículos que se considerarán en la Orden de Compra.,
Please set a default Holiday List for Company {0},Please set a default Holiday List for Company {0},
Please set a default Holiday List for Company {0},Establezca una Lista de vacaciones/festividades predeterminada para la empresa {0}.,
Please set a default Holiday List for Employee {0} or Company {1},"Por favor, establece una lista predeterminada de feriados para Empleado {0} o de su empresa {1}",
Please set a default company address,Establezca una dirección de empresa predeterminada,
Please set a valid Service Unit Capacity to enable Overlapping Appointments,Please set a valid Service Unit Capacity to enable Overlapping Appointments,
Expand Down

0 comments on commit 3536ae0

Please sign in to comment.