Merge branch 'master' into Hotfix-OpenFilesInsteadOfDownloading
gitea/salix-front/pipeline/pr-master This commit looks good
Details
gitea/salix-front/pipeline/pr-master This commit looks good
Details
This commit is contained in:
commit
752c004946
|
@ -187,11 +187,11 @@ const getRowUpdateInputEvents = (sale) => {
|
|||
};
|
||||
|
||||
const resetChanges = async () => {
|
||||
const _selectedRows = selectedRows.value;
|
||||
await arrayData.fetch({ append: false });
|
||||
tableRef.value.CrudModelRef.hasChanges = false;
|
||||
await tableRef.value.reload();
|
||||
|
||||
selectedRows.value = [];
|
||||
tableRef.value.selected = _selectedRows;
|
||||
};
|
||||
const changeQuantity = async (sale) => {
|
||||
if (!sale.itemFk || sale.quantity == null || sale?.originalQuantity === sale.quantity)
|
||||
|
|
|
@ -366,7 +366,11 @@ function openBalanceDialog(ticket) {
|
|||
);
|
||||
|
||||
if (!isSameClient) {
|
||||
throw new Error('You cannot make a payment on account from multiple clients');
|
||||
notify(
|
||||
t('You cannot make a payment on account from multiple clients'),
|
||||
'negative',
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
for (let ticketData of checkedTickets) {
|
||||
|
@ -664,4 +668,5 @@ es:
|
|||
Zone: Zona
|
||||
New ticket: Nuevo ticket
|
||||
Component lack: Faltan componentes
|
||||
You cannot make a payment on account from multiple clients: No puedes hacer un pago a cuenta de varios clientes
|
||||
</i18n>
|
||||
|
|
|
@ -52,30 +52,50 @@ const filterBanks = {
|
|||
|
||||
const state = useState();
|
||||
const user = state.getUser();
|
||||
const originalDescription = ref('');
|
||||
const initialData = ref({
|
||||
...$props.formData,
|
||||
companyFk: user.value.companyFk,
|
||||
payed: Date.vnNew(),
|
||||
originalDescription: '',
|
||||
});
|
||||
|
||||
function setPaymentType(data, accounting) {
|
||||
data.bankFk = accounting.id;
|
||||
if (!accounting) return;
|
||||
|
||||
data.bankFk = accounting.id;
|
||||
accountingType.value = accounting.accountingType;
|
||||
|
||||
data.description = [];
|
||||
data.payed = Date.vnNew();
|
||||
isCash.value = accountingType.value.code == 'cash';
|
||||
viewReceipt.value = isCash.value;
|
||||
if (accountingType.value.daysInFuture)
|
||||
data.payed.setDate(data.payed.getDate() + accountingType.value.daysInFuture);
|
||||
maxAmount.value = accountingType.value && accountingType.value.maxAmount;
|
||||
if (accountingType.value.code == 'compensation') return (data.description = '');
|
||||
|
||||
let descriptions = [];
|
||||
if (accountingType.value.receiptDescription)
|
||||
descriptions.push(accountingType.value.receiptDescription);
|
||||
if (data.description > 0) descriptions.push(data.description);
|
||||
data.description = descriptions.join(', ');
|
||||
switch (accountingType.value.code) {
|
||||
case 'compensation':
|
||||
data.description.push($props.formData.description);
|
||||
break;
|
||||
|
||||
default:
|
||||
if (
|
||||
accountingType.value.receiptDescription != null &&
|
||||
accountingType.value.receiptDescription != ''
|
||||
) {
|
||||
data.description.push(accountingType.value.receiptDescription);
|
||||
}
|
||||
const originalDescription =
|
||||
data.originalDescription || $props.formData.description;
|
||||
if (originalDescription) {
|
||||
data.description.push(originalDescription);
|
||||
}
|
||||
}
|
||||
|
||||
data.description = data.description.join(', ');
|
||||
data.payed = Date.vnNew();
|
||||
if (accountingType.value.daysInFuture) {
|
||||
data.payed.setDate(data.payed.getDate() + accountingType.value.daysInFuture);
|
||||
}
|
||||
|
||||
maxAmount.value = accountingType.value && accountingType.value.maxAmount;
|
||||
}
|
||||
|
||||
const calculateFromAmount = (event) => {
|
||||
|
|
|
@ -7,8 +7,8 @@ Cypress.Commands.add('selectTravel', (warehouse = '1') => {
|
|||
});
|
||||
|
||||
Cypress.Commands.add('deleteEntry', () => {
|
||||
cy.dataCy('descriptor-more-opts').should('be.visible').click();
|
||||
cy.waitForElement('div[data-cy="delete-entry"]').click();
|
||||
cy.openActionsDescriptor();
|
||||
cy.get('[data-cy="delete-entry"]').click();
|
||||
});
|
||||
|
||||
Cypress.Commands.add('createEntry', () => {
|
||||
|
|
|
@ -94,8 +94,10 @@ describe.skip('EntryBuys', () => {
|
|||
cy.get('button[data-cy="vnTableCreateBtn"]').click();
|
||||
|
||||
cy.get('input[data-cy="itemFk-create-popup"]').type('1');
|
||||
cy.intercept('GET', /\/api\/Items\/1\/getVisibleAvailable/).as('item');
|
||||
cy.get('div[role="listbox"] > div > div[role="option"]').eq(0).click();
|
||||
cy.wait('@item');
|
||||
cy.get('input[data-cy="Grouping mode_select"]').should('have.value', 'packing');
|
||||
cy.get('button[data-cy="FormModelPopup_save"]').click();
|
||||
cy.saveFormModel();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -6,7 +6,7 @@ describe('TicketBasicData', () => {
|
|||
cy.visit('/#/ticket/31/basic-data');
|
||||
});
|
||||
|
||||
it('Should redirect to customer basic data', () => {
|
||||
it.skip('Should redirect to customer basic data', () => {
|
||||
cy.get('.q-page').should('be.visible');
|
||||
cy.get(':nth-child(2) > div > .text-primary').click();
|
||||
cy.dataCy('Address_select').click();
|
||||
|
@ -16,7 +16,7 @@ describe('TicketBasicData', () => {
|
|||
).click();
|
||||
cy.url().should('include', '/customer/1104/basic-data');
|
||||
});
|
||||
it.only('stepper', () => {
|
||||
it('stepper', () => {
|
||||
cy.get('.q-stepper__tab--active').should('have.class', 'q-stepper__tab--active');
|
||||
|
||||
cy.get('.q-stepper__nav > .q-btn--standard').click();
|
||||
|
|
|
@ -26,6 +26,24 @@ describe('TicketList', () => {
|
|||
cy.get('@windowOpen').should('be.calledWithMatch', /\/ticket\/\d+\/sale/);
|
||||
});
|
||||
|
||||
it('should create payment ticket', () => {
|
||||
cy.searchInFilterPanel().click();
|
||||
|
||||
const rowSelected =
|
||||
'tbody > :nth-child(2) > :nth-child(1) > .q-checkbox > .q-checkbox__inner ';
|
||||
cy.get(rowSelected).click();
|
||||
cy.get(
|
||||
'[style="transform: translate(-256px, 0px); margin: 140px 20px; z-index: 2;"] > div > .q-btn',
|
||||
).click();
|
||||
const description = 'Albaran: 31';
|
||||
cy.dataCy('Reference_input').should('have.value', description);
|
||||
cy.selectOption('[data-cy="paymentBank"]', 'Cash');
|
||||
cy.dataCy('Delivered amount_input').clear().type('41.62');
|
||||
cy.dataCy('Reference_input').should('have.value', `Cash, ${description}`);
|
||||
cy.get('[aria-label="View recipt"]').click();
|
||||
cy.get('.q-btn--standard > .q-btn__content > .block').click();
|
||||
});
|
||||
|
||||
it('should open ticket summary', () => {
|
||||
searchResults();
|
||||
cy.getRow().find('.q-btn:last').click();
|
||||
|
|
|
@ -133,7 +133,7 @@ describe('TicketSale', { testIsolation: true }, () => {
|
|||
cy.dataCy('recalculatePriceItem').click();
|
||||
cy.wait('@recalculatePrice').its('response.statusCode').should('eq', 200);
|
||||
cy.checkNotification('Data saved');
|
||||
cy.dataCy('ticketSaleMoreActionsDropdown').should('be.disabled');
|
||||
cy.dataCy('ticketSaleMoreActionsDropdown').should('not.be.disabled');
|
||||
});
|
||||
|
||||
it('should update discount when "Update discount" is clicked', () => {
|
||||
|
@ -155,7 +155,7 @@ describe('TicketSale', { testIsolation: true }, () => {
|
|||
cy.dataCy('saveManaBtn').click();
|
||||
cy.wait('@updateDiscount').its('response.statusCode').should('eq', 204);
|
||||
cy.checkNotification('Data saved');
|
||||
cy.dataCy('ticketSaleMoreActionsDropdown').should('be.disabled');
|
||||
cy.dataCy('ticketSaleMoreActionsDropdown').should('not.be.disabled');
|
||||
});
|
||||
|
||||
it('adds claim', () => {
|
||||
|
|
Loading…
Reference in New Issue