Nye perioder i innkjøp: Forskjell mellom sideversjoner
Fra Mikromarc Wiki
Hopp til navigeringHopp til søk
Ingen redigeringsforklaring |
Ingen redigeringsforklaring |
||
(Én mellomliggende versjon av en annen bruker er ikke vist) | |||
Linje 1: | Linje 1: | ||
NB! Dette gjelder MM2-kunder som bruker Innkjøpsmodulen | NB! Dette gjelder MM2-kunder som bruker Innkjøpsmodulen på lokaldrift. | ||
For å legge inn nye titler i innkjøpsmodulen trengs det å starte en ny periode.<br> | For å legge inn nye titler i innkjøpsmodulen trengs det å starte en ny periode.<br> | ||
Linje 12: | Linje 12: | ||
# Lukk ISQL. | # Lukk ISQL. | ||
<code><pre>insert acqperiod(description, fromdate, todate, opened, closed, finalized, chronology) values (2010, '2010-01-01', '2010-12-31', 0,0,0,12); | <code><pre> | ||
insert acqperiod(description, fromdate, todate, opened, closed, finalized, chronology) values (2011, '2011-01-01', '2011-12-31', 0,0,0,13); | if not exists (select 1 from acqperiod where description = 2010) then | ||
insert acqperiod(description, fromdate, todate, opened, closed, finalized, chronology) values (2012, '2012-01-01', '2012-12-31', 0,0,0,14); | insert acqperiod(description, fromdate, todate, opened, closed, finalized, chronology) | ||
insert acqperiod(description, fromdate, todate, opened, closed, finalized, chronology) values (2013, '2013-01-01', '2013-12-31', 0,0,0,15); | values (2010, '2010-01-01', '2010-12-31', 0,0,0,12); | ||
insert acqperiod(description, fromdate, todate, opened, closed, finalized, chronology) values (2014, '2014-01-01', '2014-12-31', 0,0,0,16); | message 'Perioden 2010 er lagt til.' to client; | ||
insert acqperiod(description, fromdate, todate, opened, closed, finalized, chronology) values (2015, '2015-01-01', '2015-12-31', 0,0,0,17); | end if; | ||
insert acqperiod(description, fromdate, todate, opened, closed, finalized, chronology) values (2016, '2016-01-01', '2016-12-31', 0,0,0,18); | if not exists (select 1 from acqperiod where description = 2011) then | ||
insert acqperiod(description, fromdate, todate, opened, closed, finalized, chronology) values (2017, '2017-01-01', '2017-12-31', 0,0,0,19); | insert acqperiod(description, fromdate, todate, opened, closed, finalized, chronology) | ||
insert acqperiod(description, fromdate, todate, opened, closed, finalized, chronology) values (2018, '2018-01-01', '2018-12-31', 0,0,0,20); | values (2011, '2011-01-01', '2011-12-31', 0,0,0,13); | ||
insert acqperiod(description, fromdate, todate, opened, closed, finalized, chronology) values (2019, '2019-01-01', '2019-12-31', 0,0,0,21); | message 'Perioden 2011 er lagt til.' to client; | ||
insert acqperiod(description, fromdate, todate, opened, closed, finalized, chronology) values (2020, '2020-01-01', '2020-12-31', 0,0,0,22); | end if; | ||
commit;</pre></code> | if not exists (select 1 from acqperiod where description = 2012) then | ||
insert acqperiod(description, fromdate, todate, opened, closed, finalized, chronology) | |||
values (2012, '2012-01-01', '2012-12-31', 0,0,0,14); | |||
message 'Perioden 2012 er lagt til.' to client; | |||
end if; | |||
if not exists (select 1 from acqperiod where description = 2013) then | |||
insert acqperiod(description, fromdate, todate, opened, closed, finalized, chronology) | |||
values (2013, '2013-01-01', '2013-12-31', 0,0,0,15); | |||
message 'Perioden 2013 er lagt til' to client; | |||
end if; | |||
if not exists (select 1 from acqperiod where description = 2014) then | |||
insert acqperiod(description, fromdate, todate, opened, closed, finalized, chronology) | |||
values (2014, '2014-01-01', '2014-12-31', 0,0,0,16); | |||
message 'Perioden 2014 er lagt til' to client; | |||
end if; | |||
if not exists (select 1 from acqperiod where description = 2015) then | |||
insert acqperiod(description, fromdate, todate, opened, closed, finalized, chronology) | |||
values (2015, '2015-01-01', '2015-12-31', 0,0,0,17); | |||
message 'Perioden 2015 er lagt til' to client; | |||
end if; | |||
if not exists (select 1 from acqperiod where description = 2016) then | |||
insert acqperiod(description, fromdate, todate, opened, closed, finalized, chronology) | |||
values (2016, '2016-01-01', '2016-12-31', 0,0,0,18); | |||
message 'Perioden 2016 er lagt til' to client; | |||
end if; | |||
if not exists (select 1 from acqperiod where description = 2017) then | |||
insert acqperiod(description, fromdate, todate, opened, closed, finalized, chronology) | |||
values (2017, '2017-01-01', '2017-12-31', 0,0,0,19); | |||
message 'Perioden 2017 er lagt til' to client; | |||
end if; | |||
if not exists (select 1 from acqperiod where description = 2018) then | |||
insert acqperiod(description, fromdate, todate, opened, closed, finalized, chronology) | |||
values (2018, '2018-01-01', '2018-12-31', 0,0,0,20); | |||
message 'Perioden 2018 er lagt til' to client; | |||
end if; | |||
if not exists (select 1 from acqperiod where description = 2019) then | |||
insert acqperiod(description, fromdate, todate, opened, closed, finalized, chronology) | |||
values (2019, '2019-01-01', '2019-12-31', 0,0,0,21); | |||
message 'Perioden 2019 er lagt til' to client; | |||
end if; | |||
if not exists (select 1 from acqperiod where description = 2020) then | |||
insert acqperiod(description, fromdate, todate, opened, closed, finalized, chronology) | |||
values (2020, '2020-01-01', '2020-12-31', 0,0,0,22); | |||
message 'Perioden 2020 er lagt til' to client; | |||
end if; | |||
commit; | |||
</pre></code> | |||
[[Category:Mikromarc 2]] | [[Category:Mikromarc 2]] |
Siste sideversjon per 13. okt. 2020 kl. 07:40
NB! Dette gjelder MM2-kunder som bruker Innkjøpsmodulen på lokaldrift.
For å legge inn nye titler i innkjøpsmodulen trengs det å starte en ny periode.
For lokaldriftskunder er kun perioder frem til og med år 2009 lagt inn i innkjøpsmodulen.
For å få ti nye år, må skriptet under inn i basen din.
Det gjøres på følgende måte:
- Velg: Alle programmer -> Mikromarc 2 -> Systemverktøy -> Sybase ISQL
- Kopier teksten under.
- Lim teksten inn i ISQL.
- Trykk på Execute.
- Lukk ISQL.
if not exists (select 1 from acqperiod where description = 2010) then
insert acqperiod(description, fromdate, todate, opened, closed, finalized, chronology)
values (2010, '2010-01-01', '2010-12-31', 0,0,0,12);
message 'Perioden 2010 er lagt til.' to client;
end if;
if not exists (select 1 from acqperiod where description = 2011) then
insert acqperiod(description, fromdate, todate, opened, closed, finalized, chronology)
values (2011, '2011-01-01', '2011-12-31', 0,0,0,13);
message 'Perioden 2011 er lagt til.' to client;
end if;
if not exists (select 1 from acqperiod where description = 2012) then
insert acqperiod(description, fromdate, todate, opened, closed, finalized, chronology)
values (2012, '2012-01-01', '2012-12-31', 0,0,0,14);
message 'Perioden 2012 er lagt til.' to client;
end if;
if not exists (select 1 from acqperiod where description = 2013) then
insert acqperiod(description, fromdate, todate, opened, closed, finalized, chronology)
values (2013, '2013-01-01', '2013-12-31', 0,0,0,15);
message 'Perioden 2013 er lagt til' to client;
end if;
if not exists (select 1 from acqperiod where description = 2014) then
insert acqperiod(description, fromdate, todate, opened, closed, finalized, chronology)
values (2014, '2014-01-01', '2014-12-31', 0,0,0,16);
message 'Perioden 2014 er lagt til' to client;
end if;
if not exists (select 1 from acqperiod where description = 2015) then
insert acqperiod(description, fromdate, todate, opened, closed, finalized, chronology)
values (2015, '2015-01-01', '2015-12-31', 0,0,0,17);
message 'Perioden 2015 er lagt til' to client;
end if;
if not exists (select 1 from acqperiod where description = 2016) then
insert acqperiod(description, fromdate, todate, opened, closed, finalized, chronology)
values (2016, '2016-01-01', '2016-12-31', 0,0,0,18);
message 'Perioden 2016 er lagt til' to client;
end if;
if not exists (select 1 from acqperiod where description = 2017) then
insert acqperiod(description, fromdate, todate, opened, closed, finalized, chronology)
values (2017, '2017-01-01', '2017-12-31', 0,0,0,19);
message 'Perioden 2017 er lagt til' to client;
end if;
if not exists (select 1 from acqperiod where description = 2018) then
insert acqperiod(description, fromdate, todate, opened, closed, finalized, chronology)
values (2018, '2018-01-01', '2018-12-31', 0,0,0,20);
message 'Perioden 2018 er lagt til' to client;
end if;
if not exists (select 1 from acqperiod where description = 2019) then
insert acqperiod(description, fromdate, todate, opened, closed, finalized, chronology)
values (2019, '2019-01-01', '2019-12-31', 0,0,0,21);
message 'Perioden 2019 er lagt til' to client;
end if;
if not exists (select 1 from acqperiod where description = 2020) then
insert acqperiod(description, fromdate, todate, opened, closed, finalized, chronology)
values (2020, '2020-01-01', '2020-12-31', 0,0,0,22);
message 'Perioden 2020 er lagt til' to client;
end if;
commit;