Closed GoogleCodeExporter closed 9 years ago
Запрос который следует взять за основу я
имел ввиду вписанный в эту задачу, а не в ту
где разрабатывается функция
Original comment by rf40...@gmail.com
on 15 Aug 2014 at 6:34
>2) возник вопрос: разница в отображении
разового и ежемесячного существует?
Технически разницы в отображении
документов нет.
Но заказчик говорит что у него разовые и
ежемесячные - будут вести разные люди,
поэтому нужно сделать разделение.
А чисто технически у разовых поле type_docum =2 у
ежемесячных поле type_docum =1
Original comment by rf40...@gmail.com
on 18 Aug 2014 at 1:41
Вот такой предлагаю запрос, добавлены ID
документов и отсортировано по времени
добавления, вверху самый недавно
добавленный.
(SELECT BdGetNameOfPartner ("z_tab_invoice",`z_tab_invoice`.`id`) AS
NameOfPartner ,BdGetChetInfo (`z_tab_invoice`.`id`) AS invoice,
BdGetAktInfo (`z_tab_certificate`.`id_certif`) AS certificate, BdGetNnInfo (`z_tab_tax_bill`.`id`) AS tax_bill,
`z_tab_invoice`.`id` AS id_inv,`z_tab_certificate`.`id_certif` AS id_cert,`z_tab_tax_bill`.`id` AS id_txBill,`z_tab_invoice`.`timestamp` AS ts
FROM `z_tab_invoice`
LEFT JOIN `z_tab_certificate` ON
`z_tab_invoice`.`id`=`z_tab_certificate`.`num_invoice`
LEFT JOIN `z_tab_tax_bill` ON
`z_tab_invoice`.`id`=`z_tab_tax_bill`.`num_invoice`
WHERE z_tab_invoice.type_docum = '2')
UNION ALL
(SELECT BdGetNameOfPartner
("z_tab_certificate",`z_tab_certificate`.`id_certif`),'...',BdGetAktInfo
(`z_tab_certificate`.`id_certif`),'...',
NULL AS id_inv,`z_tab_certificate`.`id_certif` AS id_cert, NULL AS id_txBill,`z_tab_certificate`.`timestamp` AS ts
FROM `z_tab_certificate`
WHERE `num_invoice` ='0' AND type_docum ='2')
UNION ALL
(SELECT BdGetNameOfPartner
("z_tab_tax_bill",`z_tab_tax_bill`.`id`),'...','...',BdGetNnInfo
(`z_tab_tax_bill`.`id`),
NULL AS id_inv, NULL AS id_cert,`z_tab_tax_bill`.`id` AS id_txBill, `z_tab_tax_bill`.`timestamp` AS ts
FROM `z_tab_tax_bill`
WHERE `num_invoice` ='0' AND type_docum = '2')
ORDER by ts DESC
Original comment by rf40...@gmail.com
on 18 Aug 2014 at 2:05
Это старый запрос
SELECT `z_tab_invoice`.`id` AS
NN,BdGetNameOfPartner("z_tab_invoice",`z_tab_invoice`.`id`) AS
NameOfPartner,BdGetChetInfo(`z_tab_invoice`.`id`) AS invoice,
BdGetAktInfo(`z_tab_certificate`.`id_certif`) AS
certificate,BdGetNnInfo(`z_tab_tax_bill`.`id`) AS tax_bill
FROM `z_tab_invoice`
JOIN `z_tab_certificate` ON
`z_tab_invoice`.`id`=`z_tab_certificate`.`num_invoice`
JOIN `z_tab_tax_bill` ON `z_tab_invoice`.`id`=`z_tab_tax_bill`.`num_invoice`
WHERE z_tab_invoice.type_docum = "2"
UNION ALL
SELECT `z_tab_certificate`.`id_certif` AS
NN,BdGetNameOfPartner("z_tab_certificate",`z_tab_certificate`.`id_certif`) AS
NameOfPartner,"..." AS invoice,
BdGetAktInfo(`z_tab_certificate`.`id_certif`) AS certificate,"..." AS tax_bill
FROM `z_tab_certificate`
WHERE `num_invoice` ="0" AND type_docum ="2"
UNION ALL
SELECT `z_tab_tax_bill`.`id` AS
NN,BdGetNameOfPartner("z_tab_tax_bill",`z_tab_tax_bill`.`id`) AS
NameOfPartner,"..." AS invoice,
"..." AS certificate,BdGetNnInfo(`z_tab_tax_bill`.`id`) AS tax_bill
FROM `z_tab_tax_bill`
WHERE `num_invoice` ="0" AND type_docum ="2"
а это новый
(SELECT BdGetNameOfPartner("z_tab_invoice",`z_tab_invoice`.`id`) AS
NameOfPartner, BdGetChetInfo(`z_tab_invoice`.`id`) AS invoice,
BdGetAktInfo(`z_tab_certificate`.`id_certif`) AS certificate,
BdGetNnInfo(`z_tab_tax_bill`.`id`) AS tax_bill,
`z_tab_invoice`.`id` AS id_inv,`z_tab_certificate`.`id_certif` AS
id_cert,`z_tab_tax_bill`.`id` AS id_txBill,`z_tab_invoice`.`timestamp` AS ts
FROM `z_tab_invoice`
LEFT JOIN `z_tab_certificate` ON
`z_tab_invoice`.`id`=`z_tab_certificate`.`num_invoice`
LEFT JOIN `z_tab_tax_bill` ON
`z_tab_invoice`.`id`=`z_tab_tax_bill`.`num_invoice`
WHERE z_tab_invoice.type_docum = "2")
UNION ALL
(SELECT BdGetNameOfPartner("z_tab_certificate",`z_tab_certificate`.`id_certif`)
AS NameOfPartner,"..." AS invoice,
BdGetAktInfo(`z_tab_certificate`.`id_certif`) AS certificate, "..." AS
tax_bill,
NULL AS id_inv,`z_tab_certificate`.`id_certif` AS id_cert, NULL AS
id_txBill,`z_tab_certificate`.`timestamp` AS ts
FROM `z_tab_certificate`
WHERE `num_invoice`="0" AND type_docum ="2")
UNION ALL
(SELECT BdGetNameOfPartner("z_tab_tax_bill",`z_tab_tax_bill`.`id`) AS
NameOfPartner,"..." AS invoice,"..." AS certificate,
BdGetNnInfo(`z_tab_tax_bill`.`id`) AS tax_bill,
NULL AS id_inv, NULL AS id_cert,`z_tab_tax_bill`.`id` AS id_txBill,
`z_tab_tax_bill`.`timestamp` AS ts
FROM `z_tab_tax_bill`
WHERE `num_invoice`="0" AND type_docum="2")
ORDER by ts DESC
возвращают разные результаты.
Original comment by panche...@gmail.com
on 19 Aug 2014 at 5:50
Используем новый, он правильный. Старый не
правильный он теряет информацию изза
жесткого JOIN
Original comment by rf40...@gmail.com
on 19 Aug 2014 at 6:37
Добавил редактирование документов, v1.0.9
Original comment by panche...@gmail.com
on 21 Aug 2014 at 6:15
v.1.0.9 не хочет открывать форму
редактирования когда в строчке только счет
и нет ни привязанного акта ни привязанной
налоговой накладной
Original comment by rf40...@gmail.com
on 21 Aug 2014 at 6:31
[deleted comment]
Какие должны быть варианты?
Сейчас отрабатывается:
Счет ! Акт ! НН
есть ! есть ! есть
нет ! есть ! нет
нет ! нет ! есть
Original comment by panche...@gmail.com
on 21 Aug 2014 at 7:02
Оба на, я пропустил коментарий от 21 августа.
Еще может быть так:
Счет ! Акт ! НН
Есть ! НЕТ ! НЕТ
Из такого варианта форма редактирование
счета должна нормально открываться.
Original comment by rf40...@gmail.com
on 1 Sep 2014 at 1:03
выполнил, v1.00.11
Original comment by panche...@gmail.com
on 1 Sep 2014 at 1:21
Базовое отображение нормальное, спасибо
Original comment by rf40...@gmail.com
on 17 Nov 2014 at 8:30
Original comment by rf40...@gmail.com
on 17 Nov 2014 at 8:30
Original issue reported on code.google.com by
rf40...@gmail.com
on 15 Aug 2014 at 6:33